Commit 24714efa authored by Daniel Clifford's avatar Daniel Clifford Committed by Commit Bot

Remove unused parameter from AllocateUninitializedJSArray* variants

Change-Id: I9eec3c31cdf1441d3187e5d882ca4b88e7b698e7
Reviewed-on: https://chromium-review.googlesource.com/691726Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48225}
parent 69aa6e57
...@@ -471,7 +471,7 @@ Node* ConstructorBuiltinsAssembler::EmitCreateShallowArrayLiteral( ...@@ -471,7 +471,7 @@ Node* ConstructorBuiltinsAssembler::EmitCreateShallowArrayLiteral(
BIND(&allocate_without_elements); BIND(&allocate_without_elements);
{ {
Node* array = AllocateUninitializedJSArrayWithoutElements( Node* array = AllocateUninitializedJSArrayWithoutElements(
PACKED_ELEMENTS, boilerplate_map, length.value(), allocation_site); boilerplate_map, length.value(), allocation_site);
StoreObjectField(array, JSObject::kElementsOffset, elements.value()); StoreObjectField(array, JSObject::kElementsOffset, elements.value());
result.Bind(array); result.Bind(array);
Goto(&return_result); Goto(&return_result);
......
...@@ -187,7 +187,7 @@ TF_BUILTIN(ObjectKeys, ObjectBuiltinsAssembler) { ...@@ -187,7 +187,7 @@ TF_BUILTIN(ObjectKeys, ObjectBuiltinsAssembler) {
Node* native_context = LoadNativeContext(context); Node* native_context = LoadNativeContext(context);
Node* array_map = LoadJSArrayElementsMap(PACKED_ELEMENTS, native_context); Node* array_map = LoadJSArrayElementsMap(PACKED_ELEMENTS, native_context);
Node* array = AllocateUninitializedJSArrayWithoutElements( Node* array = AllocateUninitializedJSArrayWithoutElements(
PACKED_ELEMENTS, array_map, var_length.value(), nullptr); array_map, var_length.value(), nullptr);
StoreObjectFieldNoWriteBarrier(array, JSArray::kElementsOffset, StoreObjectFieldNoWriteBarrier(array, JSArray::kElementsOffset,
var_elements.value()); var_elements.value());
Return(array); Return(array);
......
...@@ -1906,7 +1906,7 @@ class GrowableFixedArray { ...@@ -1906,7 +1906,7 @@ class GrowableFixedArray {
Node* const result_length = a->SmiTag(length()); Node* const result_length = a->SmiTag(length());
Node* const result = a->AllocateUninitializedJSArrayWithoutElements( Node* const result = a->AllocateUninitializedJSArrayWithoutElements(
kind, array_map, result_length, nullptr); array_map, result_length, nullptr);
// Note: We do not currently shrink the fixed array. // Note: We do not currently shrink the fixed array.
......
...@@ -2431,7 +2431,7 @@ void CodeStubAssembler::StoreFieldsNoWriteBarrier(Node* start_address, ...@@ -2431,7 +2431,7 @@ void CodeStubAssembler::StoreFieldsNoWriteBarrier(Node* start_address,
} }
Node* CodeStubAssembler::AllocateUninitializedJSArrayWithoutElements( Node* CodeStubAssembler::AllocateUninitializedJSArrayWithoutElements(
ElementsKind kind, Node* array_map, Node* length, Node* allocation_site) { Node* array_map, Node* length, Node* allocation_site) {
Comment("begin allocation of JSArray without elements"); Comment("begin allocation of JSArray without elements");
CSA_SLOW_ASSERT(this, TaggedIsPositiveSmi(length)); CSA_SLOW_ASSERT(this, TaggedIsPositiveSmi(length));
CSA_SLOW_ASSERT(this, IsMap(array_map)); CSA_SLOW_ASSERT(this, IsMap(array_map));
...@@ -2441,8 +2441,8 @@ Node* CodeStubAssembler::AllocateUninitializedJSArrayWithoutElements( ...@@ -2441,8 +2441,8 @@ Node* CodeStubAssembler::AllocateUninitializedJSArrayWithoutElements(
} }
Node* size = IntPtrConstant(base_size); Node* size = IntPtrConstant(base_size);
Node* array = AllocateUninitializedJSArray(kind, array_map, length, Node* array =
allocation_site, size); AllocateUninitializedJSArray(array_map, length, allocation_site, size);
return array; return array;
} }
...@@ -2465,8 +2465,8 @@ CodeStubAssembler::AllocateUninitializedJSArrayWithElements( ...@@ -2465,8 +2465,8 @@ CodeStubAssembler::AllocateUninitializedJSArrayWithElements(
base_size += FixedArray::kHeaderSize; base_size += FixedArray::kHeaderSize;
Node* size = ElementOffsetFromIndex(capacity, kind, capacity_mode, base_size); Node* size = ElementOffsetFromIndex(capacity, kind, capacity_mode, base_size);
Node* array = AllocateUninitializedJSArray(kind, array_map, length, Node* array =
allocation_site, size); AllocateUninitializedJSArray(array_map, length, allocation_site, size);
Node* elements = InnerAllocate(array, elements_offset); Node* elements = InnerAllocate(array, elements_offset);
StoreObjectFieldNoWriteBarrier(array, JSObject::kElementsOffset, elements); StoreObjectFieldNoWriteBarrier(array, JSObject::kElementsOffset, elements);
...@@ -2484,8 +2484,7 @@ CodeStubAssembler::AllocateUninitializedJSArrayWithElements( ...@@ -2484,8 +2484,7 @@ CodeStubAssembler::AllocateUninitializedJSArrayWithElements(
return {array, elements}; return {array, elements};
} }
Node* CodeStubAssembler::AllocateUninitializedJSArray(ElementsKind kind, Node* CodeStubAssembler::AllocateUninitializedJSArray(Node* array_map,
Node* array_map,
Node* length, Node* length,
Node* allocation_site, Node* allocation_site,
Node* size_in_bytes) { Node* size_in_bytes) {
...@@ -2523,7 +2522,7 @@ Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind, Node* array_map, ...@@ -2523,7 +2522,7 @@ Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind, Node* array_map,
if (IsIntPtrOrSmiConstantZero(capacity)) { if (IsIntPtrOrSmiConstantZero(capacity)) {
// Array is empty. Use the shared empty fixed array instead of allocating a // Array is empty. Use the shared empty fixed array instead of allocating a
// new one. // new one.
array = AllocateUninitializedJSArrayWithoutElements(kind, array_map, length, array = AllocateUninitializedJSArrayWithoutElements(array_map, length,
allocation_site); allocation_site);
StoreObjectFieldRoot(array, JSArray::kElementsOffset, StoreObjectFieldRoot(array, JSArray::kElementsOffset,
Heap::kEmptyFixedArrayRootIndex); Heap::kEmptyFixedArrayRootIndex);
...@@ -2548,7 +2547,7 @@ Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind, Node* array_map, ...@@ -2548,7 +2547,7 @@ Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind, Node* array_map,
// Array is empty. Use the shared empty fixed array instead of allocating // Array is empty. Use the shared empty fixed array instead of allocating
// a new one. // a new one.
var_array.Bind(AllocateUninitializedJSArrayWithoutElements( var_array.Bind(AllocateUninitializedJSArrayWithoutElements(
kind, array_map, length, allocation_site)); array_map, length, allocation_site));
StoreObjectFieldRoot(var_array.value(), JSArray::kElementsOffset, StoreObjectFieldRoot(var_array.value(), JSArray::kElementsOffset,
Heap::kEmptyFixedArrayRootIndex); Heap::kEmptyFixedArrayRootIndex);
Goto(&out); Goto(&out);
......
...@@ -706,8 +706,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -706,8 +706,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
int start_offset = JSObject::kHeaderSize); int start_offset = JSObject::kHeaderSize);
// Allocate a JSArray without elements and initialize the header fields. // Allocate a JSArray without elements and initialize the header fields.
Node* AllocateUninitializedJSArrayWithoutElements(ElementsKind kind, Node* AllocateUninitializedJSArrayWithoutElements(Node* array_map,
Node* array_map,
Node* length, Node* length,
Node* allocation_site); Node* allocation_site);
// Allocate and return a JSArray with initialized header fields and its // Allocate and return a JSArray with initialized header fields and its
...@@ -1685,8 +1684,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -1685,8 +1684,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* top_address, Node* limit_address); Node* top_address, Node* limit_address);
// Allocate and return a JSArray of given total size in bytes with header // Allocate and return a JSArray of given total size in bytes with header
// fields initialized. // fields initialized.
Node* AllocateUninitializedJSArray(ElementsKind kind, Node* array_map, Node* AllocateUninitializedJSArray(Node* array_map, Node* length,
Node* length, Node* allocation_site, Node* allocation_site,
Node* size_in_bytes); Node* size_in_bytes);
Node* SmiShiftBitsConstant(); Node* SmiShiftBitsConstant();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment