| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 void CodePatcher::PatchInstanceCallAt(uword return_address, | 40 void CodePatcher::PatchInstanceCallAt(uword return_address, |
| 41 const Code& code, | 41 const Code& code, |
| 42 uword new_target) { | 42 uword new_target) { |
| 43 ASSERT(code.ContainsInstructionAt(return_address)); | 43 ASSERT(code.ContainsInstructionAt(return_address)); |
| 44 CallPattern call(return_address, code); | 44 CallPattern call(return_address, code); |
| 45 call.SetTargetAddress(new_target); | 45 call.SetTargetAddress(new_target); |
| 46 } | 46 } |
| 47 | 47 |
| 48 | 48 |
| 49 int32_t CodePatcher::GetPoolOffsetAt(uword return_address) { |
| 50 UNIMPLEMENTED(); |
| 51 return 0; |
| 52 } |
| 53 |
| 54 |
| 55 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) { |
| 56 UNIMPLEMENTED(); |
| 57 } |
| 58 |
| 59 |
| 49 void CodePatcher::InsertCallAt(uword start, uword target) { | 60 void CodePatcher::InsertCallAt(uword start, uword target) { |
| 50 // The inserted call should not overlap the lazy deopt jump code. | 61 // The inserted call should not overlap the lazy deopt jump code. |
| 51 ASSERT(start + CallPattern::kFixedLengthInBytes <= target); | 62 ASSERT(start + CallPattern::kFixedLengthInBytes <= target); |
| 52 CallPattern::InsertAt(start, target); | 63 CallPattern::InsertAt(start, target); |
| 53 } | 64 } |
| 54 | 65 |
| 55 | 66 |
| 56 uword CodePatcher::GetInstanceCallAt(uword return_address, | 67 uword CodePatcher::GetInstanceCallAt(uword return_address, |
| 57 const Code& code, | 68 const Code& code, |
| 58 ICData* ic_data) { | 69 ICData* ic_data) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 132 |
| 122 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 133 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
| 123 ASSERT(code.ContainsInstructionAt(pc)); | 134 ASSERT(code.ContainsInstructionAt(pc)); |
| 124 EdgeCounter counter(pc, code); | 135 EdgeCounter counter(pc, code); |
| 125 return counter.edge_counter(); | 136 return counter.edge_counter(); |
| 126 } | 137 } |
| 127 | 138 |
| 128 } // namespace dart | 139 } // namespace dart |
| 129 | 140 |
| 130 #endif // defined TARGET_ARCH_ARM | 141 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |