OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 void CodePatcher::PatchPoolPointerCallAt(uword return_address, | 73 void CodePatcher::PatchPoolPointerCallAt(uword return_address, |
74 const Code& code, | 74 const Code& code, |
75 uword new_target) { | 75 uword new_target) { |
76 ASSERT(code.ContainsInstructionAt(return_address)); | 76 ASSERT(code.ContainsInstructionAt(return_address)); |
77 PoolPointerCall call(return_address, code); | 77 PoolPointerCall call(return_address, code); |
78 call.SetTarget(new_target); | 78 call.SetTarget(new_target); |
79 } | 79 } |
80 | 80 |
81 | 81 |
82 void CodePatcher::InsertCallAt(uword start, uword target) { | 82 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) { |
83 // The inserted call should not overlap the lazy deopt jump code. | 83 // The inserted call should not overlap the lazy deopt jump code. |
84 ASSERT(start + CallPattern::kLengthInBytes <= target); | 84 ASSERT(start + CallPattern::kLengthInBytes <= target); |
85 CallPattern::InsertAt(start, target); | 85 CallPattern::InsertAt(start, target); |
86 } | 86 } |
87 | 87 |
88 | 88 |
89 uword CodePatcher::GetInstanceCallAt(uword return_address, | 89 uword CodePatcher::GetInstanceCallAt(uword return_address, |
90 const Code& code, | 90 const Code& code, |
91 ICData* ic_data) { | 91 ICData* ic_data) { |
92 ASSERT(code.ContainsInstructionAt(return_address)); | 92 ASSERT(code.ContainsInstructionAt(return_address)); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 177 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
178 ASSERT(code.ContainsInstructionAt(pc)); | 178 ASSERT(code.ContainsInstructionAt(pc)); |
179 EdgeCounter counter(pc, code); | 179 EdgeCounter counter(pc, code); |
180 return counter.edge_counter(); | 180 return counter.edge_counter(); |
181 } | 181 } |
182 | 182 |
183 } // namespace dart | 183 } // namespace dart |
184 | 184 |
185 #endif // defined TARGET_ARCH_ARM64 | 185 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |