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" |
| 11 #include "src/bootstrapper.h" // TODO(mstarzinger): Only temporary. |
11 #include "src/compiler/ast-graph-builder.h" | 12 #include "src/compiler/ast-graph-builder.h" |
12 #include "src/compiler/ast-loop-assignment-analyzer.h" | 13 #include "src/compiler/ast-loop-assignment-analyzer.h" |
13 #include "src/compiler/basic-block-instrumentor.h" | 14 #include "src/compiler/basic-block-instrumentor.h" |
14 #include "src/compiler/change-lowering.h" | 15 #include "src/compiler/change-lowering.h" |
15 #include "src/compiler/code-generator.h" | 16 #include "src/compiler/code-generator.h" |
16 #include "src/compiler/common-operator-reducer.h" | 17 #include "src/compiler/common-operator-reducer.h" |
17 #include "src/compiler/control-reducer.h" | 18 #include "src/compiler/control-reducer.h" |
18 #include "src/compiler/graph-replay.h" | 19 #include "src/compiler/graph-replay.h" |
19 #include "src/compiler/graph-visualizer.h" | 20 #include "src/compiler/graph-visualizer.h" |
20 #include "src/compiler/instruction.h" | 21 #include "src/compiler/instruction.h" |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 if (FLAG_turbo_verify) { | 748 if (FLAG_turbo_verify) { |
748 Run<VerifyGraphPhase>(untyped); | 749 Run<VerifyGraphPhase>(untyped); |
749 } | 750 } |
750 } | 751 } |
751 | 752 |
752 | 753 |
753 Handle<Code> Pipeline::GenerateCode() { | 754 Handle<Code> Pipeline::GenerateCode() { |
754 // TODO(turbofan): Make OSR work with inner loops and remove this bailout. | 755 // TODO(turbofan): Make OSR work with inner loops and remove this bailout. |
755 if (info()->is_osr() && !FLAG_turbo_osr) return Handle<Code>::null(); | 756 if (info()->is_osr() && !FLAG_turbo_osr) return Handle<Code>::null(); |
756 | 757 |
| 758 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, |
| 759 // the correct solution is to restore the context register after invoking |
| 760 // builtins from full-codegen. |
| 761 if (isolate()->bootstrapper()->IsActive()) return Handle<Code>::null(); |
| 762 |
757 ZonePool zone_pool(isolate()); | 763 ZonePool zone_pool(isolate()); |
758 SmartPointer<PipelineStatistics> pipeline_statistics; | 764 SmartPointer<PipelineStatistics> pipeline_statistics; |
759 | 765 |
760 if (FLAG_turbo_stats) { | 766 if (FLAG_turbo_stats) { |
761 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool)); | 767 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool)); |
762 pipeline_statistics->BeginPhaseKind("initializing"); | 768 pipeline_statistics->BeginPhaseKind("initializing"); |
763 } | 769 } |
764 | 770 |
765 PipelineData data(&zone_pool, info()); | 771 PipelineData data(&zone_pool, info()); |
766 this->data_ = &data; | 772 this->data_ = &data; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 } | 1080 } |
1075 | 1081 |
1076 | 1082 |
1077 void Pipeline::TearDown() { | 1083 void Pipeline::TearDown() { |
1078 InstructionOperand::TearDownCaches(); | 1084 InstructionOperand::TearDownCaches(); |
1079 } | 1085 } |
1080 | 1086 |
1081 } // namespace compiler | 1087 } // namespace compiler |
1082 } // namespace internal | 1088 } // namespace internal |
1083 } // namespace v8 | 1089 } // namespace v8 |
OLD | NEW |