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 "src/base/platform/elapsed-timer.h" | 7 #include "src/base/platform/elapsed-timer.h" |
8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
9 #include "src/compiler/change-lowering.h" | 9 #include "src/compiler/change-lowering.h" |
10 #include "src/compiler/code-generator.h" | 10 #include "src/compiler/code-generator.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 | 145 |
146 static void TraceSchedule(Schedule* schedule) { | 146 static void TraceSchedule(Schedule* schedule) { |
147 if (!FLAG_trace_turbo) return; | 147 if (!FLAG_trace_turbo) return; |
148 OFStream os(stdout); | 148 OFStream os(stdout); |
149 os << "-- Schedule --------------------------------------\n" << *schedule; | 149 os << "-- Schedule --------------------------------------\n" << *schedule; |
150 } | 150 } |
151 | 151 |
152 | 152 |
153 Handle<Code> Pipeline::GenerateCode() { | 153 Handle<Code> Pipeline::GenerateCode() { |
| 154 if (info()->function()->dont_optimize_reason() == kTryCatchStatement || |
| 155 info()->function()->dont_optimize_reason() == kTryFinallyStatement || |
| 156 // TODO(turbofan): Make ES6 for-of work and remove this bailout. |
| 157 info()->function()->dont_optimize_reason() == kForOfStatement || |
| 158 // TODO(turbofan): Make super work and remove this bailout. |
| 159 info()->function()->dont_optimize_reason() == kSuperReference || |
| 160 // TODO(turbofan): Make OSR work and remove this bailout. |
| 161 info()->is_osr()) { |
| 162 return Handle<Code>::null(); |
| 163 } |
| 164 |
154 if (FLAG_turbo_stats) isolate()->GetTStatistics()->Initialize(info_); | 165 if (FLAG_turbo_stats) isolate()->GetTStatistics()->Initialize(info_); |
155 | 166 |
156 if (FLAG_trace_turbo) { | 167 if (FLAG_trace_turbo) { |
157 OFStream os(stdout); | 168 OFStream os(stdout); |
158 os << "---------------------------------------------------\n" | 169 os << "---------------------------------------------------\n" |
159 << "Begin compiling method " | 170 << "Begin compiling method " |
160 << info()->function()->debug_name()->ToCString().get() | 171 << info()->function()->debug_name()->ToCString().get() |
161 << " using Turbofan" << endl; | 172 << " using Turbofan" << endl; |
162 } | 173 } |
163 | 174 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 412 } |
402 | 413 |
403 | 414 |
404 void Pipeline::TearDown() { | 415 void Pipeline::TearDown() { |
405 InstructionOperand::TearDownCaches(); | 416 InstructionOperand::TearDownCaches(); |
406 } | 417 } |
407 | 418 |
408 } // namespace compiler | 419 } // namespace compiler |
409 } // namespace internal | 420 } // namespace internal |
410 } // namespace v8 | 421 } // namespace v8 |
OLD | NEW |