| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 void CodePatcher::PatchPoolPointerCallAt(uword return_address, | 64 void CodePatcher::PatchPoolPointerCallAt(uword return_address, |
| 65 const Code& code, | 65 const Code& code, |
| 66 const Code& new_target) { | 66 const Code& new_target) { |
| 67 ASSERT(code.ContainsInstructionAt(return_address)); | 67 ASSERT(code.ContainsInstructionAt(return_address)); |
| 68 PoolPointerCall call(return_address, code); | 68 PoolPointerCall call(return_address, code); |
| 69 call.SetTarget(new_target); | 69 call.SetTarget(new_target); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) { | 73 void CodePatcher::InsertDeoptimizationCallAt(uword start) { |
| 74 // The inserted call should not overlap the lazy deopt jump code. | 74 UNREACHABLE(); |
| 75 ASSERT(start + CallPattern::kDeoptCallLengthInBytes <= target); | |
| 76 CallPattern::InsertDeoptCallAt(start, target); | |
| 77 } | 75 } |
| 78 | 76 |
| 79 | 77 |
| 80 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, | 78 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, |
| 81 const Code& code, | 79 const Code& code, |
| 82 ICData* ic_data) { | 80 ICData* ic_data) { |
| 83 ASSERT(code.ContainsInstructionAt(return_address)); | 81 ASSERT(code.ContainsInstructionAt(return_address)); |
| 84 CallPattern call(return_address, code); | 82 CallPattern call(return_address, code); |
| 85 if (ic_data != NULL) { | 83 if (ic_data != NULL) { |
| 86 *ic_data = call.IcData(); | 84 *ic_data = call.IcData(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 NativeFunction* target) { | 150 NativeFunction* target) { |
| 153 ASSERT(code.ContainsInstructionAt(return_address)); | 151 ASSERT(code.ContainsInstructionAt(return_address)); |
| 154 NativeCallPattern call(return_address, code); | 152 NativeCallPattern call(return_address, code); |
| 155 *target = call.native_function(); | 153 *target = call.native_function(); |
| 156 return call.target(); | 154 return call.target(); |
| 157 } | 155 } |
| 158 | 156 |
| 159 } // namespace dart | 157 } // namespace dart |
| 160 | 158 |
| 161 #endif // defined TARGET_ARCH_ARM64 | 159 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |