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/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 void CodePatcher::PatchInstanceCallAt(uword return_address, | 33 void CodePatcher::PatchInstanceCallAt(uword return_address, |
34 const Code& code, | 34 const Code& code, |
35 uword new_target) { | 35 uword new_target) { |
36 ASSERT(code.ContainsInstructionAt(return_address)); | 36 ASSERT(code.ContainsInstructionAt(return_address)); |
37 CallPattern call(return_address, code); | 37 CallPattern call(return_address, code); |
38 call.SetTargetAddress(new_target); | 38 call.SetTargetAddress(new_target); |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 int32_t CodePatcher::GetPoolOffsetAt(uword return_address) { | |
43 UNIMPLEMENTED(); | |
44 return 0; | |
45 } | |
46 | |
47 | |
48 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) { | |
49 UNIMPLEMENTED(); | |
50 } | |
51 | |
52 | |
53 void CodePatcher::InsertCallAt(uword start, uword target) { | 42 void CodePatcher::InsertCallAt(uword start, uword target) { |
54 // The inserted call should not overlap the lazy deopt jump code. | 43 // The inserted call should not overlap the lazy deopt jump code. |
55 ASSERT(start + CallPattern::LengthInBytes() <= target); | 44 ASSERT(start + CallPattern::LengthInBytes() <= target); |
56 CallPattern::InsertAt(start, target); | 45 CallPattern::InsertAt(start, target); |
57 } | 46 } |
58 | 47 |
59 | 48 |
60 uword CodePatcher::GetInstanceCallAt(uword return_address, | 49 uword CodePatcher::GetInstanceCallAt(uword return_address, |
61 const Code& code, | 50 const Code& code, |
62 ICData* ic_data) { | 51 ICData* ic_data) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 115 |
127 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 116 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
128 ASSERT(code.ContainsInstructionAt(pc)); | 117 ASSERT(code.ContainsInstructionAt(pc)); |
129 EdgeCounter counter(pc, code); | 118 EdgeCounter counter(pc, code); |
130 return counter.edge_counter(); | 119 return counter.edge_counter(); |
131 } | 120 } |
132 | 121 |
133 } // namespace dart | 122 } // namespace dart |
134 | 123 |
135 #endif // defined TARGET_ARCH_ARM | 124 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |