Simplify the "am I in unreachable code" predicate.
The phantom unreachable stack is only used when the real unreachable stack is active, so it's sufficient to check whether the real unreachable stack is empty.
This commit is contained in:
@@ -236,8 +236,9 @@ pub fn translate_function_body(parser: &mut Parser,
|
|||||||
let parser_state = parser.read();
|
let parser_state = parser.read();
|
||||||
match *parser_state {
|
match *parser_state {
|
||||||
ParserState::CodeOperator(ref op) => {
|
ParserState::CodeOperator(ref op) => {
|
||||||
if state.phantom_unreachable_stack_depth +
|
debug_assert!(state.phantom_unreachable_stack_depth == 0 ||
|
||||||
state.real_unreachable_stack_depth > 0 {
|
state.real_unreachable_stack_depth > 0);
|
||||||
|
if state.real_unreachable_stack_depth > 0 {
|
||||||
translate_unreachable_operator(op,
|
translate_unreachable_operator(op,
|
||||||
&mut builder,
|
&mut builder,
|
||||||
&mut stack,
|
&mut stack,
|
||||||
|
|||||||
Reference in New Issue
Block a user