Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1407373007: Remove CallFunctionStub, always call through the Call builtin (also from CallIC) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm/full-codegen-arm.cc
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
index d5758231f10b99c85fbfbf63d903711625382f72..03409f4b7f225f9561986b8932569028cb21ba04 100644
--- a/src/full-codegen/arm/full-codegen-arm.cc
+++ b/src/full-codegen/arm/full-codegen-arm.cc
@@ -2124,8 +2124,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(r1, r0);
__ str(r1, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1);
- CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD);
- __ CallStub(&stub);
+ __ mov(r0, Operand(1));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ Drop(1); // The function is still on the stack; drop it.
@@ -2817,11 +2817,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);
@@ -2843,7 +2840,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
__ str(r0, MemOperand(sp, kPointerSize));
}
- EmitCall(expr, call_type);
+ EmitCall(expr);
}
@@ -2883,7 +2880,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// Stack here:
// - target function
// - this (receiver)
- EmitCall(expr, CallICState::METHOD);
+ EmitCall(expr);
}
@@ -2907,7 +2904,7 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
__ push(ip);
__ str(r0, MemOperand(sp, kPointerSize));
- EmitCall(expr, CallICState::METHOD);
+ EmitCall(expr);
}
@@ -2945,11 +2942,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();
@@ -2959,7 +2956,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();
__ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided
@@ -3067,9 +3064,9 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
// Record source position for debugger.
SetCallPosition(expr, arg_count);
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
- __ CallStub(&stub);
+ __ mov(r0, Operand(arg_count));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
RecordJSReturnSite(expr);
// Restore context register.
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
@@ -4282,9 +4279,9 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
int arg_count = args->length();
SetCallPosition(expr, arg_count);
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
- __ CallStub(&stub);
+ __ mov(r0, Operand(arg_count));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
}
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698