| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); | 1355 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); |
| 1356 __ LeaveStubFrame(); | 1356 __ LeaveStubFrame(); |
| 1357 Label call_target_function; | 1357 Label call_target_function; |
| 1358 __ b(&call_target_function); | 1358 __ b(&call_target_function); |
| 1359 | 1359 |
| 1360 __ Bind(&found); | 1360 __ Bind(&found); |
| 1361 // R6: pointer to an IC data check group. | 1361 // R6: pointer to an IC data check group. |
| 1362 const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize; | 1362 const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize; |
| 1363 const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize; | 1363 const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize; |
| 1364 __ LoadFromOffset(kWord, R0, R6, target_offset); | 1364 __ LoadFromOffset(kWord, R0, R6, target_offset); |
| 1365 |
| 1366 // Update counter. |
| 1365 __ LoadFromOffset(kWord, R1, R6, count_offset); | 1367 __ LoadFromOffset(kWord, R1, R6, count_offset); |
| 1366 __ adds(R1, R1, Operand(Smi::RawValue(1))); | 1368 __ adds(R1, R1, Operand(Smi::RawValue(1))); |
| 1367 __ StoreToOffset(kWord, R1, R6, count_offset); | 1369 __ LoadImmediate(R1, Smi::RawValue(Smi::kMaxValue), VS); // Overflow. |
| 1368 __ b(&call_target_function, VC); // No overflow. | |
| 1369 __ LoadImmediate(R1, Smi::RawValue(Smi::kMaxValue)); | |
| 1370 __ StoreToOffset(kWord, R1, R6, count_offset); | 1370 __ StoreToOffset(kWord, R1, R6, count_offset); |
| 1371 | 1371 |
| 1372 __ Bind(&call_target_function); | 1372 __ Bind(&call_target_function); |
| 1373 // R0: target function. | 1373 // R0: target function. |
| 1374 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); | 1374 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); |
| 1375 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); | 1375 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); |
| 1376 __ bx(R2); | 1376 __ bx(R2); |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 | 1379 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 const Register right = R0; | 1832 const Register right = R0; |
| 1833 __ ldr(left, Address(SP, 1 * kWordSize)); | 1833 __ ldr(left, Address(SP, 1 * kWordSize)); |
| 1834 __ ldr(right, Address(SP, 0 * kWordSize)); | 1834 __ ldr(right, Address(SP, 0 * kWordSize)); |
| 1835 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1835 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1836 __ Ret(); | 1836 __ Ret(); |
| 1837 } | 1837 } |
| 1838 | 1838 |
| 1839 } // namespace dart | 1839 } // namespace dart |
| 1840 | 1840 |
| 1841 #endif // defined TARGET_ARCH_ARM | 1841 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |