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

Unified Diff: src/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index bcb6cc3f7fc7b7a4d6996217edbfbf2a366d8b4b..5c8879704fac07640b610e3af1f8b40b9dc1c1f8 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -1411,32 +1411,35 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
const int indexOffset,
const int limitOffset) {
Label entry, loop;
- __ ld(a0, MemOperand(fp, indexOffset));
+ Register receiver = LoadDescriptor::ReceiverRegister();
+ Register key = LoadDescriptor::NameRegister();
+
+ __ ld(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);
- __ ld(a1, MemOperand(fp, argumentsOffset));
- __ Push(a1, a0);
+ __ ld(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.
- __ ld(a0, MemOperand(fp, indexOffset));
- __ Daddu(a0, a0, Operand(Smi::FromInt(1)));
- __ sd(a0, MemOperand(fp, indexOffset));
+ __ ld(key, MemOperand(fp, indexOffset));
+ __ Daddu(key, key, Operand(Smi::FromInt(1)));
+ __ sd(key, MemOperand(fp, indexOffset));
// Test if the copy loop has finished copying all the elements from the
// arguments object.
__ bind(&entry);
__ ld(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/mips/builtins-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698