Commit 9121f72a authored by bmeurer's avatar bmeurer Committed by Commit bot

[stubs] Fix naming of CallIC and CallICTrampoline.

Rename the CallIC factory method to CallICTrampoline and the
CallICInOptimizedCode to CallIC to match the naming of the
stubs and better reflect their functionality.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2670073002
Cr-Commit-Position: refs/heads/master@{#42876}
parent ed3834db
......@@ -88,15 +88,15 @@ Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
// static
Callable CodeFactory::CallIC(Isolate* isolate, ConvertReceiverMode mode,
TailCallMode tail_call_mode) {
CallICTrampolineStub stub(isolate, CallICState(mode, tail_call_mode));
CallICStub stub(isolate, CallICState(mode, tail_call_mode));
return make_callable(stub);
}
// static
Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate,
ConvertReceiverMode mode,
TailCallMode tail_call_mode) {
CallICStub stub(isolate, CallICState(mode, tail_call_mode));
Callable CodeFactory::CallICTrampoline(Isolate* isolate,
ConvertReceiverMode mode,
TailCallMode tail_call_mode) {
CallICTrampolineStub stub(isolate, CallICState(mode, tail_call_mode));
return make_callable(stub);
}
......
......@@ -49,7 +49,7 @@ class V8_EXPORT_PRIVATE CodeFactory final {
static Callable CallIC(Isolate* isolate,
ConvertReceiverMode mode = ConvertReceiverMode::kAny,
TailCallMode tail_call_mode = TailCallMode::kDisallow);
static Callable CallICInOptimizedCode(
static Callable CallICTrampoline(
Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny,
TailCallMode tail_call_mode = TailCallMode::kDisallow);
static Callable StoreIC(Isolate* isolate, LanguageMode mode);
......
......@@ -520,8 +520,7 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
// Insert a CallIC here to collect feedback for uninitialized calls.
int const arg_count = static_cast<int>(p.arity() - 2);
Callable callable =
CodeFactory::CallICInOptimizedCode(isolate(), p.convert_mode());
Callable callable = CodeFactory::CallIC(isolate(), p.convert_mode());
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
CallDescriptor const* const desc = Linkage::GetStubCallDescriptor(
isolate(), graph()->zone(), callable.descriptor(), arg_count + 1,
......
......@@ -7684,8 +7684,8 @@ HInstruction* HOptimizedGraphBuilder::NewCallFunctionViaIC(
HValue* vector_val = Add<HConstant>(vector);
HValue* op_vals[] = {function, arity_val, index_val, vector_val};
Callable callable = CodeFactory::CallICInOptimizedCode(
isolate(), convert_mode, tail_call_mode);
Callable callable =
CodeFactory::CallIC(isolate(), convert_mode, tail_call_mode);
HConstant* stub = Add<HConstant>(callable.code());
return New<HCallWithDescriptor>(stub, argument_count, callable.descriptor(),
......
......@@ -1890,7 +1890,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ mov(r0, Operand(arg_count));
......
......@@ -1842,7 +1842,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot()));
__ Peek(x1, (arg_count + 1) * kXRegSize);
__ Mov(x0, arg_count);
......
......@@ -1814,7 +1814,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Move(eax, Immediate(arg_count));
......
......@@ -1912,7 +1912,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
......
......@@ -1913,7 +1913,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
......
......@@ -1903,7 +1903,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r3, Operand(arg_count));
......
......@@ -1858,7 +1858,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ LoadSmiLiteral(r5, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
__ mov(r2, Operand(arg_count));
......
......@@ -1800,7 +1800,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
__ Set(rax, arg_count);
......
......@@ -1807,7 +1807,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
EmitProfilingCounterHandlingForReturnSequence(true);
}
Handle<Code> code =
CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode())
.code();
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Move(eax, Immediate(arg_count));
......
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