| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 public: | 127 public: |
| 128 explicit InstanceCall(uword return_address) | 128 explicit InstanceCall(uword return_address) |
| 129 : DartCallPattern(return_address) {} | 129 : DartCallPattern(return_address) {} |
| 130 | 130 |
| 131 RawICData* ic_data() const { | 131 RawICData* ic_data() const { |
| 132 ICData& ic_data = ICData::Handle(); | 132 ICData& ic_data = ICData::Handle(); |
| 133 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); | 133 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); |
| 134 return ic_data.raw(); | 134 return ic_data.raw(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SetIcData(const ICData& value) { | |
| 138 set_immediate_one(reinterpret_cast<int32_t>(value.raw())); | |
| 139 } | |
| 140 | |
| 141 private: | 137 private: |
| 142 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); | 138 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); |
| 143 }; | 139 }; |
| 144 | 140 |
| 145 | 141 |
| 146 void CodePatcher::GetStaticCallAt(uword return_address, | 142 void CodePatcher::GetStaticCallAt(uword return_address, |
| 147 Function* function, | 143 Function* function, |
| 148 uword* target) { | 144 uword* target) { |
| 149 ASSERT(function != NULL); | 145 ASSERT(function != NULL); |
| 150 ASSERT(target != NULL); | 146 ASSERT(target != NULL); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 255 } |
| 260 | 256 |
| 261 | 257 |
| 262 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 258 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 263 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize; | 259 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize; |
| 264 } | 260 } |
| 265 | 261 |
| 266 } // namespace dart | 262 } // namespace dart |
| 267 | 263 |
| 268 #endif // defined TARGET_ARCH_IA32 | 264 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |