Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 744853003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix clang and win build Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 5bb8e098ba2873e0f5a3a4d6bf5e93fc4ce60fc4..1a7854f55314e1edf14c4e4de7d806203dc0b6b0 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -19,6 +19,7 @@
#include "vm/longjump.h"
#include "vm/object_store.h"
#include "vm/parser.h"
+#include "vm/raw_object.h"
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
@@ -228,7 +229,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 +357,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,9 +830,22 @@ void FlowGraphCompiler::FinalizeStackmaps(const Code& code) {
void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) {
- const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle(
- parsed_function_.node_sequence()->scope()->GetVarDescriptors(
- parsed_function_.function()));
+ LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle();
+ if (parsed_function().node_sequence() == NULL) {
+ ASSERT(flow_graph().IsIrregexpFunction());
+ var_descs = LocalVarDescriptors::New(1);
+ RawLocalVarDescriptors::VarInfo info;
+ info.set_kind(RawLocalVarDescriptors::kSavedCurrentContext);
+ info.scope_id = 0;
+ info.begin_pos = 0;
+ info.end_pos = 0;
+ info.set_index(parsed_function().current_context_var()->index());
+ var_descs.SetVar(0, Symbols::CurrentContextVar(), &info);
+ } else {
+ var_descs =
+ parsed_function_.node_sequence()->scope()->GetVarDescriptors(
+ parsed_function_.function());
+ }
code.set_var_descriptors(var_descs);
}
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698