Commit 73d0c171 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[csa] Remove ParameterMode from CSA::CloneFastJSArray

Bug: v8:9708
Change-Id: I40e45eeb660f22f649b8e9e0a3e14201098f464b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917142Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64973}
parent a50719d6
...@@ -459,8 +459,7 @@ TF_BUILTIN(CloneFastJSArray, ArrayBuiltinsAssembler) { ...@@ -459,8 +459,7 @@ TF_BUILTIN(CloneFastJSArray, ArrayBuiltinsAssembler) {
LoadElementsKind(array))), LoadElementsKind(array))),
Word32BinaryNot(IsNoElementsProtectorCellInvalid()))); Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
ParameterMode mode = OptimalParameterMode(); Return(CloneFastJSArray(context, array));
Return(CloneFastJSArray(context, array, mode));
} }
// This builtin copies the backing store of fast arrays, while converting any // This builtin copies the backing store of fast arrays, while converting any
...@@ -479,8 +478,7 @@ TF_BUILTIN(CloneFastJSArrayFillingHoles, ArrayBuiltinsAssembler) { ...@@ -479,8 +478,7 @@ TF_BUILTIN(CloneFastJSArrayFillingHoles, ArrayBuiltinsAssembler) {
LoadElementsKind(array))), LoadElementsKind(array))),
Word32BinaryNot(IsNoElementsProtectorCellInvalid()))); Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
ParameterMode mode = OptimalParameterMode(); Return(CloneFastJSArray(context, array, {},
Return(CloneFastJSArray(context, array, mode, {},
HoleConversionMode::kConvertToUndefined)); HoleConversionMode::kConvertToUndefined));
} }
......
...@@ -345,11 +345,10 @@ TNode<JSArray> ConstructorBuiltinsAssembler::EmitCreateShallowArrayLiteral( ...@@ -345,11 +345,10 @@ TNode<JSArray> ConstructorBuiltinsAssembler::EmitCreateShallowArrayLiteral(
TNode<AllocationSite> allocation_site = CAST(maybe_allocation_site); TNode<AllocationSite> allocation_site = CAST(maybe_allocation_site);
TNode<JSArray> boilerplate = CAST(LoadBoilerplate(allocation_site)); TNode<JSArray> boilerplate = CAST(LoadBoilerplate(allocation_site));
ParameterMode mode = OptimalParameterMode();
if (allocation_site_mode == TRACK_ALLOCATION_SITE) { if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
return CloneFastJSArray(context, boilerplate, mode, allocation_site); return CloneFastJSArray(context, boilerplate, allocation_site);
} else { } else {
return CloneFastJSArray(context, boilerplate, mode); return CloneFastJSArray(context, boilerplate);
} }
} }
......
...@@ -4094,12 +4094,14 @@ Node* CodeStubAssembler::ExtractFastJSArray( ...@@ -4094,12 +4094,14 @@ Node* CodeStubAssembler::ExtractFastJSArray(
} }
TNode<JSArray> CodeStubAssembler::CloneFastJSArray( TNode<JSArray> CodeStubAssembler::CloneFastJSArray(
TNode<Context> context, TNode<JSArray> array, ParameterMode mode, TNode<Context> context, TNode<JSArray> array,
TNode<AllocationSite> allocation_site, HoleConversionMode convert_holes) { TNode<AllocationSite> allocation_site, HoleConversionMode convert_holes) {
// TODO(dhai): we should be able to assert IsFastJSArray(array) here, but this // TODO(dhai): we should be able to assert IsFastJSArray(array) here, but this
// function is also used to copy boilerplates even when the no-elements // function is also used to copy boilerplates even when the no-elements
// protector is invalid. This function should be renamed to reflect its uses. // protector is invalid. This function should be renamed to reflect its uses.
// TODO(v8:9708): remove ParameterMode
ParameterMode mode = OptimalParameterMode();
TNode<Number> length = LoadJSArrayLength(array); TNode<Number> length = LoadJSArrayLength(array);
TNode<FixedArrayBase> new_elements; TNode<FixedArrayBase> new_elements;
TVARIABLE(FixedArrayBase, var_new_elements); TVARIABLE(FixedArrayBase, var_new_elements);
......
...@@ -1865,7 +1865,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1865,7 +1865,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// function generates significantly less code in this case. // function generates significantly less code in this case.
TNode<JSArray> CloneFastJSArray( TNode<JSArray> CloneFastJSArray(
TNode<Context> context, TNode<JSArray> array, TNode<Context> context, TNode<JSArray> array,
ParameterMode mode = INTPTR_PARAMETERS,
TNode<AllocationSite> allocation_site = {}, TNode<AllocationSite> allocation_site = {},
HoleConversionMode convert_holes = HoleConversionMode::kDontConvert); HoleConversionMode convert_holes = HoleConversionMode::kDontConvert);
......
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