| 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 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
| 6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 StackFrame::Type GetOutputStackFrameType() const; | 481 StackFrame::Type GetOutputStackFrameType() const; |
| 482 | 482 |
| 483 protected: | 483 protected: |
| 484 ParseInfo* parse_info_; | 484 ParseInfo* parse_info_; |
| 485 | 485 |
| 486 void DisableFutureOptimization() { | 486 void DisableFutureOptimization() { |
| 487 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { | 487 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { |
| 488 // If Crankshaft tried to optimize this function, bailed out, and | 488 // If Crankshaft tried to optimize this function, bailed out, and |
| 489 // doesn't want to try again, then use TurboFan next time. | 489 // doesn't want to try again, then use TurboFan next time. |
| 490 if (!shared_info()->dont_crankshaft()) { | 490 if (!shared_info()->dont_crankshaft() && |
| 491 bailout_reason() != kOptimizedTooManyTimes) { |
| 491 shared_info()->set_dont_crankshaft(true); | 492 shared_info()->set_dont_crankshaft(true); |
| 492 if (FLAG_trace_opt) { | 493 if (FLAG_trace_opt) { |
| 493 PrintF("[disabled Crankshaft for "); | 494 PrintF("[disabled Crankshaft for "); |
| 494 shared_info()->ShortPrint(); | 495 shared_info()->ShortPrint(); |
| 495 PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason())); | 496 PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason())); |
| 496 } | 497 } |
| 497 } else { | 498 } else { |
| 498 shared_info()->DisableOptimization(bailout_reason()); | 499 shared_info()->DisableOptimization(bailout_reason()); |
| 499 } | 500 } |
| 500 } | 501 } |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 OptimizedCompileJob* job_; | 655 OptimizedCompileJob* job_; |
| 655 base::ElapsedTimer timer_; | 656 base::ElapsedTimer timer_; |
| 656 base::TimeDelta* location_; | 657 base::TimeDelta* location_; |
| 657 }; | 658 }; |
| 658 }; | 659 }; |
| 659 | 660 |
| 660 } // namespace internal | 661 } // namespace internal |
| 661 } // namespace v8 | 662 } // namespace v8 |
| 662 | 663 |
| 663 #endif // V8_COMPILER_H_ | 664 #endif // V8_COMPILER_H_ |
| OLD | NEW |