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

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

Issue 1016503005: Rename NoGCScope -> NoSafepointScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void X86Decoder::PrintAddress(uword addr) { 490 void X86Decoder::PrintAddress(uword addr) {
491 char addr_buffer[32]; 491 char addr_buffer[32];
492 OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#" Px "", addr); 492 OS::SNPrint(addr_buffer, sizeof(addr_buffer), "%#" Px "", addr);
493 Print(addr_buffer); 493 Print(addr_buffer);
494 // Try to print as heap object or stub name 494 // Try to print as heap object or stub name
495 if (((addr & kSmiTagMask) == kHeapObjectTag) && 495 if (((addr & kSmiTagMask) == kHeapObjectTag) &&
496 reinterpret_cast<RawObject*>(addr)->IsWellFormed() && 496 reinterpret_cast<RawObject*>(addr)->IsWellFormed() &&
497 reinterpret_cast<RawObject*>(addr)->IsOldObject() && 497 reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
498 !Isolate::Current()->heap()->CodeContains(addr) && 498 !Isolate::Current()->heap()->CodeContains(addr) &&
499 Disassembler::CanFindOldObject(addr)) { 499 Disassembler::CanFindOldObject(addr)) {
500 NoGCScope no_gc; 500 NoSafepointScope no_safepoint;
501 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr)); 501 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
502 if (obj.IsArray()) { 502 if (obj.IsArray()) {
503 const Array& arr = Array::Cast(obj); 503 const Array& arr = Array::Cast(obj);
504 intptr_t len = arr.Length(); 504 intptr_t len = arr.Length();
505 if (len > 5) len = 5; // Print a max of 5 elements. 505 if (len > 5) len = 5; // Print a max of 5 elements.
506 Print(" Array["); 506 Print(" Array[");
507 int i = 0; 507 int i = 0;
508 Object& element = Object::Handle(); 508 Object& element = Object::Handle();
509 while (i < len) { 509 while (i < len) {
510 element = arr.At(i); 510 element = arr.At(i);
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 } 1849 }
1850 hex_buffer[hex_index] = '\0'; 1850 hex_buffer[hex_index] = '\0';
1851 if (out_instr_len) { 1851 if (out_instr_len) {
1852 *out_instr_len = instruction_length; 1852 *out_instr_len = instruction_length;
1853 } 1853 }
1854 } 1854 }
1855 1855
1856 } // namespace dart 1856 } // namespace dart
1857 1857
1858 #endif // defined TARGET_ARCH_IA32 1858 #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