Chromium Code Reviews| 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/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2799 { | 2799 { |
| 2800 HandleScope scope(this); | 2800 HandleScope scope(this); |
| 2801 ast_string_constants_ = new AstStringConstants(this, heap()->HashSeed()); | 2801 ast_string_constants_ = new AstStringConstants(this, heap()->HashSeed()); |
| 2802 } | 2802 } |
| 2803 | 2803 |
| 2804 if (!create_heap_objects) { | 2804 if (!create_heap_objects) { |
| 2805 // Now that the heap is consistent, it's OK to generate the code for the | 2805 // Now that the heap is consistent, it's OK to generate the code for the |
| 2806 // deopt entry table that might have been referred to by optimized code in | 2806 // deopt entry table that might have been referred to by optimized code in |
| 2807 // the snapshot. | 2807 // the snapshot. |
| 2808 HandleScope scope(this); | 2808 HandleScope scope(this); |
| 2809 Deoptimizer::EnsureCodeForDeoptimizationEntry( | 2809 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { |
| 2810 this, Deoptimizer::LAZY, | 2810 Deoptimizer::BailoutType bailout_type = |
| 2811 ExternalReferenceTable::kDeoptTableSerializeEntryCount - 1); | 2811 static_cast<Deoptimizer::BailoutType>(i); |
| 2812 Deoptimizer::EnsureCodeForDeoptimizationEntry( | |
| 2813 this, bailout_type, des->max_deopt_entry_id(bailout_type)); | |
|
Yang
2017/03/31 06:58:16
Can't we create deoptimization entries on demand i
| |
| 2814 } | |
| 2812 } | 2815 } |
| 2813 | 2816 |
| 2814 if (!serializer_enabled()) { | 2817 if (!serializer_enabled()) { |
| 2815 // Ensure that all stubs which need to be generated ahead of time, but | 2818 // Ensure that all stubs which need to be generated ahead of time, but |
| 2816 // cannot be serialized into the snapshot have been generated. | 2819 // cannot be serialized into the snapshot have been generated. |
| 2817 HandleScope scope(this); | 2820 HandleScope scope(this); |
| 2818 CodeStub::GenerateFPStubs(this); | 2821 CodeStub::GenerateFPStubs(this); |
| 2819 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); | 2822 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); |
| 2820 StubFailureTrampolineStub::GenerateAheadOfTime(this); | 2823 StubFailureTrampolineStub::GenerateAheadOfTime(this); |
| 2821 } | 2824 } |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3731 // Then check whether this scope intercepts. | 3734 // Then check whether this scope intercepts. |
| 3732 if ((flag & intercept_mask_)) { | 3735 if ((flag & intercept_mask_)) { |
| 3733 intercepted_flags_ |= flag; | 3736 intercepted_flags_ |= flag; |
| 3734 return true; | 3737 return true; |
| 3735 } | 3738 } |
| 3736 return false; | 3739 return false; |
| 3737 } | 3740 } |
| 3738 | 3741 |
| 3739 } // namespace internal | 3742 } // namespace internal |
| 3740 } // namespace v8 | 3743 } // namespace v8 |
| OLD | NEW |