Skip to content

Commit 73d0c17

Browse files
isheludkoCommit Bot
authored andcommitted
[csa] Remove ParameterMode from CSA::CloneFastJSArray
Bug: v8:9708 Change-Id: I40e45eeb660f22f649b8e9e0a3e14201098f464b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917142 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#64973}
1 parent a50719d commit 73d0c17

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/builtins/builtins-array-gen.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,7 @@ TF_BUILTIN(CloneFastJSArray, ArrayBuiltinsAssembler) {
459459
LoadElementsKind(array))),
460460
Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
461461

462-
ParameterMode mode = OptimalParameterMode();
463-
Return(CloneFastJSArray(context, array, mode));
462+
Return(CloneFastJSArray(context, array));
464463
}
465464

466465
// This builtin copies the backing store of fast arrays, while converting any
@@ -479,8 +478,7 @@ TF_BUILTIN(CloneFastJSArrayFillingHoles, ArrayBuiltinsAssembler) {
479478
LoadElementsKind(array))),
480479
Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
481480

482-
ParameterMode mode = OptimalParameterMode();
483-
Return(CloneFastJSArray(context, array, mode, {},
481+
Return(CloneFastJSArray(context, array, {},
484482
HoleConversionMode::kConvertToUndefined));
485483
}
486484

src/builtins/builtins-constructor-gen.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,10 @@ TNode<JSArray> ConstructorBuiltinsAssembler::EmitCreateShallowArrayLiteral(
345345
TNode<AllocationSite> allocation_site = CAST(maybe_allocation_site);
346346
TNode<JSArray> boilerplate = CAST(LoadBoilerplate(allocation_site));
347347

348-
ParameterMode mode = OptimalParameterMode();
349348
if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
350-
return CloneFastJSArray(context, boilerplate, mode, allocation_site);
349+
return CloneFastJSArray(context, boilerplate, allocation_site);
351350
} else {
352-
return CloneFastJSArray(context, boilerplate, mode);
351+
return CloneFastJSArray(context, boilerplate);
353352
}
354353
}
355354

src/codegen/code-stub-assembler.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4094,12 +4094,14 @@ Node* CodeStubAssembler::ExtractFastJSArray(
40944094
}
40954095

40964096
TNode<JSArray> CodeStubAssembler::CloneFastJSArray(
4097-
TNode<Context> context, TNode<JSArray> array, ParameterMode mode,
4097+
TNode<Context> context, TNode<JSArray> array,
40984098
TNode<AllocationSite> allocation_site, HoleConversionMode convert_holes) {
40994099
// TODO(dhai): we should be able to assert IsFastJSArray(array) here, but this
41004100
// function is also used to copy boilerplates even when the no-elements
41014101
// protector is invalid. This function should be renamed to reflect its uses.
41024102

4103+
// TODO(v8:9708): remove ParameterMode
4104+
ParameterMode mode = OptimalParameterMode();
41034105
TNode<Number> length = LoadJSArrayLength(array);
41044106
TNode<FixedArrayBase> new_elements;
41054107
TVARIABLE(FixedArrayBase, var_new_elements);

src/codegen/code-stub-assembler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
18651865
// function generates significantly less code in this case.
18661866
TNode<JSArray> CloneFastJSArray(
18671867
TNode<Context> context, TNode<JSArray> array,
1868-
ParameterMode mode = INTPTR_PARAMETERS,
18691868
TNode<AllocationSite> allocation_site = {},
18701869
HoleConversionMode convert_holes = HoleConversionMode::kDontConvert);
18711870

0 commit comments

Comments
 (0)