Commit bc72a831 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[csa] Make use of CallBuiltin (rather than CallStub) in more places.

This is a cosmetic change only.

Change-Id: I9a0ea9a23b4fc1490759433153c7d47e492b853d
Reviewed-on: https://chromium-review.googlesource.com/936624
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51733}
parent fdc556b4
......@@ -2569,14 +2569,12 @@ TF_BUILTIN(ArrayReducePreLoopEagerDeoptContinuation, ArrayBuiltinsAssembler) {
Node* callbackfn = Parameter(Descriptor::kCallbackFn);
Node* len = Parameter(Descriptor::kLength);
Callable stub(
Builtins::CallableFor(isolate(), Builtins::kArrayReduceLoopContinuation));
// Simulate starting the loop at 0, but ensuring that the accumulator is
// the hole. The continuation stub will search for the initial non-hole
// element, rightly throwing an exception if not found.
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
TheHoleConstant(), receiver, SmiConstant(0), len,
UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceLoopContinuation, context, receiver,
callbackfn, UndefinedConstant(), TheHoleConstant(),
receiver, SmiConstant(0), len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduceLoopEagerDeoptContinuation, ArrayBuiltinsAssembler) {
......@@ -2587,10 +2585,9 @@ TF_BUILTIN(ArrayReduceLoopEagerDeoptContinuation, ArrayBuiltinsAssembler) {
Node* initial_k = Parameter(Descriptor::kInitialK);
Node* len = Parameter(Descriptor::kLength);
Callable stub(
Builtins::CallableFor(isolate(), Builtins::kArrayReduceLoopContinuation));
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
accumulator, receiver, initial_k, len, UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceLoopContinuation, context, receiver,
callbackfn, UndefinedConstant(), accumulator, receiver,
initial_k, len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduceLoopLazyDeoptContinuation, ArrayBuiltinsAssembler) {
......@@ -2601,10 +2598,9 @@ TF_BUILTIN(ArrayReduceLoopLazyDeoptContinuation, ArrayBuiltinsAssembler) {
Node* len = Parameter(Descriptor::kLength);
Node* result = Parameter(Descriptor::kResult);
Callable stub(
Builtins::CallableFor(isolate(), Builtins::kArrayReduceLoopContinuation));
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
result, receiver, initial_k, len, UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceLoopContinuation, context, receiver,
callbackfn, UndefinedConstant(), result, receiver,
initial_k, len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduce, ArrayBuiltinsAssembler) {
......@@ -2676,14 +2672,13 @@ TF_BUILTIN(ArrayReduceRightPreLoopEagerDeoptContinuation,
Node* callbackfn = Parameter(Descriptor::kCallbackFn);
Node* len = Parameter(Descriptor::kLength);
Callable stub(Builtins::CallableFor(
isolate(), Builtins::kArrayReduceRightLoopContinuation));
// Simulate starting the loop at 0, but ensuring that the accumulator is
// the hole. The continuation stub will search for the initial non-hole
// element, rightly throwing an exception if not found.
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
TheHoleConstant(), receiver, SmiSub(len, SmiConstant(1)), len,
UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceRightLoopContinuation, context,
receiver, callbackfn, UndefinedConstant(),
TheHoleConstant(), receiver, SmiSub(len, SmiConstant(1)),
len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduceRightLoopEagerDeoptContinuation, ArrayBuiltinsAssembler) {
......@@ -2694,10 +2689,9 @@ TF_BUILTIN(ArrayReduceRightLoopEagerDeoptContinuation, ArrayBuiltinsAssembler) {
Node* initial_k = Parameter(Descriptor::kInitialK);
Node* len = Parameter(Descriptor::kLength);
Callable stub(Builtins::CallableFor(
isolate(), Builtins::kArrayReduceRightLoopContinuation));
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
accumulator, receiver, initial_k, len, UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceRightLoopContinuation, context,
receiver, callbackfn, UndefinedConstant(), accumulator,
receiver, initial_k, len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduceRightLoopLazyDeoptContinuation, ArrayBuiltinsAssembler) {
......@@ -2708,10 +2702,9 @@ TF_BUILTIN(ArrayReduceRightLoopLazyDeoptContinuation, ArrayBuiltinsAssembler) {
Node* len = Parameter(Descriptor::kLength);
Node* result = Parameter(Descriptor::kResult);
Callable stub(Builtins::CallableFor(
isolate(), Builtins::kArrayReduceRightLoopContinuation));
Return(CallStub(stub, context, receiver, callbackfn, UndefinedConstant(),
result, receiver, initial_k, len, UndefinedConstant()));
Return(CallBuiltin(Builtins::kArrayReduceRightLoopContinuation, context,
receiver, callbackfn, UndefinedConstant(), result,
receiver, initial_k, len, UndefinedConstant()));
}
TF_BUILTIN(ArrayReduceRight, ArrayBuiltinsAssembler) {
......
......@@ -458,8 +458,7 @@ TF_BUILTIN(ProxyHasProperty, ProxiesCodeStubAssembler) {
BIND(&trap_undefined);
{
// 7.a. Return ? target.[[HasProperty]](P).
TailCallStub(Builtins::CallableFor(isolate(), Builtins::kHasProperty),
context, name, target);
TailCallBuiltin(Builtins::kHasProperty, context, name, target);
}
BIND(&return_false);
......
......@@ -2433,9 +2433,8 @@ void AccessorAssembler::KeyedLoadIC(const LoadICParameters* p) {
GotoIfNot(WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&try_polymorphic_name);
// TODO(jkummerow): Inline this? Or some of it?
TailCallStub(
Builtins::CallableFor(isolate(), Builtins::kKeyedLoadIC_Megamorphic),
p->context, p->receiver, p->name, p->slot, p->vector);
TailCallBuiltin(Builtins::kKeyedLoadIC_Megamorphic, p->context, p->receiver,
p->name, p->slot, p->vector);
}
BIND(&try_polymorphic_name);
{
......@@ -2641,10 +2640,8 @@ void AccessorAssembler::StoreIC(const StoreICParameters* p) {
GotoIfNot(
WordEqual(feedback, LoadRoot(Heap::kuninitialized_symbolRootIndex)),
&miss);
Callable stub =
Builtins::CallableFor(isolate(), Builtins::kStoreIC_Uninitialized);
TailCallStub(stub, p->context, p->receiver, p->name, p->value, p->slot,
p->vector);
TailCallBuiltin(Builtins::kStoreIC_Uninitialized, p->context, p->receiver,
p->name, p->value, p->slot, p->vector);
}
BIND(&miss);
{
......@@ -2814,9 +2811,8 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p) {
GotoIfNot(
WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&try_polymorphic_name);
TailCallStub(
Builtins::CallableFor(isolate(), Builtins::kKeyedStoreIC_Megamorphic),
p->context, p->receiver, p->name, p->value, p->slot, p->vector);
TailCallBuiltin(Builtins::kKeyedStoreIC_Megamorphic, p->context,
p->receiver, p->name, p->value, p->slot, p->vector);
}
BIND(&try_polymorphic_name);
......@@ -3115,9 +3111,7 @@ void AccessorAssembler::GenerateStoreGlobalICTrampoline() {
Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub();
Callable callable =
Builtins::CallableFor(isolate(), Builtins::kStoreGlobalIC);
TailCallStub(callable, context, name, value, slot, vector);
TailCallBuiltin(Builtins::kStoreGlobalIC, context, name, value, slot, vector);
}
void AccessorAssembler::GenerateStoreIC() {
......@@ -3144,8 +3138,8 @@ void AccessorAssembler::GenerateStoreICTrampoline() {
Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub();
Callable callable = Builtins::CallableFor(isolate(), Builtins::kStoreIC);
TailCallStub(callable, context, receiver, name, value, slot, vector);
TailCallBuiltin(Builtins::kStoreIC, context, receiver, name, value, slot,
vector);
}
void AccessorAssembler::GenerateKeyedStoreIC() {
......@@ -3172,8 +3166,8 @@ void AccessorAssembler::GenerateKeyedStoreICTrampoline() {
Node* context = Parameter(Descriptor::kContext);
Node* vector = LoadFeedbackVectorForStub();
Callable callable = Builtins::CallableFor(isolate(), Builtins::kKeyedStoreIC);
TailCallStub(callable, context, receiver, name, value, slot, vector);
TailCallBuiltin(Builtins::kKeyedStoreIC, context, receiver, name, value, slot,
vector);
}
void AccessorAssembler::GenerateStoreInArrayLiteralIC() {
......
......@@ -213,8 +213,8 @@ IGNITION_HANDLER(StaGlobal, InterpreterAssembler) {
Node* raw_slot = BytecodeOperandIdx(1);
Node* smi_slot = SmiTag(raw_slot);
Node* feedback_vector = LoadFeedbackVector();
Callable ic = Builtins::CallableFor(isolate(), Builtins::kStoreGlobalIC);
CallStub(ic, context, name, value, smi_slot, feedback_vector);
CallBuiltin(Builtins::kStoreGlobalIC, context, name, value, smi_slot,
feedback_vector);
Dispatch();
}
......@@ -523,16 +523,14 @@ IGNITION_HANDLER(LdaNamedProperty, InterpreterAssembler) {
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key
// in the accumulator.
IGNITION_HANDLER(LdaKeyedProperty, InterpreterAssembler) {
Callable ic = Builtins::CallableFor(isolate(), Builtins::kKeyedLoadIC);
Node* code_target = HeapConstant(ic.code());
Node* object = LoadRegisterAtOperandIndex(0);
Node* name = GetAccumulator();
Node* raw_slot = BytecodeOperandIdx(1);
Node* smi_slot = SmiTag(raw_slot);
Node* feedback_vector = LoadFeedbackVector();
Node* context = GetContext();
Node* result = CallStub(ic.descriptor(), code_target, context, object, name,
smi_slot, feedback_vector);
Node* result = CallBuiltin(Builtins::kKeyedLoadIC, context, object, name,
smi_slot, feedback_vector);
SetAccumulator(result);
Dispatch();
}
......@@ -590,8 +588,6 @@ IGNITION_HANDLER(StaNamedOwnProperty, InterpreterStoreNamedPropertyAssembler) {
// Calls the KeyedStoreIC at FeedbackVector slot <slot> for <object> and
// the key <key> with the value in the accumulator.
IGNITION_HANDLER(StaKeyedProperty, InterpreterAssembler) {
Callable ic = Builtins::CallableFor(isolate(), Builtins::kKeyedStoreIC);
Node* code_target = HeapConstant(ic.code());
Node* object = LoadRegisterAtOperandIndex(0);
Node* name = LoadRegisterAtOperandIndex(1);
Node* value = GetAccumulator();
......@@ -599,8 +595,8 @@ IGNITION_HANDLER(StaKeyedProperty, InterpreterAssembler) {
Node* smi_slot = SmiTag(raw_slot);
Node* feedback_vector = LoadFeedbackVector();
Node* context = GetContext();
Node* result = CallStub(ic.descriptor(), code_target, context, object, name,
value, smi_slot, feedback_vector);
Node* result = CallBuiltin(Builtins::kKeyedStoreIC, context, object, name,
value, smi_slot, feedback_vector);
// To avoid special logic in the deoptimizer to re-materialize the value in
// the accumulator, we overwrite the accumulator after the IC call. It
// doesn't really matter what we write to the accumulator here, since we
......@@ -615,9 +611,6 @@ IGNITION_HANDLER(StaKeyedProperty, InterpreterAssembler) {
// Calls the StoreInArrayLiteralIC at FeedbackVector slot <slot> for <array> and
// the key <index> with the value in the accumulator.
IGNITION_HANDLER(StaInArrayLiteral, InterpreterAssembler) {
Callable ic =
Builtins::CallableFor(isolate(), Builtins::kStoreInArrayLiteralIC);
Node* code_target = HeapConstant(ic.code());
Node* array = LoadRegisterAtOperandIndex(0);
Node* index = LoadRegisterAtOperandIndex(1);
Node* value = GetAccumulator();
......@@ -625,8 +618,8 @@ IGNITION_HANDLER(StaInArrayLiteral, InterpreterAssembler) {
Node* smi_slot = SmiTag(raw_slot);
Node* feedback_vector = LoadFeedbackVector();
Node* context = GetContext();
Node* result = CallStub(ic.descriptor(), code_target, context, array, index,
value, smi_slot, feedback_vector);
Node* result = CallBuiltin(Builtins::kStoreInArrayLiteralIC, context, array,
index, value, smi_slot, feedback_vector);
// To avoid special logic in the deoptimizer to re-materialize the value in
// the accumulator, we overwrite the accumulator after the IC call. It
// doesn't really matter what we write to the accumulator here, since we
......@@ -1304,11 +1297,9 @@ IGNITION_HANDLER(ToNumeric, InterpreterAssembler) {
//
// Convert the object referenced by the accumulator to a JSReceiver.
IGNITION_HANDLER(ToObject, InterpreterAssembler) {
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
Node* target = HeapConstant(callable.code());
Node* accumulator = GetAccumulator();
Node* context = GetContext();
Node* result = CallStub(callable.descriptor(), target, context, accumulator);
Node* result = CallBuiltin(Builtins::kToObject, context, accumulator);
StoreRegisterAtOperandIndex(result, 0);
Dispatch();
}
......
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