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

Unified Diff: src/compiler/pipeline.cc

Issue 1891663004: [compiler] Prevent unnecessary parsing with interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « src/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index d711abefb8338ead3c661268696013612f3a1253..a65b1cb3c6948caa9169b7d58f84864eafc321e5 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -556,9 +556,11 @@ struct LoopAssignmentAnalysisPhase {
static const char* phase_name() { return "loop assignment analysis"; }
void Run(PipelineData* data, Zone* temp_zone) {
- AstLoopAssignmentAnalyzer analyzer(data->graph_zone(), data->info());
- LoopAssignmentAnalysis* loop_assignment = analyzer.Analyze();
- data->set_loop_assignment(loop_assignment);
+ if (!data->info()->shared_info()->HasBytecodeArray()) {
Michael Starzinger 2016/04/15 12:21:40 We could add a flag (i.e. "kOptimizeFromBytecode")
Benedikt Meurer 2016/04/15 12:38:27 I'd really prefer the kOptimizeFromBytecode flag.
rmcilroy 2016/04/15 13:19:12 +1
Michael Starzinger 2016/04/15 13:21:48 Done.
+ AstLoopAssignmentAnalyzer analyzer(data->graph_zone(), data->info());
+ LoopAssignmentAnalysis* loop_assignment = analyzer.Analyze();
+ data->set_loop_assignment(loop_assignment);
+ }
}
};
@@ -567,10 +569,12 @@ struct TypeHintAnalysisPhase {
static const char* phase_name() { return "type hint analysis"; }
void Run(PipelineData* data, Zone* temp_zone) {
- TypeHintAnalyzer analyzer(data->graph_zone());
- Handle<Code> code(data->info()->shared_info()->code(), data->isolate());
- TypeHintAnalysis* type_hint_analysis = analyzer.Analyze(code);
- data->set_type_hint_analysis(type_hint_analysis);
+ if (!data->info()->shared_info()->HasBytecodeArray()) {
+ TypeHintAnalyzer analyzer(data->graph_zone());
+ Handle<Code> code(data->info()->shared_info()->code(), data->isolate());
+ TypeHintAnalysis* type_hint_analysis = analyzer.Analyze(code);
+ data->set_type_hint_analysis(type_hint_analysis);
+ }
}
};
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698