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

Side by Side Diff: runtime/vm/disassembler_x64.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_ia32.cc ('k') | runtime/vm/exceptions.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_X64) 8 #if defined(TARGET_ARCH_X64)
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) { 807 void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) {
808 uword addr = reinterpret_cast<uword>(addr_byte_ptr); 808 uword addr = reinterpret_cast<uword>(addr_byte_ptr);
809 AppendToBuffer("%#" Px "", addr); 809 AppendToBuffer("%#" Px "", addr);
810 // Try to print as heap object or stub name 810 // Try to print as heap object or stub name
811 if (((addr & kSmiTagMask) == kHeapObjectTag) && 811 if (((addr & kSmiTagMask) == kHeapObjectTag) &&
812 reinterpret_cast<RawObject*>(addr)->IsWellFormed() && 812 reinterpret_cast<RawObject*>(addr)->IsWellFormed() &&
813 reinterpret_cast<RawObject*>(addr)->IsOldObject() && 813 reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
814 !Isolate::Current()->heap()->CodeContains(addr) && 814 !Isolate::Current()->heap()->CodeContains(addr) &&
815 Disassembler::CanFindOldObject(addr)) { 815 Disassembler::CanFindOldObject(addr)) {
816 NoGCScope no_gc; 816 NoSafepointScope no_safepoint;
817 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr)); 817 const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
818 if (obj.IsArray()) { 818 if (obj.IsArray()) {
819 const Array& arr = Array::Cast(obj); 819 const Array& arr = Array::Cast(obj);
820 intptr_t len = arr.Length(); 820 intptr_t len = arr.Length();
821 if (len > 5) len = 5; // Print a max of 5 elements. 821 if (len > 5) len = 5; // Print a max of 5 elements.
822 AppendToBuffer(" Array["); 822 AppendToBuffer(" Array[");
823 int i = 0; 823 int i = 0;
824 Object& element = Object::Handle(); 824 Object& element = Object::Handle();
825 while (i < len) { 825 while (i < len) {
826 element = arr.At(i); 826 element = arr.At(i);
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 } 1946 }
1947 hex_buffer[hex_index] = '\0'; 1947 hex_buffer[hex_index] = '\0';
1948 if (out_instr_len) { 1948 if (out_instr_len) {
1949 *out_instr_len = instruction_length; 1949 *out_instr_len = instruction_length;
1950 } 1950 }
1951 } 1951 }
1952 1952
1953 } // namespace dart 1953 } // namespace dart
1954 1954
1955 #endif // defined TARGET_ARCH_X64 1955 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698