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

Unified Diff: runtime/vm/precompiler.cc

Issue 1714743002: VM: Separate precompilation-specific code, make flags const. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix build after merge Created 4 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/precompiler.h ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index b8fe02c01b7df53318963caeff98d6c3e4a298f6..ce5ca5ee90c709fd34f6d20848e67d0a7bccd290 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -4,6 +4,7 @@
#include "vm/precompiler.h"
+#include "vm/aot_optimizer.h"
#include "vm/assembler.h"
#include "vm/ast_printer.h"
#include "vm/branch_optimizer.h"
@@ -21,7 +22,6 @@
#include "vm/flow_graph_builder.h"
#include "vm/flow_graph_compiler.h"
#include "vm/flow_graph_inliner.h"
-#include "vm/flow_graph_optimizer.h"
#include "vm/flow_graph_range_analysis.h"
#include "vm/flow_graph_type_propagator.h"
#include "vm/hash_table.h"
@@ -1027,33 +1027,6 @@ class NameFunctionsTraits {
typedef UnorderedHashMap<NameFunctionsTraits> Table;
-class FunctionsTraits {
- public:
- static bool IsMatch(const Object& a, const Object& b) {
- Zone* zone = Thread::Current()->zone();
- String& a_s = String::Handle(zone);
- String& b_s = String::Handle(zone);
- a_s = a.IsFunction() ? Function::Cast(a).name() : String::Cast(a).raw();
- b_s = b.IsFunction() ? Function::Cast(b).name() : String::Cast(b).raw();
- ASSERT(a_s.IsSymbol() && b_s.IsSymbol());
- return a_s.raw() == b_s.raw();
- }
- static uword Hash(const Object& obj) {
- if (obj.IsFunction()) {
- return String::Handle(Function::Cast(obj).name()).Hash();
- } else {
- ASSERT(String::Cast(obj).IsSymbol());
- return String::Cast(obj).Hash();
- }
- }
- static RawObject* NewKey(const Function& function) {
- return function.raw();
- }
-};
-
-typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet;
-
-
static void AddNameToFunctionsTable(Zone* zone,
Table* table,
const String& fname,
@@ -2014,9 +1987,9 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
caller_inline_id.Add(-1);
CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
- FlowGraphOptimizer optimizer(flow_graph,
- use_speculative_inlining,
- &inlining_black_list);
+ AotOptimizer optimizer(flow_graph,
+ use_speculative_inlining,
+ &inlining_black_list);
optimizer.PopulateWithICData();
optimizer.ApplyClassIds();
« no previous file with comments | « runtime/vm/precompiler.h ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698