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" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
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/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 UnoptimizedStaticCall static_call(return_address); | 204 UnoptimizedStaticCall static_call(return_address); |
205 ICData& ic_data = ICData::Handle(); | 205 ICData& ic_data = ICData::Handle(); |
206 ic_data ^= static_call.ic_data(); | 206 ic_data ^= static_call.ic_data(); |
207 if (ic_data_result != NULL) { | 207 if (ic_data_result != NULL) { |
208 *ic_data_result = ic_data.raw(); | 208 *ic_data_result = ic_data.raw(); |
209 } | 209 } |
210 return ic_data.GetTargetAt(0); | 210 return ic_data.GetTargetAt(0); |
211 } | 211 } |
212 | 212 |
213 | 213 |
| 214 void CodePatcher::PatchSwitchableCallAt(uword return_address, |
| 215 const Code& code, |
| 216 const ICData& ic_data, |
| 217 const MegamorphicCache& cache, |
| 218 const Code& lookup_stub) { |
| 219 // Switchable instance calls only generated for precompilation. |
| 220 UNREACHABLE(); |
| 221 } |
| 222 |
| 223 |
214 void CodePatcher::PatchNativeCallAt(uword return_address, | 224 void CodePatcher::PatchNativeCallAt(uword return_address, |
215 const Code& code, | 225 const Code& code, |
216 NativeFunction target, | 226 NativeFunction target, |
217 const Code& trampoline) { | 227 const Code& trampoline) { |
218 UNREACHABLE(); | 228 UNREACHABLE(); |
219 } | 229 } |
220 | 230 |
221 | 231 |
222 RawCode* CodePatcher::GetNativeCallAt(uword return_address, | 232 RawCode* CodePatcher::GetNativeCallAt(uword return_address, |
223 const Code& code, | 233 const Code& code, |
224 NativeFunction* target) { | 234 NativeFunction* target) { |
225 UNREACHABLE(); | 235 UNREACHABLE(); |
226 return NULL; | 236 return NULL; |
227 } | 237 } |
228 | 238 |
229 | 239 |
230 | 240 |
231 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 241 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
232 return InstanceCall::kPatternSize; | 242 return InstanceCall::kPatternSize; |
233 } | 243 } |
234 | 244 |
235 } // namespace dart | 245 } // namespace dart |
236 | 246 |
237 #endif // defined TARGET_ARCH_IA32 | 247 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |