| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 public: | 109 public: |
| 110 explicit InstanceCall(uword return_address) | 110 explicit InstanceCall(uword return_address) |
| 111 : DartCallPattern(return_address) {} | 111 : DartCallPattern(return_address) {} |
| 112 | 112 |
| 113 RawICData* ic_data() const { | 113 RawICData* ic_data() const { |
| 114 ICData& ic_data = ICData::Handle(); | 114 ICData& ic_data = ICData::Handle(); |
| 115 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); | 115 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); |
| 116 return ic_data.raw(); | 116 return ic_data.raw(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void SetIcData(const ICData& value) { | |
| 120 set_immediate_one(reinterpret_cast<int64_t>(value.raw())); | |
| 121 } | |
| 122 | |
| 123 private: | 119 private: |
| 124 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); | 120 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); |
| 125 }; | 121 }; |
| 126 | 122 |
| 127 | 123 |
| 128 void CodePatcher::GetStaticCallAt(uword return_address, | 124 void CodePatcher::GetStaticCallAt(uword return_address, |
| 129 Function* function, | 125 Function* function, |
| 130 uword* target) { | 126 uword* target) { |
| 131 ASSERT(function != NULL); | 127 ASSERT(function != NULL); |
| 132 ASSERT(target != NULL); | 128 ASSERT(target != NULL); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 237 } |
| 242 | 238 |
| 243 | 239 |
| 244 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 240 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 245 return DartCallPattern::kCallPatternSize; | 241 return DartCallPattern::kCallPatternSize; |
| 246 } | 242 } |
| 247 | 243 |
| 248 } // namespace dart | 244 } // namespace dart |
| 249 | 245 |
| 250 #endif // defined TARGET_ARCH_X64 | 246 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |