Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 8014a72c9c5d4c2b8bec8f49a463a4d0cd6b1eaa..cfb857199a0461f50e48fb9896d5f1763071f582 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -2076,8 +2076,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ movp(Operand(rsp, 2 * kPointerSize), rdi); |
SetCallPosition(expr, 1); |
- CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); |
- __ CallStub(&stub); |
+ __ Set(rax, 1); |
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
__ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
__ Drop(1); // The function is still on the stack; drop it. |
@@ -2708,10 +2708,8 @@ void FullCodeGenerator::CallIC(Handle<Code> code, |
void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
Expression* callee = expr->expression(); |
- CallICState::CallType call_type = |
- callee->IsVariableProxy() ? CallICState::FUNCTION : CallICState::METHOD; |
// Get the target function. |
- if (call_type == CallICState::FUNCTION) { |
+ if (callee->IsVariableProxy()) { |
{ StackValueContext context(this); |
EmitVariableLoad(callee->AsVariableProxy()); |
PrepareForBailout(callee, NO_REGISTERS); |
@@ -2731,7 +2729,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
__ movp(Operand(rsp, kPointerSize), rax); |
} |
- EmitCall(expr, call_type); |
+ EmitCall(expr); |
} |
@@ -2769,7 +2767,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) { |
// Stack here: |
// - target function |
// - this (receiver) |
- EmitCall(expr, CallICState::METHOD); |
+ EmitCall(expr); |
} |
@@ -2792,7 +2790,7 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
__ Push(Operand(rsp, 0)); |
__ movp(Operand(rsp, kPointerSize), rax); |
- EmitCall(expr, CallICState::METHOD); |
+ EmitCall(expr); |
} |
@@ -2828,11 +2826,11 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) { |
// Stack here: |
// - target function |
// - this (receiver) |
- EmitCall(expr, CallICState::METHOD); |
+ EmitCall(expr); |
} |
-void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { |
+void FullCodeGenerator::EmitCall(Call* expr) { |
// Load the arguments. |
ZoneList<Expression*>* args = expr->arguments(); |
int arg_count = args->length(); |
@@ -2842,7 +2840,7 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { |
PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
SetCallPosition(expr, arg_count); |
- Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, call_type).code(); |
+ Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count).code(); |
__ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
// Don't assign a type feedback id to the IC, since type feedback is provided |
@@ -2945,9 +2943,9 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { |
PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); |
SetCallPosition(expr, arg_count); |
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
- __ CallStub(&stub); |
+ __ Set(rax, arg_count); |
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
RecordJSReturnSite(expr); |
// Restore context register. |
__ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
@@ -4226,9 +4224,9 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
int arg_count = args->length(); |
SetCallPosition(expr, arg_count); |
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
- __ CallStub(&stub); |
+ __ Set(rax, arg_count); |
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
} |