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

Side by Side Diff: src/deoptimizer.cc

Issue 1476763002: Make whether or not a Code object should be created by masm explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enum class FTW Created 5 years 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/crankshaft/lithium.cc ('k') | src/full-codegen/full-codegen.cc » ('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 "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
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/lithium.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698