OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 DCHECK(info()->shared_info()->has_deoptimization_support()); | 397 DCHECK(info()->shared_info()->has_deoptimization_support()); |
398 | 398 |
399 // Check the whitelist for TurboFan. | 399 // Check the whitelist for TurboFan. |
400 if (info()->closure()->PassesFilter(FLAG_turbo_filter) && | 400 if (info()->closure()->PassesFilter(FLAG_turbo_filter) && |
401 // TODO(turbofan): Make try-catch work and remove this bailout. | 401 // TODO(turbofan): Make try-catch work and remove this bailout. |
402 info()->function()->dont_optimize_reason() != kTryCatchStatement && | 402 info()->function()->dont_optimize_reason() != kTryCatchStatement && |
403 info()->function()->dont_optimize_reason() != kTryFinallyStatement && | 403 info()->function()->dont_optimize_reason() != kTryFinallyStatement && |
| 404 // TODO(turbofan): Make ES6 for-of work and remove this bailout. |
| 405 info()->function()->dont_optimize_reason() != kForOfStatement && |
404 // TODO(turbofan): Make OSR work and remove this bailout. | 406 // TODO(turbofan): Make OSR work and remove this bailout. |
405 !info()->is_osr()) { | 407 !info()->is_osr()) { |
406 compiler::Pipeline pipeline(info()); | 408 compiler::Pipeline pipeline(info()); |
407 pipeline.GenerateCode(); | 409 pipeline.GenerateCode(); |
408 if (!info()->code().is_null()) { | 410 if (!info()->code().is_null()) { |
409 if (FLAG_turbo_deoptimization) { | 411 if (FLAG_turbo_deoptimization) { |
410 info()->context()->native_context()->AddOptimizedCode(*info()->code()); | 412 info()->context()->native_context()->AddOptimizedCode(*info()->code()); |
411 } | 413 } |
412 return SetLastStatus(SUCCEEDED); | 414 return SetLastStatus(SUCCEEDED); |
413 } | 415 } |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 AllowHandleDereference allow_deref; | 1385 AllowHandleDereference allow_deref; |
1384 bool tracing_on = info()->IsStub() | 1386 bool tracing_on = info()->IsStub() |
1385 ? FLAG_trace_hydrogen_stubs | 1387 ? FLAG_trace_hydrogen_stubs |
1386 : (FLAG_trace_hydrogen && | 1388 : (FLAG_trace_hydrogen && |
1387 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1389 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1388 return (tracing_on && | 1390 return (tracing_on && |
1389 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1391 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1390 } | 1392 } |
1391 | 1393 |
1392 } } // namespace v8::internal | 1394 } } // namespace v8::internal |
OLD | NEW |