| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 __ EnterStubFrame(); | 1461 __ EnterStubFrame(); |
| 1462 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1462 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| 1463 // Preserve IC data object and arguments descriptor array and | 1463 // Preserve IC data object and arguments descriptor array and |
| 1464 // setup space on stack for result (target code object). | 1464 // setup space on stack for result (target code object). |
| 1465 __ PushList((1 << R0) | (1 << R4) | (1 << R5)); | 1465 __ PushList((1 << R0) | (1 << R4) | (1 << R5)); |
| 1466 // Push call arguments. | 1466 // Push call arguments. |
| 1467 for (intptr_t i = 0; i < num_args; i++) { | 1467 for (intptr_t i = 0; i < num_args; i++) { |
| 1468 __ LoadFromOffset(kWord, IP, R7, -i * kWordSize); | 1468 __ LoadFromOffset(kWord, IP, R7, -i * kWordSize); |
| 1469 __ Push(IP); | 1469 __ Push(IP); |
| 1470 } | 1470 } |
| 1471 // Pass IC data object and arguments descriptor array. | 1471 // Pass IC data object. |
| 1472 __ PushList((1 << R4) | (1 << R5)); | 1472 __ Push(R5); |
| 1473 | 1473 |
| 1474 if (num_args == 1) { | 1474 if (num_args == 1) { |
| 1475 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry); | 1475 __ CallRuntime(kInlineCacheMissHandlerOneArgRuntimeEntry); |
| 1476 } else if (num_args == 2) { | 1476 } else if (num_args == 2) { |
| 1477 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry); | 1477 __ CallRuntime(kInlineCacheMissHandlerTwoArgsRuntimeEntry); |
| 1478 } else if (num_args == 3) { | 1478 } else if (num_args == 3) { |
| 1479 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry); | 1479 __ CallRuntime(kInlineCacheMissHandlerThreeArgsRuntimeEntry); |
| 1480 } else { | 1480 } else { |
| 1481 UNIMPLEMENTED(); | 1481 UNIMPLEMENTED(); |
| 1482 } | 1482 } |
| 1483 // Remove the call arguments pushed earlier, including the IC data object | 1483 // Remove the call arguments pushed earlier, including the IC data object. |
| 1484 // and the arguments descriptor array. | 1484 __ Drop(num_args + 1); |
| 1485 __ Drop(num_args + 2); | |
| 1486 // Pop returned code object into R0 (null if not found). | 1485 // Pop returned code object into R0 (null if not found). |
| 1487 // Restore arguments descriptor array and IC data array. | 1486 // Restore arguments descriptor array and IC data array. |
| 1488 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); | 1487 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); |
| 1489 __ LeaveStubFrame(); | 1488 __ LeaveStubFrame(); |
| 1490 Label call_target_function; | 1489 Label call_target_function; |
| 1491 __ CompareImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1490 __ CompareImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| 1492 __ b(&call_target_function, NE); | 1491 __ b(&call_target_function, NE); |
| 1493 // NoSuchMethod or closure. | 1492 // NoSuchMethod or closure. |
| 1494 // Mark IC call that it may be a closure call that does not collect | 1493 // Mark IC call that it may be a closure call that does not collect |
| 1495 // type feedback. | 1494 // type feedback. |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 __ ldr(left, Address(SP, 4 * kWordSize)); | 2090 __ ldr(left, Address(SP, 4 * kWordSize)); |
| 2092 __ ldr(right, Address(SP, 3 * kWordSize)); | 2091 __ ldr(right, Address(SP, 3 * kWordSize)); |
| 2093 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2092 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2094 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 2093 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 2095 __ Ret(); | 2094 __ Ret(); |
| 2096 } | 2095 } |
| 2097 | 2096 |
| 2098 } // namespace dart | 2097 } // namespace dart |
| 2099 | 2098 |
| 2100 #endif // defined TARGET_ARCH_ARM | 2099 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |