| 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" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 | 9 |
| 10 #include "vm/instructions.h" |
| 10 #include "vm/object.h" | 11 #include "vm/object.h" |
| 11 | 12 |
| 12 namespace dart { | 13 namespace dart { |
| 13 | 14 |
| 14 uword CodePatcher::GetStaticCallTargetAt(uword return_address, | 15 uword CodePatcher::GetStaticCallTargetAt(uword return_address, |
| 15 const Code& code) { | 16 const Code& code) { |
| 16 ASSERT(code.ContainsInstructionAt(return_address)); | 17 ASSERT(code.ContainsInstructionAt(return_address)); |
| 17 UNIMPLEMENTED(); | 18 CallPattern call(return_address, code); |
| 18 return 0; | 19 return call.TargetAddress(); |
| 19 } | 20 } |
| 20 | 21 |
| 21 | 22 |
| 22 void CodePatcher::PatchStaticCallAt(uword return_address, | 23 void CodePatcher::PatchStaticCallAt(uword return_address, |
| 23 const Code& code, | 24 const Code& code, |
| 24 uword new_target) { | 25 uword new_target) { |
| 25 ASSERT(code.ContainsInstructionAt(return_address)); | 26 ASSERT(code.ContainsInstructionAt(return_address)); |
| 26 UNIMPLEMENTED(); | 27 CallPattern call(return_address, code); |
| 28 call.SetTargetAddress(new_target); |
| 27 } | 29 } |
| 28 | 30 |
| 29 | 31 |
| 30 void CodePatcher::PatchInstanceCallAt(uword return_address, | 32 void CodePatcher::PatchInstanceCallAt(uword return_address, |
| 31 const Code& code, | 33 const Code& code, |
| 32 uword new_target) { | 34 uword new_target) { |
| 33 ASSERT(code.ContainsInstructionAt(return_address)); | 35 ASSERT(code.ContainsInstructionAt(return_address)); |
| 34 UNIMPLEMENTED(); | 36 UNIMPLEMENTED(); |
| 35 } | 37 } |
| 36 | 38 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 51 | 53 |
| 52 | 54 |
| 53 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 55 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 54 UNIMPLEMENTED(); | 56 UNIMPLEMENTED(); |
| 55 return 0; | 57 return 0; |
| 56 } | 58 } |
| 57 | 59 |
| 58 } // namespace dart | 60 } // namespace dart |
| 59 | 61 |
| 60 #endif // defined TARGET_ARCH_MIPS | 62 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |