[csa] Remove ParameterMode from src/builtins/builtins-proxy-gen.*

Bug: v8:9708
Change-Id: I874a04b817cc7b38011f7db9226540aa92608ac0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917143
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64975}
This commit is contained in:
Igor Sheludko 2019-11-15 01:03:06 +01:00 committed by Commit Bot
parent 477c4d7c8e
commit d4b6f4756b
2 changed files with 14 additions and 12 deletions

View File

@ -59,28 +59,29 @@ TNode<JSProxy> ProxiesCodeStubAssembler::AllocateProxy(
}
TNode<JSArray> ProxiesCodeStubAssembler::AllocateJSArrayForCodeStubArguments(
TNode<Context> context, const CodeStubArguments& args, TNode<IntPtrT> argc,
ParameterMode mode) {
TNode<Context> context, const CodeStubArguments& args,
TNode<IntPtrT> argc) {
Comment("AllocateJSArrayForCodeStubArguments");
CSA_ASSERT(this, IsValidPositiveSmi(argc));
Label if_empty_array(this), allocate_js_array(this);
// Do not use AllocateJSArray since {elements} might end up in LOS.
TVARIABLE(FixedArrayBase, elements);
TNode<Smi> length = ParameterToTagged(argc, mode);
GotoIf(SmiEqual(length, SmiConstant(0)), &if_empty_array);
GotoIf(WordEqual(argc, IntPtrConstant(0)), &if_empty_array);
{
Label if_large_object(this, Label::kDeferred);
TNode<FixedArrayBase> allocated_elements = AllocateFixedArray(
PACKED_ELEMENTS, argc, mode, kAllowLargeObjectAllocation);
PACKED_ELEMENTS, argc, INTPTR_PARAMETERS, kAllowLargeObjectAllocation);
elements = allocated_elements;
TVARIABLE(IntPtrT, offset,
IntPtrConstant(FixedArrayBase::kHeaderSize - kHeapObjectTag));
VariableList list({&offset}, zone());
GotoIf(SmiGreaterThan(length, SmiConstant(FixedArray::kMaxRegularLength)),
&if_large_object);
GotoIf(
UintPtrGreaterThan(argc, IntPtrConstant(FixedArray::kMaxRegularLength)),
&if_large_object);
args.ForEach(list, [&](TNode<Object> arg) {
StoreNoWriteBarrier(MachineRepresentation::kTagged, allocated_elements,
offset.value(), arg);
@ -109,6 +110,7 @@ TNode<JSArray> ProxiesCodeStubAssembler::AllocateJSArrayForCodeStubArguments(
TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> array_map =
LoadJSArrayElementsMap(PACKED_ELEMENTS, native_context);
TNode<Smi> length = SmiTag(argc);
TNode<JSArray> array = AllocateJSArray(array_map, elements.value(), length);
return array;
@ -174,8 +176,8 @@ TF_BUILTIN(CallProxy, ProxiesCodeStubAssembler) {
TNode<Object> receiver = args.GetReceiver();
// 7. Let argArray be CreateArrayFromList(argumentsList).
TNode<JSArray> array = AllocateJSArrayForCodeStubArguments(
context, args, argc_ptr, INTPTR_PARAMETERS);
TNode<JSArray> array =
AllocateJSArrayForCodeStubArguments(context, args, argc_ptr);
// 8. Return Call(trap, handler, «target, thisArgument, argArray»).
TNode<Object> result = CallJS(CodeFactory::Call(isolate()), context, trap,
@ -227,8 +229,8 @@ TF_BUILTIN(ConstructProxy, ProxiesCodeStubAssembler) {
CodeStubArguments args(this, argc_ptr);
// 7. Let argArray be CreateArrayFromList(argumentsList).
TNode<JSArray> array = AllocateJSArrayForCodeStubArguments(
context, args, argc_ptr, INTPTR_PARAMETERS);
TNode<JSArray> array =
AllocateJSArrayForCodeStubArguments(context, args, argc_ptr);
// 8. Let newObj be ? Call(trap, handler, « target, argArray, newTarget »).
TNode<Object> new_obj = CallJS(CodeFactory::Call(isolate()), context, trap,

View File

@ -41,7 +41,7 @@ class ProxiesCodeStubAssembler : public CodeStubAssembler {
TNode<JSArray> AllocateJSArrayForCodeStubArguments(
TNode<Context> context, const CodeStubArguments& args,
TNode<IntPtrT> argc, ParameterMode mode);
TNode<IntPtrT> argc);
private:
TNode<Context> CreateProxyRevokeFunctionContext(