OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 | 1302 |
1303 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); | 1303 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
1304 __ GetObjectType(a2, a3, a3); | 1304 __ GetObjectType(a2, a3, a3); |
1305 __ Branch(&shift_arguments, ge, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); | 1305 __ Branch(&shift_arguments, ge, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); |
1306 | 1306 |
1307 __ bind(&convert_to_object); | 1307 __ bind(&convert_to_object); |
1308 // Enter an internal frame in order to preserve argument count. | 1308 // Enter an internal frame in order to preserve argument count. |
1309 { | 1309 { |
1310 FrameScope scope(masm, StackFrame::INTERNAL); | 1310 FrameScope scope(masm, StackFrame::INTERNAL); |
1311 __ SmiTag(a0); | 1311 __ SmiTag(a0); |
1312 __ Push(a0, a2); | 1312 __ Push(a0); |
1313 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1313 __ mov(a0, a2); |
| 1314 ToObjectStub stub(masm->isolate()); |
| 1315 __ CallStub(&stub); |
1314 __ mov(a2, v0); | 1316 __ mov(a2, v0); |
1315 | 1317 |
1316 __ pop(a0); | 1318 __ pop(a0); |
1317 __ SmiUntag(a0); | 1319 __ SmiUntag(a0); |
1318 // Leave internal frame. | 1320 // Leave internal frame. |
1319 } | 1321 } |
1320 // Restore the function to a1, and the flag to a4. | 1322 // Restore the function to a1, and the flag to a4. |
1321 __ dsll(at, a0, kPointerSizeLog2); | 1323 __ dsll(at, a0, kPointerSizeLog2); |
1322 __ daddu(at, sp, at); | 1324 __ daddu(at, sp, at); |
1323 __ ld(a1, MemOperand(at)); | 1325 __ ld(a1, MemOperand(at)); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 | 1540 |
1539 // Check if the receiver is already a JavaScript object. | 1541 // Check if the receiver is already a JavaScript object. |
1540 // a0: receiver | 1542 // a0: receiver |
1541 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); | 1543 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
1542 __ GetObjectType(a0, a1, a1); | 1544 __ GetObjectType(a0, a1, a1); |
1543 __ Branch(&push_receiver, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); | 1545 __ Branch(&push_receiver, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
1544 | 1546 |
1545 // Convert the receiver to a regular object. | 1547 // Convert the receiver to a regular object. |
1546 // a0: receiver | 1548 // a0: receiver |
1547 __ bind(&call_to_object); | 1549 __ bind(&call_to_object); |
1548 __ push(a0); | 1550 ToObjectStub stub(masm->isolate()); |
1549 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1551 __ CallStub(&stub); |
1550 __ mov(a0, v0); // Put object in a0 to match other paths to push_receiver. | 1552 __ mov(a0, v0); // Put object in a0 to match other paths to push_receiver. |
1551 __ Branch(&push_receiver); | 1553 __ Branch(&push_receiver); |
1552 | 1554 |
1553 __ bind(&use_global_proxy); | 1555 __ bind(&use_global_proxy); |
1554 __ ld(a0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 1556 __ ld(a0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
1555 __ ld(a0, FieldMemOperand(a0, GlobalObject::kGlobalProxyOffset)); | 1557 __ ld(a0, FieldMemOperand(a0, GlobalObject::kGlobalProxyOffset)); |
1556 | 1558 |
1557 // Push the receiver. | 1559 // Push the receiver. |
1558 // a0: receiver | 1560 // a0: receiver |
1559 __ bind(&push_receiver); | 1561 __ bind(&push_receiver); |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 } | 1870 } |
1869 } | 1871 } |
1870 | 1872 |
1871 | 1873 |
1872 #undef __ | 1874 #undef __ |
1873 | 1875 |
1874 } // namespace internal | 1876 } // namespace internal |
1875 } // namespace v8 | 1877 } // namespace v8 |
1876 | 1878 |
1877 #endif // V8_TARGET_ARCH_MIPS64 | 1879 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |