| 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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 | 1701 |
| 1702 | 1702 |
| 1703 // Megamorphic call is currently implemented as IC call but through a stub | 1703 // Megamorphic call is currently implemented as IC call but through a stub |
| 1704 // that does not check/count function invocations. | 1704 // that does not check/count function invocations. |
| 1705 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { | 1705 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { |
| 1706 GenerateNArgsCheckInlineCacheStub(assembler, 1); | 1706 GenerateNArgsCheckInlineCacheStub(assembler, 1); |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 | 1709 |
| 1710 // EDX: Arguments descriptor array. | 1710 // EDX: Arguments descriptor array. |
| 1711 void StubCode::GenerateBreakpointClosureStub(Assembler* assembler) { |
| 1712 __ EnterStubFrame(); |
| 1713 __ pushl(EDX); // Push arguments descriptor. |
| 1714 __ CallRuntime(kBreakpointClosureHandlerRuntimeEntry); |
| 1715 __ popl(EDX); // Restore arguments descriptor. |
| 1716 __ LeaveFrame(); |
| 1717 __ jmp(&StubCode::CallClosureFunctionLabel()); |
| 1718 } |
| 1719 |
| 1720 |
| 1721 // EDX: Arguments descriptor array. |
| 1711 // TOS(0): return address (Dart code). | 1722 // TOS(0): return address (Dart code). |
| 1712 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { | 1723 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { |
| 1713 // Create a stub frame as we are pushing some objects on the stack before | 1724 // Create a stub frame as we are pushing some objects on the stack before |
| 1714 // calling into the runtime. | 1725 // calling into the runtime. |
| 1715 __ EnterStubFrame(); | 1726 __ EnterStubFrame(); |
| 1716 __ pushl(EDX); // Preserve arguments descriptor. | 1727 __ pushl(EDX); // Preserve arguments descriptor. |
| 1717 const Immediate& raw_null = | 1728 const Immediate& raw_null = |
| 1718 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1729 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1719 __ pushl(raw_null); // Room for result. | 1730 __ pushl(raw_null); // Room for result. |
| 1720 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); | 1731 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry); |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 __ Bind(&done); | 2134 __ Bind(&done); |
| 2124 __ popl(temp); | 2135 __ popl(temp); |
| 2125 __ popl(right); | 2136 __ popl(right); |
| 2126 __ popl(left); | 2137 __ popl(left); |
| 2127 __ ret(); | 2138 __ ret(); |
| 2128 } | 2139 } |
| 2129 | 2140 |
| 2130 } // namespace dart | 2141 } // namespace dart |
| 2131 | 2142 |
| 2132 #endif // defined TARGET_ARCH_IA32 | 2143 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |