| 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" |
| 11 #include "vm/object.h" | 11 #include "vm/object.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 RawArray* CodePatcher::GetClosureArgDescAt(uword return_address, | |
| 16 const Code& code) { | |
| 17 ASSERT(code.ContainsInstructionAt(return_address)); | |
| 18 CallPattern call(return_address, code); | |
| 19 return call.ClosureArgumentsDescriptor(); | |
| 20 } | |
| 21 | |
| 22 | |
| 23 uword CodePatcher::GetStaticCallTargetAt(uword return_address, | 15 uword CodePatcher::GetStaticCallTargetAt(uword return_address, |
| 24 const Code& code) { | 16 const Code& code) { |
| 25 ASSERT(code.ContainsInstructionAt(return_address)); | 17 ASSERT(code.ContainsInstructionAt(return_address)); |
| 26 CallPattern call(return_address, code); | 18 CallPattern call(return_address, code); |
| 27 return call.TargetAddress(); | 19 return call.TargetAddress(); |
| 28 } | 20 } |
| 29 | 21 |
| 30 | 22 |
| 31 void CodePatcher::PatchStaticCallAt(uword return_address, | 23 void CodePatcher::PatchStaticCallAt(uword return_address, |
| 32 const Code& code, | 24 const Code& code, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 153 |
| 162 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 154 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
| 163 ASSERT(code.ContainsInstructionAt(pc)); | 155 ASSERT(code.ContainsInstructionAt(pc)); |
| 164 EdgeCounter counter(pc, code); | 156 EdgeCounter counter(pc, code); |
| 165 return counter.edge_counter(); | 157 return counter.edge_counter(); |
| 166 } | 158 } |
| 167 | 159 |
| 168 } // namespace dart | 160 } // namespace dart |
| 169 | 161 |
| 170 #endif // defined TARGET_ARCH_ARM64 | 162 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |