Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: src/deoptimizer.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 int entry_count = data->deopt_entry_code_entries_[type]; 2313 int entry_count = data->deopt_entry_code_entries_[type];
2314 if (max_entry_id < entry_count) return; 2314 if (max_entry_id < entry_count) return;
2315 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries); 2315 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries);
2316 while (max_entry_id >= entry_count) entry_count *= 2; 2316 while (max_entry_id >= entry_count) entry_count *= 2;
2317 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries); 2317 CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries);
2318 2318
2319 MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes); 2319 MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes);
2320 masm.set_emit_debug_code(false); 2320 masm.set_emit_debug_code(false);
2321 GenerateDeoptimizationEntries(&masm, entry_count, type); 2321 GenerateDeoptimizationEntries(&masm, entry_count, type);
2322 CodeDesc desc; 2322 CodeDesc desc;
2323 masm.GetCode(&desc); 2323 masm.GetCode(isolate, &desc);
2324 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); 2324 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
2325 2325
2326 MemoryChunk* chunk = data->deopt_entry_code_[type]; 2326 MemoryChunk* chunk = data->deopt_entry_code_[type];
2327 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >= 2327 CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >=
2328 desc.instr_size); 2328 desc.instr_size);
2329 if (!chunk->CommitArea(desc.instr_size)) { 2329 if (!chunk->CommitArea(desc.instr_size)) {
2330 V8::FatalProcessOutOfMemory( 2330 V8::FatalProcessOutOfMemory(
2331 "Deoptimizer::EnsureCodeForDeoptimizationEntry"); 2331 "Deoptimizer::EnsureCodeForDeoptimizationEntry");
2332 } 2332 }
2333 CopyBytes(chunk->area_start(), desc.buffer, 2333 CopyBytes(chunk->area_start(), desc.buffer,
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 CHECK(value_info->IsMaterializedObject()); 4456 CHECK(value_info->IsMaterializedObject());
4457 4457
4458 value_info->value_ = 4458 value_info->value_ =
4459 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4459 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4460 } 4460 }
4461 } 4461 }
4462 } 4462 }
4463 4463
4464 } // namespace internal 4464 } // namespace internal
4465 } // namespace v8 4465 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698