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

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

Issue 7042031: MIPS: Minor fixes to simulator and builtins-mips. (Closed)
Patch Set: Rebased on r7964, updated for recent commits. Created 9 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 | « no previous file | src/mips/code-stubs-mips.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 d41b0f13fd44ea54dd96e7c64d7dc4079dac8328..fdcb7c73c0ff65fdb67a111805c23e365c8bc32b 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -1202,13 +1202,10 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
kSmiTagSize)));
__ Branch(&shift_arguments, ne, t0, Operand(zero_reg));
- // Do not transform the receiver for native (shared already in r2).
- __ lw(a2, FieldMemOperand(a2, SharedFunctionInfo::kScriptOffset));
- __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
- __ Branch(&shift_arguments, eq, a2, Operand(a3));
- __ lw(a2, FieldMemOperand(a2, Script::kTypeOffset));
- __ sra(a2, a2, kSmiTagSize);
- __ Branch(&shift_arguments, eq, a2, Operand(Script::TYPE_NATIVE));
+ // Do not transform the receiver for native (Compilerhints already in a3).
+ __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kES5Native +
+ kSmiTagSize)));
+ __ Branch(&shift_arguments, ne, t0, Operand(zero_reg));
// Compute the receiver in non-strict mode.
// Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2).
@@ -1220,7 +1217,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// a2: first argument
__ JumpIfSmi(a2, &convert_to_object, t2);
- // Heap::kUndefinedValueRootIndex is already in a3.
+ __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
__ Branch(&use_global_receiver, eq, a2, Operand(a3));
__ LoadRoot(a3, Heap::kNullValueRootIndex);
__ Branch(&use_global_receiver, eq, a2, Operand(a3));
@@ -1389,20 +1386,17 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
kSmiTagSize)));
__ Branch(&push_receiver, ne, t0, Operand(zero_reg));
- // Do not transform the receiver for native (shared already in a1).
- __ lw(a1, FieldMemOperand(a1, SharedFunctionInfo::kScriptOffset));
- __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
- __ Branch(&push_receiver, eq, a1, Operand(a2));
- __ lw(a1, FieldMemOperand(a1, Script::kTypeOffset));
- __ sra(a1, a1, kSmiTagSize);
- __ Branch(&push_receiver, eq, a1, Operand(Script::TYPE_NATIVE));
+ // Do not transform the receiver for native (Compilerhints already in a2).
+ __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kES5Native +
+ kSmiTagSize)));
+ __ Branch(&push_receiver, ne, t0, Operand(zero_reg));
// Compute the receiver in non-strict mode.
__ And(t0, a0, Operand(kSmiTagMask));
__ Branch(&call_to_object, eq, t0, Operand(zero_reg));
__ LoadRoot(a1, Heap::kNullValueRootIndex);
__ Branch(&use_global_receiver, eq, a0, Operand(a1));
- // Heap::kUndefinedValueRootIndex is already in a2.
+ __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
__ Branch(&use_global_receiver, eq, a0, Operand(a2));
// Check if the receiver is already a JavaScript object.
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698