OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/disasm.h" | 9 #include "src/disasm.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 // references. This is fine because the deoptimizer's code section | 1824 // references. This is fine because the deoptimizer's code section |
1825 // isn't meant to be serialized at all. | 1825 // isn't meant to be serialized at all. |
1826 CHECK(type == EAGER || type == SOFT || type == LAZY); | 1826 CHECK(type == EAGER || type == SOFT || type == LAZY); |
1827 DeoptimizerData* data = isolate->deoptimizer_data(); | 1827 DeoptimizerData* data = isolate->deoptimizer_data(); |
1828 int entry_count = data->deopt_entry_code_entries_[type]; | 1828 int entry_count = data->deopt_entry_code_entries_[type]; |
1829 if (max_entry_id < entry_count) return; | 1829 if (max_entry_id < entry_count) return; |
1830 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries); | 1830 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries); |
1831 while (max_entry_id >= entry_count) entry_count *= 2; | 1831 while (max_entry_id >= entry_count) entry_count *= 2; |
1832 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries); | 1832 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries); |
1833 | 1833 |
1834 MacroAssembler masm(isolate, NULL, 16 * KB); | 1834 MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes); |
1835 masm.set_emit_debug_code(false); | 1835 masm.set_emit_debug_code(false); |
1836 GenerateDeoptimizationEntries(&masm, entry_count, type); | 1836 GenerateDeoptimizationEntries(&masm, entry_count, type); |
1837 CodeDesc desc; | 1837 CodeDesc desc; |
1838 masm.GetCode(&desc); | 1838 masm.GetCode(&desc); |
1839 DCHECK(!RelocInfo::RequiresRelocation(desc)); | 1839 DCHECK(!RelocInfo::RequiresRelocation(desc)); |
1840 | 1840 |
1841 MemoryChunk* chunk = data->deopt_entry_code_[type]; | 1841 MemoryChunk* chunk = data->deopt_entry_code_[type]; |
1842 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >= | 1842 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >= |
1843 desc.instr_size); | 1843 desc.instr_size); |
1844 if (!chunk->CommitArea(desc.instr_size)) { | 1844 if (!chunk->CommitArea(desc.instr_size)) { |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3395 DCHECK(value_info->IsMaterializedObject()); | 3395 DCHECK(value_info->IsMaterializedObject()); |
3396 | 3396 |
3397 value_info->value_ = | 3397 value_info->value_ = |
3398 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3398 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
3399 } | 3399 } |
3400 } | 3400 } |
3401 } | 3401 } |
3402 | 3402 |
3403 } // namespace internal | 3403 } // namespace internal |
3404 } // namespace v8 | 3404 } // namespace v8 |
OLD | NEW |