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

Unified Diff: runtime/vm/compiler.cc

Issue 9414003: Initial implementation of a flow-graph builder for Dart's AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rely on assumption that code can reach both branches of a condition. Created 8 years, 10 months 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/code_patcher_ia32.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index d8d1d4dbbff4cc6b02eba55c5ff9867b3ef6565b..5e330323dbc2cd96af0d5c96e690f522ebd53547 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -13,6 +13,7 @@
#include "vm/disassembler.h"
#include "vm/exceptions.h"
#include "vm/flags.h"
+#include "vm/flow_graph_builder.h"
#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
@@ -29,6 +30,8 @@ DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations.");
DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
"How many times we allow deoptimization before we disallow"
" certain optimizations");
+DEFINE_FLAG(bool, use_new_compiler, false,
+ "Try to use the new compiler backend.");
// Compile a function. Should call only if the function has not been compiled.
@@ -113,6 +116,11 @@ static RawError* CompileFunctionHelper(const Function& function,
function.token_index());
}
Parser::ParseFunction(&parsed_function);
+ if (FLAG_use_new_compiler) {
+ FlowGraphBuilder graph_builder(parsed_function);
+ graph_builder.BuildGraph();
+ // Currently, always fails and falls through to the old compiler.
+ }
CodeIndexTable* code_index_table = isolate->code_index_table();
ASSERT(code_index_table != NULL);
Assembler assembler;
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698