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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 1899813003: [crankshaft] Fragmentation-free allocation folding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/crankshaft/arm/lithium-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index ed7c4c269c8d7d87e57ab84fab2f2272513ab3f4..6680e66dc3d5fcbe897f7d8aea415b6889edb9d6 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -443,7 +443,7 @@ HValue* CodeStubGraphBuilder<FastCloneRegExpStub>::BuildCodeStub() {
JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize;
HValue* result =
Add<HAllocate>(Add<HConstant>(result_size), HType::JSObject(),
- NOT_TENURED, JS_REGEXP_TYPE);
+ NOT_TENURED, JS_REGEXP_TYPE, graph()->GetConstant0());
Add<HStoreNamedField>(
result, HObjectAccess::ForMap(),
Add<HLoadNamedField>(boilerplate, nullptr, HObjectAccess::ForMap()));
@@ -556,8 +556,9 @@ HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() {
info()->MarkMustNotHaveEagerFrame();
HValue* size = Add<HConstant>(AllocationSite::kSize);
- HInstruction* object = Add<HAllocate>(size, HType::JSObject(), TENURED,
- JS_OBJECT_TYPE);
+ HInstruction* object =
+ Add<HAllocate>(size, HType::JSObject(), TENURED, JS_OBJECT_TYPE,
+ graph()->GetConstant0());
// Store the map
Handle<Map> allocation_site_map = isolate()->factory()->allocation_site_map();
@@ -635,7 +636,8 @@ HValue* CodeStubGraphBuilder<CreateWeakCellStub>::BuildCodeStub() {
HValue* size = Add<HConstant>(WeakCell::kSize);
HInstruction* object =
- Add<HAllocate>(size, HType::JSObject(), TENURED, JS_OBJECT_TYPE);
+ Add<HAllocate>(size, HType::JSObject(), TENURED, JS_OBJECT_TYPE,
+ graph()->GetConstant0());
Handle<Map> weak_cell_map = isolate()->factory()->weak_cell_map();
AddStoreMapConstant(object, weak_cell_map);
@@ -1167,7 +1169,7 @@ void CodeStubGraphBuilderBase::BuildStoreNamedField(
// TODO(hpayer): Allocation site pretenuring support.
HInstruction* heap_number =
Add<HAllocate>(heap_number_size, HType::HeapObject(), NOT_TENURED,
- MUTABLE_HEAP_NUMBER_TYPE);
+ MUTABLE_HEAP_NUMBER_TYPE, graph()->GetConstant0());
AddStoreMapConstant(heap_number,
isolate()->factory()->mutable_heap_number_map());
Add<HStoreNamedField>(heap_number, HObjectAccess::ForHeapNumberValue(),
@@ -1379,7 +1381,6 @@ HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor(
? JSArrayBuilder::FILL_WITH_HOLE
: JSArrayBuilder::DONT_FILL_WITH_HOLE;
HValue* new_object = array_builder->AllocateArray(checked_length,
- max_alloc_length,
checked_length,
fill_mode);
HValue* elements = array_builder->GetElementsLocation();
@@ -1896,7 +1897,8 @@ HValue* CodeStubGraphBuilder<FastNewClosureStub>::BuildCodeStub() {
// Create a new closure from the given function info in new space
HValue* size = Add<HConstant>(JSFunction::kSize);
HInstruction* js_function =
- Add<HAllocate>(size, HType::JSObject(), NOT_TENURED, JS_FUNCTION_TYPE);
+ Add<HAllocate>(size, HType::JSObject(), NOT_TENURED, JS_FUNCTION_TYPE,
+ graph()->GetConstant0());
int map_index = Context::FunctionMapIndex(casted_stub()->language_mode(),
casted_stub()->kind());
@@ -1949,7 +1951,8 @@ HValue* CodeStubGraphBuilder<FastNewContextStub>::BuildCodeStub() {
// Allocate the context in new space.
HAllocate* function_context = Add<HAllocate>(
Add<HConstant>(length * kPointerSize + FixedArray::kHeaderSize),
- HType::HeapObject(), NOT_TENURED, FIXED_ARRAY_TYPE);
+ HType::HeapObject(), NOT_TENURED, FIXED_ARRAY_TYPE,
+ graph()->GetConstant0());
// Set up the object header.
AddStoreMapConstant(function_context,
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/crankshaft/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698