| 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 1248 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
| 1249 | 1249 |
| 1250 // Do not transform the receiver for strict mode functions. | 1250 // Do not transform the receiver for strict mode functions. |
| 1251 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 1251 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
| 1252 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); | 1252 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1253 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1253 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1254 kSmiTagSize))); | 1254 kSmiTagSize))); |
| 1255 __ b(ne, &shift_arguments); | 1255 __ b(ne, &shift_arguments); |
| 1256 | 1256 |
| 1257 // Do not transform the receiver for native (Compilerhints already in r3). | 1257 // Do not transform the receiver for native (Compilerhints already in r3). |
| 1258 __ tst(r3, Operand(1 << (SharedFunctionInfo::kES5Native + | 1258 __ tst(r3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); |
| 1259 kSmiTagSize))); | |
| 1260 __ b(ne, &shift_arguments); | 1259 __ b(ne, &shift_arguments); |
| 1261 | 1260 |
| 1262 // Compute the receiver in non-strict mode. | 1261 // Compute the receiver in non-strict mode. |
| 1263 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2)); | 1262 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2)); |
| 1264 __ ldr(r2, MemOperand(r2, -kPointerSize)); | 1263 __ ldr(r2, MemOperand(r2, -kPointerSize)); |
| 1265 // r0: actual number of arguments | 1264 // r0: actual number of arguments |
| 1266 // r1: function | 1265 // r1: function |
| 1267 // r2: first argument | 1266 // r2: first argument |
| 1268 __ tst(r2, Operand(kSmiTagMask)); | 1267 __ tst(r2, Operand(kSmiTagMask)); |
| 1269 __ b(eq, &convert_to_object); | 1268 __ b(eq, &convert_to_object); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 Label call_to_object, use_global_receiver, push_receiver; | 1432 Label call_to_object, use_global_receiver, push_receiver; |
| 1434 __ ldr(r0, MemOperand(fp, kRecvOffset)); | 1433 __ ldr(r0, MemOperand(fp, kRecvOffset)); |
| 1435 | 1434 |
| 1436 // Do not transform the receiver for strict mode functions. | 1435 // Do not transform the receiver for strict mode functions. |
| 1437 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset)); | 1436 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1438 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1437 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1439 kSmiTagSize))); | 1438 kSmiTagSize))); |
| 1440 __ b(ne, &push_receiver); | 1439 __ b(ne, &push_receiver); |
| 1441 | 1440 |
| 1442 // Do not transform the receiver for strict mode functions. | 1441 // Do not transform the receiver for strict mode functions. |
| 1443 __ tst(r2, Operand(1 << (SharedFunctionInfo::kES5Native + | 1442 __ tst(r2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); |
| 1444 kSmiTagSize))); | |
| 1445 __ b(ne, &push_receiver); | 1443 __ b(ne, &push_receiver); |
| 1446 | 1444 |
| 1447 // Compute the receiver in non-strict mode. | 1445 // Compute the receiver in non-strict mode. |
| 1448 __ tst(r0, Operand(kSmiTagMask)); | 1446 __ tst(r0, Operand(kSmiTagMask)); |
| 1449 __ b(eq, &call_to_object); | 1447 __ b(eq, &call_to_object); |
| 1450 __ LoadRoot(r1, Heap::kNullValueRootIndex); | 1448 __ LoadRoot(r1, Heap::kNullValueRootIndex); |
| 1451 __ cmp(r0, r1); | 1449 __ cmp(r0, r1); |
| 1452 __ b(eq, &use_global_receiver); | 1450 __ b(eq, &use_global_receiver); |
| 1453 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); | 1451 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); |
| 1454 __ cmp(r0, r1); | 1452 __ cmp(r0, r1); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 __ bind(&dont_adapt_arguments); | 1647 __ bind(&dont_adapt_arguments); |
| 1650 __ Jump(r3); | 1648 __ Jump(r3); |
| 1651 } | 1649 } |
| 1652 | 1650 |
| 1653 | 1651 |
| 1654 #undef __ | 1652 #undef __ |
| 1655 | 1653 |
| 1656 } } // namespace v8::internal | 1654 } } // namespace v8::internal |
| 1657 | 1655 |
| 1658 #endif // V8_TARGET_ARCH_ARM | 1656 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |