| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 __ b(ge, &shift_arguments); | 1312 __ b(ge, &shift_arguments); |
| 1313 | 1313 |
| 1314 __ bind(&convert_to_object); | 1314 __ bind(&convert_to_object); |
| 1315 | 1315 |
| 1316 { | 1316 { |
| 1317 // Enter an internal frame in order to preserve argument count. | 1317 // Enter an internal frame in order to preserve argument count. |
| 1318 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1318 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 1319 __ SmiTag(r0); | 1319 __ SmiTag(r0); |
| 1320 __ push(r0); | 1320 __ push(r0); |
| 1321 | 1321 |
| 1322 __ push(r2); | 1322 __ mov(r0, r2); |
| 1323 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1323 ToObjectStub stub(masm->isolate()); |
| 1324 __ CallStub(&stub); |
| 1324 __ mov(r2, r0); | 1325 __ mov(r2, r0); |
| 1325 | 1326 |
| 1326 __ pop(r0); | 1327 __ pop(r0); |
| 1327 __ SmiUntag(r0); | 1328 __ SmiUntag(r0); |
| 1328 | 1329 |
| 1329 // Exit the internal frame. | 1330 // Exit the internal frame. |
| 1330 } | 1331 } |
| 1331 | 1332 |
| 1332 // Restore the function to r1, and the flag to r4. | 1333 // Restore the function to r1, and the flag to r4. |
| 1333 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); | 1334 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 | 1550 |
| 1550 // Check if the receiver is already a JavaScript object. | 1551 // Check if the receiver is already a JavaScript object. |
| 1551 // r0: receiver | 1552 // r0: receiver |
| 1552 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); | 1553 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
| 1553 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); | 1554 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); |
| 1554 __ b(ge, &push_receiver); | 1555 __ b(ge, &push_receiver); |
| 1555 | 1556 |
| 1556 // Convert the receiver to a regular object. | 1557 // Convert the receiver to a regular object. |
| 1557 // r0: receiver | 1558 // r0: receiver |
| 1558 __ bind(&call_to_object); | 1559 __ bind(&call_to_object); |
| 1559 __ push(r0); | 1560 ToObjectStub stub(masm->isolate()); |
| 1560 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1561 __ CallStub(&stub); |
| 1561 __ b(&push_receiver); | 1562 __ b(&push_receiver); |
| 1562 | 1563 |
| 1563 __ bind(&use_global_proxy); | 1564 __ bind(&use_global_proxy); |
| 1564 __ ldr(r0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 1565 __ ldr(r0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 1565 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalProxyOffset)); | 1566 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalProxyOffset)); |
| 1566 | 1567 |
| 1567 // Push the receiver. | 1568 // Push the receiver. |
| 1568 // r0: receiver | 1569 // r0: receiver |
| 1569 __ bind(&push_receiver); | 1570 __ bind(&push_receiver); |
| 1570 __ push(r0); | 1571 __ push(r0); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 } | 1864 } |
| 1864 } | 1865 } |
| 1865 | 1866 |
| 1866 | 1867 |
| 1867 #undef __ | 1868 #undef __ |
| 1868 | 1869 |
| 1869 } // namespace internal | 1870 } // namespace internal |
| 1870 } // namespace v8 | 1871 } // namespace v8 |
| 1871 | 1872 |
| 1872 #endif // V8_TARGET_ARCH_ARM | 1873 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |