| Index: runtime/vm/flow_graph_builder.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_builder.cc (revision 6338)
|
| +++ runtime/vm/flow_graph_builder.cc (working copy)
|
| @@ -1843,7 +1843,7 @@
|
| }
|
|
|
|
|
| -void EffectGraphVisitor::VisitThrowNode(ThrowNode* node) {
|
| +void EffectGraphVisitor::BuildThrowNode(ThrowNode* node) {
|
| ValueGraphVisitor for_exception(owner(), temp_index());
|
| node->exception()->Visit(&for_exception);
|
| Append(for_exception);
|
| @@ -1861,10 +1861,24 @@
|
| for_stack_trace.value());
|
| }
|
| AddInstruction(instr);
|
| +}
|
| +
|
| +
|
| +void EffectGraphVisitor::VisitThrowNode(ThrowNode* node) {
|
| + BuildThrowNode(node);
|
| CloseFragment();
|
| }
|
|
|
|
|
| +// A throw cannot be part of an expression, however, the parser may replace
|
| +// certain expression nodes with a throw. In that case generate a literal null
|
| +// so that the fragment is not closed in the middle of an expression.
|
| +void ValueGraphVisitor::VisitThrowNode(ThrowNode* node) {
|
| + BuildThrowNode(node);
|
| + ReturnValue(new ConstantVal(Instance::ZoneHandle()));
|
| +}
|
| +
|
| +
|
| void EffectGraphVisitor::VisitInlinedFinallyNode(InlinedFinallyNode* node) {
|
| Bailout("EffectGraphVisitor::VisitInlinedFinallyNode");
|
| }
|
|
|