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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 const Code& code, | 163 const Code& code, |
164 const Code& new_target) { | 164 const Code& new_target) { |
165 const Instructions& instrs = Instructions::Handle(code.instructions()); | 165 const Instructions& instrs = Instructions::Handle(code.instructions()); |
166 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size()); | 166 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size()); |
167 ASSERT(code.ContainsInstructionAt(return_address)); | 167 ASSERT(code.ContainsInstructionAt(return_address)); |
168 StaticCall call(return_address); | 168 StaticCall call(return_address); |
169 call.set_target(new_target); | 169 call.set_target(new_target); |
170 } | 170 } |
171 | 171 |
172 | 172 |
| 173 void CodePatcher::InsertDeoptimizationCallAt(uword start) { |
| 174 UNREACHABLE(); |
| 175 } |
| 176 |
| 177 |
173 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, | 178 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, |
174 const Code& code, | 179 const Code& code, |
175 ICData* ic_data) { | 180 ICData* ic_data) { |
176 ASSERT(code.ContainsInstructionAt(return_address)); | 181 ASSERT(code.ContainsInstructionAt(return_address)); |
177 InstanceCall call(return_address); | 182 InstanceCall call(return_address); |
178 if (ic_data != NULL) { | 183 if (ic_data != NULL) { |
179 *ic_data ^= call.ic_data(); | 184 *ic_data ^= call.ic_data(); |
180 } | 185 } |
181 return Code::null(); | 186 return Code::null(); |
182 } | 187 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 242 } |
238 | 243 |
239 | 244 |
240 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 245 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
241 return InstanceCall::kPatternSize; | 246 return InstanceCall::kPatternSize; |
242 } | 247 } |
243 | 248 |
244 } // namespace dart | 249 } // namespace dart |
245 | 250 |
246 #endif // defined TARGET_ARCH_IA32 | 251 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |