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

Unified Diff: runtime/vm/disassembler_x64.cc

Issue 11826024: Clean up uses of X::CheckedHandle where X::Cast or X::Handle is sufficient. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_x64.cc
===================================================================
--- runtime/vm/disassembler_x64.cc (revision 16802)
+++ runtime/vm/disassembler_x64.cc (working copy)
@@ -791,7 +791,7 @@
return obj.ToCString();
}
- const Class& clazz = Class::CheckedHandle(obj.clazz());
+ const Class& clazz = Class::Handle(obj.clazz());
const char* full_class_name = clazz.ToCString();
const char* format = "instance of %s";
intptr_t len = OS::SNPrint(NULL, 0, format, full_class_name) + 1;
@@ -809,17 +809,18 @@
if (((addr & kSmiTagMask) == kHeapObjectTag) &&
!Isolate::Current()->heap()->CodeContains(addr) &&
Isolate::Current()->heap()->Contains(addr - kHeapObjectTag)) {
- Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
+ const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
if (obj.IsArray()) {
- const Array& arr = Array::CheckedHandle(obj.raw());
+ const Array& arr = Array::Cast(obj);
intptr_t len = arr.Length();
if (len > 5) len = 5; // Print a max of 5 elements.
AppendToBuffer(" Array[");
int i = 0;
+ Object& element = Object::Handle();
while (i < len) {
- obj = arr.At(i);
+ element = arr.At(i);
if (i > 0) AppendToBuffer(", ");
- AppendToBuffer("%s", ObjectToCStringNoGC(obj));
+ AppendToBuffer("%s", ObjectToCStringNoGC(element));
i++;
}
if (i < arr.Length()) AppendToBuffer(", ...");
@@ -1850,8 +1851,9 @@
const intptr_t offset = pc - start;
while (comment_finger < comments.Length() &&
comments.PCOffsetAt(comment_finger) <= offset) {
- formatter->Print(" ;; %s\n",
- comments.CommentAt(comment_finger).ToCString());
+ formatter->Print(
+ " ;; %s\n",
+ String::Handle(comments.CommentAt(comment_finger)).ToCString());
comment_finger++;
}
int instruction_length = DecodeInstruction(hex_buffer,
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698