Chromium Code Reviews| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 RawICData* CodePatcher::GetInstanceCallIcDataAt(uword return_address) { | 234 RawICData* CodePatcher::GetInstanceCallIcDataAt(uword return_address) { |
| 235 InstanceCall call(return_address); | 235 InstanceCall call(return_address); |
| 236 return call.ic_data(); | 236 return call.ic_data(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 | 239 |
| 240 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 240 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 241 return DartCallPattern::kCallPatternSize; | 241 return DartCallPattern::kCallPatternSize; |
| 242 } | 242 } |
| 243 | 243 |
| 244 | |
| 245 RawArray* CodePatcher::GetTypeTestArray(uword instruction_address) { | |
| 246 UNIMPLEMENTED(); // Untested. | |
| 247 Array& result = Array::Handle(); | |
| 248 uint64_t* target_addr = reinterpret_cast<uint64_t*>(instruction_address + 1); | |
|
regis
2012/04/06 00:44:01
I do not think offset +1 is correct.
You always to
srdjan
2012/04/06 15:58:34
Deleting the code in both, leaving UNIMPLEMENTED.
| |
| 249 result ^= reinterpret_cast<RawObject*>(*target_addr); | |
| 250 return result.raw(); | |
| 251 } | |
| 252 | |
| 253 | |
| 254 void CodePatcher::SetTypeTestArray(uword instruction_address, | |
| 255 const Array& value) { | |
| 256 UNIMPLEMENTED(); // Untested. | |
| 257 uint64_t* target_addr = reinterpret_cast<uint64_t*>(instruction_address + 1); | |
|
regis
2012/04/06 00:44:01
ditto
srdjan
2012/04/06 15:58:34
ditto
| |
| 258 *target_addr = reinterpret_cast<uint64_t>(value.raw()); | |
| 259 } | |
| 260 | |
| 261 | |
| 244 } // namespace dart | 262 } // namespace dart |
| 245 | 263 |
| 246 #endif // defined TARGET_ARCH_X64 | 264 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |