| 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 <memory> | 8 #include <memory> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 }; | 738 }; |
| 739 | 739 |
| 740 | 740 |
| 741 struct GraphBuilderPhase { | 741 struct GraphBuilderPhase { |
| 742 static const char* phase_name() { return "graph builder"; } | 742 static const char* phase_name() { return "graph builder"; } |
| 743 | 743 |
| 744 void Run(PipelineData* data, Zone* temp_zone) { | 744 void Run(PipelineData* data, Zone* temp_zone) { |
| 745 bool succeeded = false; | 745 bool succeeded = false; |
| 746 | 746 |
| 747 if (data->info()->is_optimizing_from_bytecode()) { | 747 if (data->info()->is_optimizing_from_bytecode()) { |
| 748 BytecodeGraphBuilder graph_builder(temp_zone, data->info(), | 748 // Bytecode graph builder assumes deoptimziation is enabled. |
| 749 data->jsgraph(), 1.0f, | 749 DCHECK(data->info()->is_deoptimization_enabled()); |
| 750 data->source_positions()); | 750 BytecodeGraphBuilder graph_builder( |
| 751 temp_zone, data->info()->shared_info(), |
| 752 handle(data->info()->closure()->feedback_vector()), |
| 753 data->info()->osr_ast_id(), data->jsgraph(), 1.0f, |
| 754 data->source_positions()); |
| 751 succeeded = graph_builder.CreateGraph(); | 755 succeeded = graph_builder.CreateGraph(); |
| 752 } else { | 756 } else { |
| 753 AstGraphBuilderWithPositions graph_builder( | 757 AstGraphBuilderWithPositions graph_builder( |
| 754 temp_zone, data->info(), data->jsgraph(), 1.0f, | 758 temp_zone, data->info(), data->jsgraph(), 1.0f, |
| 755 data->loop_assignment(), data->source_positions()); | 759 data->loop_assignment(), data->source_positions()); |
| 756 succeeded = graph_builder.CreateGraph(); | 760 succeeded = graph_builder.CreateGraph(); |
| 757 } | 761 } |
| 758 | 762 |
| 759 if (!succeeded) { | 763 if (!succeeded) { |
| 760 data->set_compilation_failed(); | 764 data->set_compilation_failed(); |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 data->DeleteRegisterAllocationZone(); | 2014 data->DeleteRegisterAllocationZone(); |
| 2011 } | 2015 } |
| 2012 | 2016 |
| 2013 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2017 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 2014 | 2018 |
| 2015 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2019 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 2016 | 2020 |
| 2017 } // namespace compiler | 2021 } // namespace compiler |
| 2018 } // namespace internal | 2022 } // namespace internal |
| 2019 } // namespace v8 | 2023 } // namespace v8 |
| OLD | NEW |