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

Unified Diff: src/mips/code-stubs-mips.cc

Issue 1731253003: Revert of [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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/mips/builtins-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 1427a3bb45fe00b5fbf2a59837ccd2ce2a1d65b1..dc224a985dc52746c5a33c633d809aa82445d2f7 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -2181,7 +2181,6 @@
void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) {
- // a0 - number of arguments - if argc_in_register() is true.
// a1 - function
// a3 - slot id
// a2 - vector
@@ -2189,6 +2188,8 @@
__ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, at);
__ Branch(miss, ne, a1, Operand(at));
+ __ li(a0, Operand(arg_count()));
+
// Increment the call count for monomorphic function calls.
__ Lsa(at, a2, a3, kPointerSizeLog2 - kSmiTagSize);
__ lw(a3, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize));
@@ -2197,32 +2198,20 @@
__ mov(a2, t0);
__ mov(a3, a1);
- if (argc_in_register()) {
- // Pass a default ArgumentCountKey::Any since the argc is only available
- // in a0. We do not have the actual count here.
- ArrayConstructorStub stub(masm->isolate());
- __ TailCallStub(&stub);
- } else {
- // arg_count() is expected in a0 if the arg_count() >= 2
- // (ArgumentCountKey::MORE_THAN_ONE).
- ArrayConstructorStub stub(masm->isolate(), arg_count());
- __ TailCallStub(&stub);
- }
+ ArrayConstructorStub stub(masm->isolate(), arg_count());
+ __ TailCallStub(&stub);
}
void CallICStub::Generate(MacroAssembler* masm) {
- // a0 - number of arguments - if argc_in_register() is true.
// a1 - function
// a3 - slot id (Smi)
// a2 - vector
Label extra_checks_or_miss, call, call_function;
- if (!argc_in_register()) {
- int argc = arg_count();
- __ li(a0, argc);
- }
-
- // The checks. First, does a1 match the recorded monomorphic target?
+ int argc = arg_count();
+ ParameterCount actual(argc);
+
+ // The checks. First, does r1 match the recorded monomorphic target?
__ Lsa(t0, a2, a3, kPointerSizeLog2 - kSmiTagSize);
__ lw(t0, FieldMemOperand(t0, FixedArray::kHeaderSize));
@@ -2256,7 +2245,9 @@
__ bind(&call_function);
__ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
tail_call_mode()),
- RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg));
+ RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg),
+ USE_DELAY_SLOT);
+ __ li(a0, Operand(argc)); // In delay slot.
__ bind(&extra_checks_or_miss);
Label uninitialized, miss, not_allocation_site;
@@ -2293,7 +2284,9 @@
__ bind(&call);
__ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()),
- RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg));
+ RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg),
+ USE_DELAY_SLOT);
+ __ li(a0, Operand(argc)); // In delay slot.
__ bind(&uninitialized);
@@ -2327,11 +2320,9 @@
{
FrameScope scope(masm, StackFrame::INTERNAL);
CreateWeakCellStub create_stub(masm->isolate());
- __ SmiTag(a0);
- __ Push(a0, a1);
+ __ Push(a1);
__ CallStub(&create_stub);
- __ Pop(a0, a1);
- __ SmiUntag(a0);
+ __ Pop(a1);
}
__ Branch(&call_function);
@@ -2348,19 +2339,14 @@
void CallICStub::GenerateMiss(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
- __ SmiTag(a0);
- // Push number of arguments, receiver, function and feedback info.
- __ Push(a0, a1, a2, a3);
+ // Push the receiver and the function and feedback info.
+ __ Push(a1, a2, a3);
// Call the entry.
__ CallRuntime(Runtime::kCallIC_Miss);
// Move result to a1 and exit the internal frame.
__ mov(a1, v0);
-
- // Restore a0.
- __ Pop(a0);
- __ SmiUntag(a0);
}
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698