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

Unified Diff: src/objects-printer.cc

Issue 259173003: Kiss goodbye to MaybeObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase + addressed comments Created 6 years, 8 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 | « src/objects-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index e6606bc5853b66f636a549023f8f1351c6ffbec7..4fb5b5676455f82c45c729d132dcf6c583adede0 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -14,32 +14,27 @@ namespace internal {
#ifdef OBJECT_PRINT
-void MaybeObject::Print() {
+void Object::Print() {
Print(stdout);
}
-void MaybeObject::Print(FILE* out) {
- Object* this_as_object;
- if (ToObject(&this_as_object)) {
- if (this_as_object->IsSmi()) {
- Smi::cast(this_as_object)->SmiPrint(out);
- } else {
- HeapObject::cast(this_as_object)->HeapObjectPrint(out);
- }
+void Object::Print(FILE* out) {
+ if (IsSmi()) {
+ Smi::cast(this)->SmiPrint(out);
} else {
- Failure::cast(this)->FailurePrint(out);
+ HeapObject::cast(this)->HeapObjectPrint(out);
}
Flush(out);
}
-void MaybeObject::PrintLn() {
+void Object::PrintLn() {
PrintLn(stdout);
}
-void MaybeObject::PrintLn(FILE* out) {
+void Object::PrintLn(FILE* out) {
Print(out);
PrintF(out, "\n");
}
« no previous file with comments | « src/objects-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698