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