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

Unified Diff: src/ia32/code-stubs-ia32.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/ia32/builtins-ia32.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 9a9e7dd2c4e16f0d370a7a39f7fecb2196d397d8..2565c45d310f7b0bf5196d0065aba0a7d00a71ac 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -1624,11 +1624,11 @@
// edi - function
// edx - slot id
// ebx - vector
- // eax - number of arguments - if argc_in_register() is true.
__ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx);
__ cmp(edi, ecx);
__ j(not_equal, miss);
+ __ mov(eax, arg_count());
// Reload ecx.
__ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
FixedArray::kHeaderSize));
@@ -1640,17 +1640,9 @@
__ mov(ebx, ecx);
__ mov(edx, edi);
- if (argc_in_register()) {
- // Pass a default ArgumentCountKey::Any since the argc is only available
- // in eax. We do not have the actual count here.
- ArrayConstructorStub stub(masm->isolate());
- __ TailCallStub(&stub);
- } else {
- // arg_count() is expected in rax 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);
+
// Unreachable.
}
@@ -1659,13 +1651,10 @@
// edi - function
// edx - slot id
// ebx - vector
- // eax - number of arguments - if argc_in_register() is true.
Isolate* isolate = masm->isolate();
Label extra_checks_or_miss, call, call_function;
- if (!argc_in_register()) {
- int argc = arg_count();
- __ Set(eax, argc);
- }
+ int argc = arg_count();
+ ParameterCount actual(argc);
// The checks. First, does edi match the recorded monomorphic target?
__ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
@@ -1698,6 +1687,7 @@
Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement)));
__ bind(&call_function);
+ __ Set(eax, argc);
__ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
tail_call_mode()),
RelocInfo::CODE_TARGET);
@@ -1737,6 +1727,7 @@
Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate)));
__ bind(&call);
+ __ Set(eax, argc);
__ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()),
RelocInfo::CODE_TARGET);
@@ -1773,15 +1764,9 @@
{
FrameScope scope(masm, StackFrame::INTERNAL);
CreateWeakCellStub create_stub(isolate);
- __ SmiTag(eax);
- __ push(eax);
__ push(edi);
-
__ CallStub(&create_stub);
-
__ pop(edi);
- __ pop(eax);
- __ SmiUntag(eax);
}
__ jmp(&call_function);
@@ -1801,9 +1786,6 @@
void CallICStub::GenerateMiss(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
- // Store eax since we need it later.
- __ SmiTag(eax);
- __ push(eax);
// Push the function and feedback info.
__ push(edi);
__ push(ebx);
@@ -1814,10 +1796,6 @@
// Move result to edi and exit the internal frame.
__ mov(edi, eax);
-
- // Restore eax.
- __ pop(eax);
- __ SmiUntag(eax);
}
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698