| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 if (graph_builder.CreateGraph()) { | 345 if (graph_builder.CreateGraph()) { |
| 346 data->set_context_node(graph_builder.GetFunctionContext()); | 346 data->set_context_node(graph_builder.GetFunctionContext()); |
| 347 } else { | 347 } else { |
| 348 data->set_compilation_failed(); | 348 data->set_compilation_failed(); |
| 349 } | 349 } |
| 350 } | 350 } |
| 351 }; | 351 }; |
| 352 | 352 |
| 353 | 353 |
| 354 struct ContextSpecializerPhase { | 354 struct ContextSpecializerPhase { |
| 355 static const char* phase_name() { return nullptr; } | 355 static const char* phase_name() { return "context specializing"; } |
| 356 | 356 |
| 357 void Run(PipelineData* data, Zone* temp_zone) { | 357 void Run(PipelineData* data, Zone* temp_zone) { |
| 358 SourcePositionTable::Scope pos(data->source_positions(), | 358 SourcePositionTable::Scope pos(data->source_positions(), |
| 359 SourcePosition::Unknown()); | 359 SourcePosition::Unknown()); |
| 360 JSContextSpecializer spec(data->info(), data->jsgraph(), | 360 JSContextSpecializer spec(data->info(), data->jsgraph(), |
| 361 data->context_node()); | 361 data->context_node()); |
| 362 spec.SpecializeToContext(); | 362 GraphReducer graph_reducer(data->graph(), temp_zone); |
| 363 graph_reducer.AddReducer(&spec); |
| 364 graph_reducer.ReduceGraph(); |
| 363 } | 365 } |
| 364 }; | 366 }; |
| 365 | 367 |
| 366 | 368 |
| 367 struct InliningPhase { | 369 struct InliningPhase { |
| 368 static const char* phase_name() { return "inlining"; } | 370 static const char* phase_name() { return "inlining"; } |
| 369 | 371 |
| 370 void Run(PipelineData* data, Zone* temp_zone) { | 372 void Run(PipelineData* data, Zone* temp_zone) { |
| 371 SourcePositionTable::Scope pos(data->source_positions(), | 373 SourcePositionTable::Scope pos(data->source_positions(), |
| 372 SourcePosition::Unknown()); | 374 SourcePosition::Unknown()); |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 } | 1028 } |
| 1027 | 1029 |
| 1028 | 1030 |
| 1029 void Pipeline::TearDown() { | 1031 void Pipeline::TearDown() { |
| 1030 InstructionOperand::TearDownCaches(); | 1032 InstructionOperand::TearDownCaches(); |
| 1031 } | 1033 } |
| 1032 | 1034 |
| 1033 } // namespace compiler | 1035 } // namespace compiler |
| 1034 } // namespace internal | 1036 } // namespace internal |
| 1035 } // namespace v8 | 1037 } // namespace v8 |
| OLD | NEW |