Index: runtime/vm/flow_graph_compiler.cc |
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc |
index 77e216ac2b8add249a71a825da4a5af9b2e226b4..c535fcdc13302731924c09ded2a25f1e04d4d6d6 100644 |
--- a/runtime/vm/flow_graph_compiler.cc |
+++ b/runtime/vm/flow_graph_compiler.cc |
@@ -228,7 +228,8 @@ static bool IsEmptyBlock(BlockEntryInstr* block) { |
return !block->IsCatchBlockEntry() && |
!block->HasNonRedundantParallelMove() && |
block->next()->IsGoto() && |
- !block->next()->AsGoto()->HasNonRedundantParallelMove(); |
+ !block->next()->AsGoto()->HasNonRedundantParallelMove() && |
+ !block->IsIndirectEntry(); |
} |
@@ -355,6 +356,7 @@ void FlowGraphCompiler::VisitBlocks() { |
LoopInfoComment(assembler(), *entry, *loop_headers); |
+ entry->set_offset(assembler()->CodeSize()); |
entry->EmitNativeCode(this); |
// Compile all successors until an exit, branch, or a block entry. |
for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
@@ -827,6 +829,11 @@ void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
+ if (parsed_function().node_sequence() == NULL) { |
+ ASSERT(flow_graph().IsIrregexpFunction()); |
+ return; |
+ } |
+ |
const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle( |
parsed_function_.node_sequence()->scope()->GetVarDescriptors( |
parsed_function_.function())); |