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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/assembler-inl.h" | 10 #include "src/assembler-inl.h" |
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2274 if (max_entry_id < entry_count) return; | 2274 if (max_entry_id < entry_count) return; |
2275 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries); | 2275 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries); |
2276 while (max_entry_id >= entry_count) entry_count *= 2; | 2276 while (max_entry_id >= entry_count) entry_count *= 2; |
2277 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries); | 2277 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries); |
2278 | 2278 |
2279 MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes); | 2279 MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes); |
2280 masm.set_emit_debug_code(false); | 2280 masm.set_emit_debug_code(false); |
2281 GenerateDeoptimizationEntries(&masm, entry_count, type); | 2281 GenerateDeoptimizationEntries(&masm, entry_count, type); |
2282 CodeDesc desc; | 2282 CodeDesc desc; |
2283 masm.GetCode(&desc); | 2283 masm.GetCode(&desc); |
2284 DCHECK(!RelocInfo::RequiresRelocation(desc)); | 2284 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); |
2285 | 2285 |
2286 MemoryChunk* chunk = data->deopt_entry_code_[type]; | 2286 MemoryChunk* chunk = data->deopt_entry_code_[type]; |
2287 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >= | 2287 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >= |
2288 desc.instr_size); | 2288 desc.instr_size); |
2289 if (!chunk->CommitArea(desc.instr_size)) { | 2289 if (!chunk->CommitArea(desc.instr_size)) { |
2290 V8::FatalProcessOutOfMemory( | 2290 V8::FatalProcessOutOfMemory( |
2291 "Deoptimizer::EnsureCodeForDeoptimizationEntry"); | 2291 "Deoptimizer::EnsureCodeForDeoptimizationEntry"); |
2292 } | 2292 } |
2293 CopyBytes(chunk->area_start(), desc.buffer, | 2293 CopyBytes(chunk->area_start(), desc.buffer, |
2294 static_cast<size_t>(desc.instr_size)); | 2294 static_cast<size_t>(desc.instr_size)); |
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4424 CHECK(value_info->IsMaterializedObject()); | 4424 CHECK(value_info->IsMaterializedObject()); |
4425 | 4425 |
4426 value_info->value_ = | 4426 value_info->value_ = |
4427 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 4427 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
4428 } | 4428 } |
4429 } | 4429 } |
4430 } | 4430 } |
4431 | 4431 |
4432 } // namespace internal | 4432 } // namespace internal |
4433 } // namespace v8 | 4433 } // namespace v8 |
OLD | NEW |