Commit d9a5a48d authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[builtins] Refer to parameters via Descriptor in TFC builtins.

Bug: v8:7754
Change-Id: Ie8224f2cda1132f0ac8f5508b54c31a6164a944e
Reviewed-on: https://chromium-review.googlesource.com/1104160Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53783}
parent 7619bde8
......@@ -356,22 +356,20 @@ void CallOrConstructBuiltinsAssembler::CallOrConstructWithSpread(
}
TF_BUILTIN(CallWithArrayLike, CallOrConstructBuiltinsAssembler) {
TNode<Object> target = CAST(Parameter(CallWithArrayLikeDescriptor::kTarget));
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = nullptr;
TNode<Object> arguments_list =
CAST(Parameter(CallWithArrayLikeDescriptor::kArgumentsList));
TNode<Context> context =
CAST(Parameter(CallWithArrayLikeDescriptor::kContext));
TNode<Object> arguments_list = CAST(Parameter(Descriptor::kArgumentsList));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
CallOrConstructWithArrayLike(target, new_target, arguments_list, context);
}
TF_BUILTIN(CallWithSpread, CallOrConstructBuiltinsAssembler) {
TNode<Object> target = CAST(Parameter(CallWithSpreadDescriptor::kTarget));
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = nullptr;
TNode<Object> spread = CAST(Parameter(CallWithSpreadDescriptor::kSpread));
TNode<Int32T> args_count = UncheckedCast<Int32T>(
Parameter(CallWithSpreadDescriptor::kArgumentsCount));
TNode<Context> context = CAST(Parameter(CallWithSpreadDescriptor::kContext));
TNode<Object> spread = CAST(Parameter(Descriptor::kSpread));
TNode<Int32T> args_count =
UncheckedCast<Int32T>(Parameter(Descriptor::kArgumentsCount));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
CallOrConstructWithSpread(target, new_target, spread, args_count, context);
}
......
......@@ -36,28 +36,20 @@ void Builtins::Generate_ConstructFunctionForwardVarargs(MacroAssembler* masm) {
}
TF_BUILTIN(ConstructWithArrayLike, CallOrConstructBuiltinsAssembler) {
TNode<Object> target =
CAST(Parameter(ConstructWithArrayLikeDescriptor::kTarget));
SloppyTNode<Object> new_target =
CAST(Parameter(ConstructWithArrayLikeDescriptor::kNewTarget));
TNode<Object> arguments_list =
CAST(Parameter(ConstructWithArrayLikeDescriptor::kArgumentsList));
TNode<Context> context =
CAST(Parameter(ConstructWithArrayLikeDescriptor::kContext));
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> arguments_list = CAST(Parameter(Descriptor::kArgumentsList));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
CallOrConstructWithArrayLike(target, new_target, arguments_list, context);
}
TF_BUILTIN(ConstructWithSpread, CallOrConstructBuiltinsAssembler) {
TNode<Object> target =
CAST(Parameter(ConstructWithSpreadDescriptor::kTarget));
SloppyTNode<Object> new_target =
CAST(Parameter(ConstructWithSpreadDescriptor::kNewTarget));
TNode<Object> spread =
CAST(Parameter(ConstructWithSpreadDescriptor::kSpread));
TNode<Int32T> args_count = UncheckedCast<Int32T>(
Parameter(ConstructWithSpreadDescriptor::kArgumentsCount));
TNode<Context> context =
CAST(Parameter(ConstructWithSpreadDescriptor::kContext));
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> spread = CAST(Parameter(Descriptor::kSpread));
TNode<Int32T> args_count =
UncheckedCast<Int32T>(Parameter(Descriptor::kArgumentsCount));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
CallOrConstructWithSpread(target, new_target, spread, args_count, context);
}
......@@ -285,17 +277,17 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewFunctionContext(
}
TF_BUILTIN(FastNewFunctionContextEval, ConstructorBuiltinsAssembler) {
Node* scope_info = Parameter(FastNewFunctionContextDescriptor::kScopeInfo);
Node* slots = Parameter(FastNewFunctionContextDescriptor::kSlots);
Node* context = Parameter(FastNewFunctionContextDescriptor::kContext);
Node* scope_info = Parameter(Descriptor::kScopeInfo);
Node* slots = Parameter(Descriptor::kSlots);
Node* context = Parameter(Descriptor::kContext);
Return(EmitFastNewFunctionContext(scope_info, slots, context,
ScopeType::EVAL_SCOPE));
}
TF_BUILTIN(FastNewFunctionContextFunction, ConstructorBuiltinsAssembler) {
Node* scope_info = Parameter(FastNewFunctionContextDescriptor::kScopeInfo);
Node* slots = Parameter(FastNewFunctionContextDescriptor::kSlots);
Node* context = Parameter(FastNewFunctionContextDescriptor::kContext);
Node* scope_info = Parameter(Descriptor::kScopeInfo);
Node* slots = Parameter(Descriptor::kSlots);
Node* context = Parameter(Descriptor::kContext);
Return(EmitFastNewFunctionContext(scope_info, slots, context,
ScopeType::FUNCTION_SCOPE));
}
......
......@@ -392,7 +392,7 @@ TF_BUILTIN(ToObject, CodeStubAssembler) {
// ES6 section 12.5.5 typeof operator
TF_BUILTIN(Typeof, CodeStubAssembler) {
Node* object = Parameter(TypeofDescriptor::kObject);
Node* object = Parameter(Descriptor::kObject);
Return(Typeof(object));
}
......
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