| 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1724 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| 1725 // Preserve arguments descriptor and make room for result. | 1725 // Preserve arguments descriptor and make room for result. |
| 1726 __ PushList((1 << R0) | (1 << R5)); | 1726 __ PushList((1 << R0) | (1 << R5)); |
| 1727 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); | 1727 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
| 1728 __ PopList((1 << R0) | (1 << R5)); | 1728 __ PopList((1 << R0) | (1 << R5)); |
| 1729 __ LeaveStubFrame(); | 1729 __ LeaveStubFrame(); |
| 1730 __ bx(R0); | 1730 __ bx(R0); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 | 1733 |
| 1734 // R5: Contains Smi 0 (need to preserve a GC-safe value for the lazy compile | |
| 1735 // stub). | |
| 1736 // R4: Contains an arguments descriptor. | |
| 1737 void StubCode::GenerateClosureCallBreakpointStub(Assembler* assembler) { | |
| 1738 __ EnterStubFrame(); | |
| 1739 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | |
| 1740 // Preserve arguments descriptor and make room for result. | |
| 1741 __ PushList((1 << R0) | (1 << R4) | (1 << R5)); | |
| 1742 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); | |
| 1743 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); | |
| 1744 __ LeaveStubFrame(); | |
| 1745 __ bx(R0); | |
| 1746 } | |
| 1747 | |
| 1748 | |
| 1749 void StubCode::GenerateRuntimeCallBreakpointStub(Assembler* assembler) { | 1734 void StubCode::GenerateRuntimeCallBreakpointStub(Assembler* assembler) { |
| 1750 __ EnterStubFrame(); | 1735 __ EnterStubFrame(); |
| 1751 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1736 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
| 1752 // Make room for result. | 1737 // Make room for result. |
| 1753 __ PushList((1 << R0)); | 1738 __ PushList((1 << R0)); |
| 1754 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); | 1739 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
| 1755 __ PopList((1 << R0)); | 1740 __ PopList((1 << R0)); |
| 1756 __ LeaveStubFrame(); | 1741 __ LeaveStubFrame(); |
| 1757 __ bx(R0); | 1742 __ bx(R0); |
| 1758 } | 1743 } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 // Result: | 2101 // Result: |
| 2117 // R1: entry point. | 2102 // R1: entry point. |
| 2118 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2103 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
| 2119 EmitMegamorphicLookup(assembler, R0, R1, R1); | 2104 EmitMegamorphicLookup(assembler, R0, R1, R1); |
| 2120 __ Ret(); | 2105 __ Ret(); |
| 2121 } | 2106 } |
| 2122 | 2107 |
| 2123 } // namespace dart | 2108 } // namespace dart |
| 2124 | 2109 |
| 2125 #endif // defined TARGET_ARCH_ARM | 2110 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |