OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 __ b(eq, &convert_to_object); | 1258 __ b(eq, &convert_to_object); |
1259 | 1259 |
1260 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | 1260 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
1261 __ cmp(r2, r3); | 1261 __ cmp(r2, r3); |
1262 __ b(eq, &use_global_receiver); | 1262 __ b(eq, &use_global_receiver); |
1263 __ LoadRoot(r3, Heap::kNullValueRootIndex); | 1263 __ LoadRoot(r3, Heap::kNullValueRootIndex); |
1264 __ cmp(r2, r3); | 1264 __ cmp(r2, r3); |
1265 __ b(eq, &use_global_receiver); | 1265 __ b(eq, &use_global_receiver); |
1266 | 1266 |
1267 __ CompareObjectType(r2, r3, r3, FIRST_JS_OBJECT_TYPE); | 1267 __ CompareObjectType(r2, r3, r3, FIRST_JS_OBJECT_TYPE); |
1268 __ b(lt, &convert_to_object); | 1268 __ b(ge, &shift_arguments); |
1269 __ cmp(r3, Operand(LAST_JS_OBJECT_TYPE)); | |
1270 __ b(le, &shift_arguments); | |
1271 | 1269 |
1272 __ bind(&convert_to_object); | 1270 __ bind(&convert_to_object); |
1273 __ EnterInternalFrame(); // In order to preserve argument count. | 1271 __ EnterInternalFrame(); // In order to preserve argument count. |
1274 __ mov(r0, Operand(r0, LSL, kSmiTagSize)); // Smi-tagged. | 1272 __ mov(r0, Operand(r0, LSL, kSmiTagSize)); // Smi-tagged. |
1275 __ push(r0); | 1273 __ push(r0); |
1276 | 1274 |
1277 __ push(r2); | 1275 __ push(r2); |
1278 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1276 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
1279 __ mov(r2, r0); | 1277 __ mov(r2, r0); |
1280 | 1278 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 __ LoadRoot(r1, Heap::kNullValueRootIndex); | 1435 __ LoadRoot(r1, Heap::kNullValueRootIndex); |
1438 __ cmp(r0, r1); | 1436 __ cmp(r0, r1); |
1439 __ b(eq, &use_global_receiver); | 1437 __ b(eq, &use_global_receiver); |
1440 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); | 1438 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); |
1441 __ cmp(r0, r1); | 1439 __ cmp(r0, r1); |
1442 __ b(eq, &use_global_receiver); | 1440 __ b(eq, &use_global_receiver); |
1443 | 1441 |
1444 // Check if the receiver is already a JavaScript object. | 1442 // Check if the receiver is already a JavaScript object. |
1445 // r0: receiver | 1443 // r0: receiver |
1446 __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE); | 1444 __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE); |
1447 __ b(lt, &call_to_object); | 1445 __ b(ge, &push_receiver); |
1448 __ cmp(r1, Operand(LAST_JS_OBJECT_TYPE)); | |
1449 __ b(le, &push_receiver); | |
1450 | 1446 |
1451 // Convert the receiver to a regular object. | 1447 // Convert the receiver to a regular object. |
1452 // r0: receiver | 1448 // r0: receiver |
1453 __ bind(&call_to_object); | 1449 __ bind(&call_to_object); |
1454 __ push(r0); | 1450 __ push(r0); |
1455 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1451 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
1456 __ b(&push_receiver); | 1452 __ b(&push_receiver); |
1457 | 1453 |
1458 // Use the current global receiver object as the receiver. | 1454 // Use the current global receiver object as the receiver. |
1459 __ bind(&use_global_receiver); | 1455 __ bind(&use_global_receiver); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 __ bind(&dont_adapt_arguments); | 1631 __ bind(&dont_adapt_arguments); |
1636 __ Jump(r3); | 1632 __ Jump(r3); |
1637 } | 1633 } |
1638 | 1634 |
1639 | 1635 |
1640 #undef __ | 1636 #undef __ |
1641 | 1637 |
1642 } } // namespace v8::internal | 1638 } } // namespace v8::internal |
1643 | 1639 |
1644 #endif // V8_TARGET_ARCH_ARM | 1640 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |