Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: dart/runtime/vm/code_patcher_ia32.cc

Issue 138543003: Version 1.1.1 (stable channel) (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.1/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/runtime/vm/code_patcher_arm.cc ('k') | dart/runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 void CodePatcher::PatchInstanceCallAt(uword return_address, 214 void CodePatcher::PatchInstanceCallAt(uword return_address,
215 const Code& code, 215 const Code& code,
216 uword new_target) { 216 uword new_target) {
217 ASSERT(code.ContainsInstructionAt(return_address)); 217 ASSERT(code.ContainsInstructionAt(return_address));
218 InstanceCall call(return_address); 218 InstanceCall call(return_address);
219 call.set_target(new_target); 219 call.set_target(new_target);
220 } 220 }
221 221
222 222
223 int32_t CodePatcher::GetPoolOffsetAt(uword return_address) {
224 UNREACHABLE();
225 return 0;
226 }
227
228
229 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) {
230 UNREACHABLE();
231 }
232
223 233
224 void CodePatcher::InsertCallAt(uword start, uword target) { 234 void CodePatcher::InsertCallAt(uword start, uword target) {
225 // The inserted call should not overlap the lazy deopt jump code. 235 // The inserted call should not overlap the lazy deopt jump code.
226 ASSERT(start + CallPattern::InstructionLength() <= target); 236 ASSERT(start + CallPattern::InstructionLength() <= target);
227 *reinterpret_cast<uint8_t*>(start) = 0xE8; 237 *reinterpret_cast<uint8_t*>(start) = 0xE8;
228 CallPattern call(start); 238 CallPattern call(start);
229 call.SetTargetAddress(target); 239 call.SetTargetAddress(target);
230 CPU::FlushICache(start, CallPattern::InstructionLength()); 240 CPU::FlushICache(start, CallPattern::InstructionLength());
231 } 241 }
232 242
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 298
289 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { 299 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) {
290 ASSERT(code.ContainsInstructionAt(pc)); 300 ASSERT(code.ContainsInstructionAt(pc));
291 EdgeCounter counter(pc, code); 301 EdgeCounter counter(pc, code);
292 return counter.edge_counter(); 302 return counter.edge_counter();
293 } 303 }
294 304
295 } // namespace dart 305 } // namespace dart
296 306
297 #endif // defined TARGET_ARCH_IA32 307 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « dart/runtime/vm/code_patcher_arm.cc ('k') | dart/runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698