Index: src/mips/builtins-mips.cc |
=================================================================== |
--- src/mips/builtins-mips.cc (revision 8174) |
+++ src/mips/builtins-mips.cc (working copy) |
@@ -942,10 +942,11 @@ |
masm->isolate()->builtins()->HandleApiCallConstruct(); |
ParameterCount expected(0); |
__ InvokeCode(code, expected, expected, |
- RelocInfo::CODE_TARGET, CALL_FUNCTION); |
+ RelocInfo::CODE_TARGET, CALL_FUNCTION, CALL_AS_METHOD); |
} else { |
ParameterCount actual(a0); |
- __ InvokeFunction(a1, actual, CALL_FUNCTION); |
+ __ InvokeFunction(a1, actual, CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
} |
// Pop the function from the stack. |
@@ -973,9 +974,9 @@ |
__ Branch(&use_receiver, eq, t0, Operand(zero_reg)); |
// If the type of the result (stored in its map) is less than |
- // FIRST_JS_OBJECT_TYPE, it is not an object in the ECMA sense. |
+ // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. |
__ GetObjectType(v0, a3, a3); |
- __ Branch(&exit, greater_equal, a3, Operand(FIRST_JS_OBJECT_TYPE)); |
+ __ Branch(&exit, greater_equal, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); |
// Throw away the result of the constructor invocation and use the |
// on-stack receiver as the result. |
@@ -1078,7 +1079,8 @@ |
RelocInfo::CODE_TARGET); |
} else { |
ParameterCount actual(a0); |
- __ InvokeFunction(a1, actual, CALL_FUNCTION); |
+ __ InvokeFunction(a1, actual, CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
} |
__ LeaveInternalFrame(); |
@@ -1232,10 +1234,9 @@ |
__ LoadRoot(a3, Heap::kNullValueRootIndex); |
__ Branch(&use_global_receiver, eq, a2, Operand(a3)); |
- STATIC_ASSERT(LAST_JS_OBJECT_TYPE + 1 == LAST_TYPE); |
- STATIC_ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); |
+ STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
__ GetObjectType(a2, a3, a3); |
- __ Branch(&shift_arguments, ge, a3, Operand(FIRST_JS_OBJECT_TYPE)); |
+ __ Branch(&shift_arguments, ge, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); |
__ bind(&convert_to_object); |
__ EnterInternalFrame(); // In order to preserve argument count. |
@@ -1338,7 +1339,8 @@ |
RelocInfo::CODE_TARGET, ne, a2, Operand(a0)); |
ParameterCount expected(0); |
- __ InvokeCode(a3, expected, expected, JUMP_FUNCTION); |
+ __ InvokeCode(a3, expected, expected, JUMP_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
} |
@@ -1413,10 +1415,9 @@ |
// Check if the receiver is already a JavaScript object. |
// a0: receiver |
- STATIC_ASSERT(LAST_JS_OBJECT_TYPE + 1 == LAST_TYPE); |
- STATIC_ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); |
+ STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
__ GetObjectType(a0, a1, a1); |
- __ Branch(&push_receiver, ge, a1, Operand(FIRST_JS_OBJECT_TYPE)); |
+ __ Branch(&push_receiver, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
// Convert the receiver to a regular object. |
// a0: receiver |
@@ -1471,7 +1472,8 @@ |
ParameterCount actual(a0); |
__ sra(a0, a0, kSmiTagSize); |
__ lw(a1, MemOperand(fp, kFunctionOffset)); |
- __ InvokeFunction(a1, actual, CALL_FUNCTION); |
+ __ InvokeFunction(a1, actual, CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
// Tear down the internal frame and remove function, receiver and args. |
__ LeaveInternalFrame(); |
@@ -1571,20 +1573,20 @@ |
// Adjust for return address and receiver. |
__ Addu(a0, a0, Operand(2 * kPointerSize)); |
// Compute copy end address. Also adjust for return address. |
- __ Addu(t1, fp, kPointerSize); |
+ __ Addu(t3, fp, kPointerSize); |
// Copy the arguments (including the receiver) to the new stack frame. |
// a0: copy start address |
// a1: function |
// a2: expected number of arguments |
// a3: code entry to call |
- // t1: copy end address |
+ // t3: copy end address |
Label copy; |
__ bind(©); |
__ lw(t0, MemOperand(a0)); // Adjusted above for return addr and receiver. |
__ push(t0); |
__ Subu(a0, a0, kPointerSize); |
- __ Branch(©, ne, a0, Operand(t1)); |
+ __ Branch(©, ne, a0, Operand(t3)); |
// Fill the remaining expected arguments with undefined. |
// a1: function |