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_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1675 GenerateNArgsCheckInlineCacheStub(assembler, 1); | 1675 GenerateNArgsCheckInlineCacheStub(assembler, 1); |
1676 } | 1676 } |
1677 | 1677 |
1678 | 1678 |
1679 // Megamorphic call is currently implemented as IC call but through a stub | 1679 // Megamorphic call is currently implemented as IC call but through a stub |
1680 // that does not check/count function invocations. | 1680 // that does not check/count function invocations. |
1681 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { | 1681 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { |
1682 GenerateNArgsCheckInlineCacheStub(assembler, 1); | 1682 GenerateNArgsCheckInlineCacheStub(assembler, 1); |
1683 } | 1683 } |
1684 | 1684 |
| 1685 |
| 1686 // R10: Arguments descriptor array. |
| 1687 // TOS(0): return address (Dart code). |
| 1688 void StubCode::GenerateBreakpointClosureStub(Assembler* assembler) { |
| 1689 __ EnterStubFrame(); |
| 1690 __ pushq(R10); // Preserve arguments descriptor. |
| 1691 __ CallRuntime(kBreakpointClosureHandlerRuntimeEntry); |
| 1692 __ popq(R10); // Restore arguments descriptor. |
| 1693 __ LeaveFrame(); |
| 1694 __ jmp(&StubCode::CallClosureFunctionLabel()); |
| 1695 } |
| 1696 |
| 1697 |
1685 // R10: Arguments descriptor array. | 1698 // R10: Arguments descriptor array. |
1686 // TOS(0): return address (Dart code). | 1699 // TOS(0): return address (Dart code). |
1687 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { | 1700 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { |
1688 const Immediate& raw_null = | 1701 const Immediate& raw_null = |
1689 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1702 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
1690 __ EnterStubFrame(); | 1703 __ EnterStubFrame(); |
1691 __ pushq(R10); // Preserve arguments descriptor. | 1704 __ pushq(R10); // Preserve arguments descriptor. |
1692 __ pushq(raw_null); // Room for result. | 1705 __ pushq(raw_null); // Room for result. |
1693 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); | 1706 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); |
1694 __ popq(RAX); // Code object. | 1707 __ popq(RAX); // Code object. |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 __ cmpq(left, right); | 2090 __ cmpq(left, right); |
2078 __ Bind(&done); | 2091 __ Bind(&done); |
2079 __ popq(right); | 2092 __ popq(right); |
2080 __ popq(left); | 2093 __ popq(left); |
2081 __ ret(); | 2094 __ ret(); |
2082 } | 2095 } |
2083 | 2096 |
2084 } // namespace dart | 2097 } // namespace dart |
2085 | 2098 |
2086 #endif // defined TARGET_ARCH_X64 | 2099 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |