Chromium Code Reviews| 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); |
| + } |
| } |
| }; |