| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/assembler_macros.h" | 9 #include "vm/assembler_macros.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2023 __ pushq(RAX); // arg 1 | 2023 __ pushq(RAX); // arg 1 |
| 2024 __ PushObject(equal_name); // Target's name. | 2024 __ PushObject(equal_name); // Target's name. |
| 2025 __ pushq(RBX); // ICData | 2025 __ pushq(RBX); // ICData |
| 2026 __ CallRuntime(kUpdateICDataTwoArgsRuntimeEntry); | 2026 __ CallRuntime(kUpdateICDataTwoArgsRuntimeEntry); |
| 2027 __ Drop(4); | 2027 __ Drop(4); |
| 2028 __ LeaveFrame(); | 2028 __ LeaveFrame(); |
| 2029 | 2029 |
| 2030 __ jmp(&compute_result, Assembler::kNearJump); | 2030 __ jmp(&compute_result, Assembler::kNearJump); |
| 2031 } | 2031 } |
| 2032 | 2032 |
| 2033 // Calls to runtime to ooptimized give function |
| 2034 // RDX: function to be reoptimized. |
| 2035 // RAX: result of function being optimized (preserved). |
| 2036 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
| 2037 AssemblerMacros::EnterStubFrame(assembler); |
| 2038 __ pushq(RAX); |
| 2039 __ pushq(RDX); |
| 2040 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry); |
| 2041 __ popq(RDX); |
| 2042 __ popq(RAX); |
| 2043 __ LeaveFrame(); |
| 2044 __ ret(); |
| 2045 } |
| 2046 |
| 2033 } // namespace dart | 2047 } // namespace dart |
| 2034 | 2048 |
| 2035 #endif // defined TARGET_ARCH_X64 | 2049 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |