| ... | @@ -2640,15 +2640,16 @@ IrInstruction *ir_gen(CodeGen *codegen, AstNode *node, BlockContext *scope, IrEx | ... | @@ -2640,15 +2640,16 @@ IrInstruction *ir_gen(CodeGen *codegen, AstNode *node, BlockContext *scope, IrEx |
| 2640 | | 2640 | |
| 2641 | IrInstruction *result = ir_gen_node_extra(irb, node, scope, LValPurposeNone); | 2641 | IrInstruction *result = ir_gen_node_extra(irb, node, scope, LValPurposeNone); |
| 2642 | assert(result); | 2642 | assert(result); |
| | 2643 | if (irb->exec->invalid) |
| | 2644 | return codegen->invalid_instruction; |
| 2643 | | 2645 | |
| 2644 | IrInstruction *return_instruction = ir_build_return(irb, result->source_node, result); | 2646 | IrInstruction *return_instruction = ir_build_return(irb, result->source_node, result); |
| 2645 | assert(return_instruction); | 2647 | assert(return_instruction); |
| 2646 | | 2648 | |
| 2647 | if (result == codegen->invalid_instruction) | 2649 | if (!ir_goto_pass2(irb)) { |
| 2648 | return codegen->invalid_instruction; | 2650 | irb->exec->invalid = true; |
| 2649 | | | |
| 2650 | if (!ir_goto_pass2(irb)) | | |
| 2651 | return codegen->invalid_instruction; | 2651 | return codegen->invalid_instruction; |
| | 2652 | } |
| 2652 | | 2653 | |
| 2653 | return return_instruction; | 2654 | return return_instruction; |
| 2654 | } | 2655 | } |