OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 bool CodePatcher::IsDartCall(uword return_address) { | 172 bool CodePatcher::IsDartCall(uword return_address) { |
173 return DartCallPattern::IsValid(return_address); | 173 return DartCallPattern::IsValid(return_address); |
174 } | 174 } |
175 | 175 |
176 | 176 |
177 uword CodePatcher::GetInstanceCallAt(uword return_address, | 177 uword CodePatcher::GetInstanceCallAt(uword return_address, |
178 ICData* ic_data, | 178 ICData* ic_data, |
179 Array* arguments_descriptor) { | 179 Array* arguments_descriptor) { |
180 InstanceCall call(return_address); | 180 InstanceCall call(return_address); |
181 if (ic_data != NULL) { | 181 if (ic_data != NULL) { |
182 *ic_data ^= call.ic_data(); | 182 *ic_data |= call.ic_data(); |
183 } | 183 } |
184 if (arguments_descriptor != NULL) { | 184 if (arguments_descriptor != NULL) { |
185 *arguments_descriptor ^= call.arguments_descriptor(); | 185 *arguments_descriptor ^= call.arguments_descriptor(); |
186 } | 186 } |
187 return call.target(); | 187 return call.target(); |
188 } | 188 } |
189 | 189 |
190 | 190 |
191 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 191 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
192 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize; | 192 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize; |
193 } | 193 } |
194 | 194 |
195 } // namespace dart | 195 } // namespace dart |
196 | 196 |
197 #endif // defined TARGET_ARCH_IA32 | 197 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |