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

Unified Diff: src/mips/builtins-mips.cc

Issue 1116943002: Function apply(): make all architectures use an IC for performance. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oops, fixed arm64 failure to push argument. Created 5 years, 7 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/arm64/builtins-arm64.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index b81ef0532b39e0cd11981d6fca0dfaeb05cf938c..90c5cd602bcf6e925d12bff7d213fa660a0ea28c 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -1404,32 +1404,35 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
const int indexOffset,
const int limitOffset) {
Label entry, loop;
- __ lw(a0, MemOperand(fp, indexOffset));
+ Register receiver = LoadDescriptor::ReceiverRegister();
+ Register key = LoadDescriptor::NameRegister();
+
+ __ lw(key, MemOperand(fp, indexOffset));
__ Branch(&entry);
- // Load the current argument from the arguments array and push it to the
- // stack.
- // a0: current argument index
+ // Load the current argument from the arguments array.
__ bind(&loop);
- __ lw(a1, MemOperand(fp, argumentsOffset));
- __ Push(a1, a0);
+ __ lw(receiver, MemOperand(fp, argumentsOffset));
+
+ // Use inline caching to speed up access to arguments.
+ Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic();
+ __ Call(ic, RelocInfo::CODE_TARGET);
- // Call the runtime to access the property in the arguments array.
- __ CallRuntime(Runtime::kGetProperty, 2);
__ push(v0);
// Use inline caching to access the arguments.
- __ lw(a0, MemOperand(fp, indexOffset));
- __ Addu(a0, a0, Operand(1 << kSmiTagSize));
- __ sw(a0, MemOperand(fp, indexOffset));
+ __ lw(key, MemOperand(fp, indexOffset));
+ __ Addu(key, key, Operand(1 << kSmiTagSize));
+ __ sw(key, MemOperand(fp, indexOffset));
// Test if the copy loop has finished copying all the elements from the
// arguments object.
__ bind(&entry);
__ lw(a1, MemOperand(fp, limitOffset));
- __ Branch(&loop, ne, a0, Operand(a1));
+ __ Branch(&loop, ne, key, Operand(a1));
// On exit, the pushed arguments count is in a0, untagged
+ __ mov(a0, key);
__ SmiUntag(a0);
}
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698