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

Side by Side Diff: runtime/vm/disassembler_ia32.cc

Issue 132163005: Version 1.1.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
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 | « runtime/vm/disassembler.cc ('k') | runtime/vm/disassembler_x64.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/disassembler.h" 5 #include "vm/disassembler.h"
6 6
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
8 #if defined(TARGET_ARCH_IA32) 8 #if defined(TARGET_ARCH_IA32)
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 467
468 void X86Decoder::PrintAddress(uword addr) { 468 void X86Decoder::PrintAddress(uword addr) {
469 NoGCScope no_gc; 469 NoGCScope no_gc;
470 char addr_buffer[32]; 470 char addr_buffer[32];
471 OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#" Px "", addr); 471 OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#" Px "", addr);
472 Print(addr_buffer); 472 Print(addr_buffer);
473 // Try to print as heap object or stub name 473 // Try to print as heap object or stub name
474 if (((addr & kSmiTagMask) == kHeapObjectTag) && 474 if (((addr & kSmiTagMask) == kHeapObjectTag) &&
475 reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
475 !Isolate::Current()->heap()->CodeContains(addr) && 476 !Isolate::Current()->heap()->CodeContains(addr) &&
476 Isolate::Current()->heap()->Contains(addr - kHeapObjectTag)) { 477 Disassembler::CanFindOldObject(addr)) {
477 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr)); 478 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
478 if (obj.IsArray()) { 479 if (obj.IsArray()) {
479 const Array& arr = Array::Cast(obj); 480 const Array& arr = Array::Cast(obj);
480 intptr_t len = arr.Length(); 481 intptr_t len = arr.Length();
481 if (len > 5) len = 5; // Print a max of 5 elements. 482 if (len > 5) len = 5; // Print a max of 5 elements.
482 Print(" Array["); 483 Print(" Array[");
483 int i = 0; 484 int i = 0;
484 Object& element = Object::Handle(); 485 Object& element = Object::Handle();
485 while (i < len) { 486 while (i < len) {
486 element = arr.At(i); 487 element = arr.At(i);
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 pc); 1823 pc);
1823 pc += instruction_length; 1824 pc += instruction_length;
1824 } 1825 }
1825 1826
1826 return; 1827 return;
1827 } 1828 }
1828 1829
1829 } // namespace dart 1830 } // namespace dart
1830 1831
1831 #endif // defined TARGET_ARCH_IA32 1832 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698