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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) { | 55 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) { |
56 UNIMPLEMENTED(); | 56 UNIMPLEMENTED(); |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 void CodePatcher::InsertCallAt(uword start, uword target) { | 60 void CodePatcher::InsertCallAt(uword start, uword target) { |
61 // The inserted call should not overlap the lazy deopt jump code. | 61 // The inserted call should not overlap the lazy deopt jump code. |
62 ASSERT(start + CallPattern::kFixedLengthInBytes <= target); | 62 ASSERT(start + CallPattern::LengthInBytes() <= target); |
63 CallPattern::InsertAt(start, target); | 63 CallPattern::InsertAt(start, target); |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 uword CodePatcher::GetInstanceCallAt(uword return_address, | 67 uword CodePatcher::GetInstanceCallAt(uword return_address, |
68 const Code& code, | 68 const Code& code, |
69 ICData* ic_data) { | 69 ICData* ic_data) { |
70 ASSERT(code.ContainsInstructionAt(return_address)); | 70 ASSERT(code.ContainsInstructionAt(return_address)); |
71 CallPattern call(return_address, code); | 71 CallPattern call(return_address, code); |
72 if (ic_data != NULL) { | 72 if (ic_data != NULL) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 133 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
134 ASSERT(code.ContainsInstructionAt(pc)); | 134 ASSERT(code.ContainsInstructionAt(pc)); |
135 EdgeCounter counter(pc, code); | 135 EdgeCounter counter(pc, code); |
136 return counter.edge_counter(); | 136 return counter.edge_counter(); |
137 } | 137 } |
138 | 138 |
139 } // namespace dart | 139 } // namespace dart |
140 | 140 |
141 #endif // defined TARGET_ARCH_ARM | 141 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |