| 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/instructions.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 ASSERT(code.ContainsInstructionAt(return_address)); | 26 ASSERT(code.ContainsInstructionAt(return_address)); |
| 27 CallPattern call(return_address, code); | 27 CallPattern call(return_address, code); |
| 28 call.SetTargetAddress(new_target); | 28 call.SetTargetAddress(new_target); |
| 29 } | 29 } |
| 30 | 30 |
| 31 | 31 |
| 32 void CodePatcher::PatchInstanceCallAt(uword return_address, | 32 void CodePatcher::PatchInstanceCallAt(uword return_address, |
| 33 const Code& code, | 33 const Code& code, |
| 34 uword new_target) { | 34 uword new_target) { |
| 35 ASSERT(code.ContainsInstructionAt(return_address)); | 35 ASSERT(code.ContainsInstructionAt(return_address)); |
| 36 UNIMPLEMENTED(); | 36 CallPattern call(return_address, code); |
| 37 call.SetTargetAddress(new_target); |
| 37 } | 38 } |
| 38 | 39 |
| 39 | 40 |
| 40 void CodePatcher::InsertCallAt(uword start, uword target) { | 41 void CodePatcher::InsertCallAt(uword start, uword target) { |
| 41 UNIMPLEMENTED(); | 42 UNIMPLEMENTED(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 | 45 |
| 45 uword CodePatcher::GetInstanceCallAt(uword return_address, | 46 uword CodePatcher::GetInstanceCallAt(uword return_address, |
| 46 const Code& code, | 47 const Code& code, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 60 | 61 |
| 61 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 62 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 62 // The instance call instruction sequence has a variable size on MIPS. | 63 // The instance call instruction sequence has a variable size on MIPS. |
| 63 UNREACHABLE(); | 64 UNREACHABLE(); |
| 64 return 0; | 65 return 0; |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace dart | 68 } // namespace dart |
| 68 | 69 |
| 69 #endif // defined TARGET_ARCH_MIPS | 70 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |