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

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

Issue 1423973006: PPC: 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/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index 5f741e8357f58589a1b1ecc8db3802ce1d82ed6a..27db364fef8730fe7a07e0894227d32301cdf289 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -2088,8 +2088,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mr(r4, r3);
__ StoreP(r4, MemOperand(sp, 2 * kPointerSize));
SetCallPosition(expr, 1);
- CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD);
- __ CallStub(&stub);
+ __ li(r3, Operand(1));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
__ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ Drop(1); // The function is still on the stack; drop it.
@@ -2814,11 +2814,8 @@ void FullCodeGenerator::CallIC(Handle<Code> code, TypeFeedbackId ast_id) {
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());
@@ -2841,7 +2838,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
__ StoreP(r3, MemOperand(sp, kPointerSize));
}
- EmitCall(expr, call_type);
+ EmitCall(expr);
}
@@ -2879,7 +2876,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// Stack here:
// - target function
// - this (receiver)
- EmitCall(expr, CallICState::METHOD);
+ EmitCall(expr);
}
@@ -2902,7 +2899,7 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, Expression* key) {
__ push(ip);
__ StoreP(r3, MemOperand(sp, kPointerSize));
- EmitCall(expr, CallICState::METHOD);
+ EmitCall(expr);
}
@@ -2938,11 +2935,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();
@@ -2952,7 +2949,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();
__ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot()));
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
// Don't assign a type feedback id to the IC, since type feedback is provided
@@ -3060,9 +3057,9 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
// Record source position for debugger.
SetCallPosition(expr, arg_count);
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
- __ CallStub(&stub);
+ __ mov(r3, Operand(arg_count));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
RecordJSReturnSite(expr);
// Restore context register.
__ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
@@ -4259,9 +4256,9 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
int arg_count = args->length();
SetCallPosition(expr, arg_count);
- CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
__ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
- __ CallStub(&stub);
+ __ mov(r3, Operand(arg_count));
+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
}
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698