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 "allocation.h" | 8 #include "allocation.h" |
9 #include "ast.h" | 9 #include "ast.h" |
10 #include "zone.h" | 10 #include "zone.h" |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 531 |
532 MUST_USE_RESULT Status AbortOptimization( | 532 MUST_USE_RESULT Status AbortOptimization( |
533 BailoutReason reason = kNoReason) { | 533 BailoutReason reason = kNoReason) { |
534 if (reason != kNoReason) info_->set_bailout_reason(reason); | 534 if (reason != kNoReason) info_->set_bailout_reason(reason); |
535 return SetLastStatus(BAILED_OUT); | 535 return SetLastStatus(BAILED_OUT); |
536 } | 536 } |
537 | 537 |
538 MUST_USE_RESULT Status AbortAndDisableOptimization( | 538 MUST_USE_RESULT Status AbortAndDisableOptimization( |
539 BailoutReason reason = kNoReason) { | 539 BailoutReason reason = kNoReason) { |
540 if (reason != kNoReason) info_->set_bailout_reason(reason); | 540 if (reason != kNoReason) info_->set_bailout_reason(reason); |
| 541 // Reference to shared function info does not change between phases. |
| 542 AllowDeferredHandleDereference allow_handle_dereference; |
541 info_->shared_info()->DisableOptimization(info_->bailout_reason()); | 543 info_->shared_info()->DisableOptimization(info_->bailout_reason()); |
542 return SetLastStatus(BAILED_OUT); | 544 return SetLastStatus(BAILED_OUT); |
543 } | 545 } |
544 | 546 |
545 void WaitForInstall() { | 547 void WaitForInstall() { |
546 ASSERT(info_->is_osr()); | 548 ASSERT(info_->is_osr()); |
547 awaiting_install_ = true; | 549 awaiting_install_ = true; |
548 } | 550 } |
549 | 551 |
550 bool IsWaitingForInstall() { return awaiting_install_; } | 552 bool IsWaitingForInstall() { return awaiting_install_; } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 unsigned info_zone_start_allocation_size_; | 676 unsigned info_zone_start_allocation_size_; |
675 ElapsedTimer timer_; | 677 ElapsedTimer timer_; |
676 | 678 |
677 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 679 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
678 }; | 680 }; |
679 | 681 |
680 | 682 |
681 } } // namespace v8::internal | 683 } } // namespace v8::internal |
682 | 684 |
683 #endif // V8_COMPILER_H_ | 685 #endif // V8_COMPILER_H_ |
OLD | NEW |