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

Unified Diff: src/property.cc

Issue 5998001: 1. Added support for object printing for release mode using the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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/property.h ('k') | src/string-stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.cc
===================================================================
--- src/property.cc (revision 6074)
+++ src/property.cc (working copy)
@@ -31,62 +31,62 @@
namespace internal {
-#ifdef DEBUG
-void LookupResult::Print() {
+#ifdef OBJECT_PRINT
+void LookupResult::Print(FILE* out) {
if (!IsFound()) {
- PrintF("Not Found\n");
+ PrintF(out, "Not Found\n");
return;
}
- PrintF("LookupResult:\n");
- PrintF(" -cacheable = %s\n", IsCacheable() ? "true" : "false");
- PrintF(" -attributes = %x\n", GetAttributes());
+ PrintF(out, "LookupResult:\n");
+ PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false");
+ PrintF(out, " -attributes = %x\n", GetAttributes());
switch (type()) {
case NORMAL:
- PrintF(" -type = normal\n");
- PrintF(" -entry = %d", GetDictionaryEntry());
+ PrintF(out, " -type = normal\n");
+ PrintF(out, " -entry = %d", GetDictionaryEntry());
break;
case MAP_TRANSITION:
- PrintF(" -type = map transition\n");
- PrintF(" -map:\n");
- GetTransitionMap()->Print();
- PrintF("\n");
+ PrintF(out, " -type = map transition\n");
+ PrintF(out, " -map:\n");
+ GetTransitionMap()->Print(out);
+ PrintF(out, "\n");
break;
case CONSTANT_FUNCTION:
- PrintF(" -type = constant function\n");
- PrintF(" -function:\n");
- GetConstantFunction()->Print();
- PrintF("\n");
+ PrintF(out, " -type = constant function\n");
+ PrintF(out, " -function:\n");
+ GetConstantFunction()->Print(out);
+ PrintF(out, "\n");
break;
case FIELD:
- PrintF(" -type = field\n");
- PrintF(" -index = %d", GetFieldIndex());
- PrintF("\n");
+ PrintF(out, " -type = field\n");
+ PrintF(out, " -index = %d", GetFieldIndex());
+ PrintF(out, "\n");
break;
case CALLBACKS:
- PrintF(" -type = call backs\n");
- PrintF(" -callback object:\n");
- GetCallbackObject()->Print();
+ PrintF(out, " -type = call backs\n");
+ PrintF(out, " -callback object:\n");
+ GetCallbackObject()->Print(out);
break;
case INTERCEPTOR:
- PrintF(" -type = lookup interceptor\n");
+ PrintF(out, " -type = lookup interceptor\n");
break;
case CONSTANT_TRANSITION:
- PrintF(" -type = constant property transition\n");
+ PrintF(out, " -type = constant property transition\n");
break;
case NULL_DESCRIPTOR:
- PrintF(" =type = null descriptor\n");
+ PrintF(out, " =type = null descriptor\n");
break;
}
}
-void Descriptor::Print() {
- PrintF("Descriptor ");
- GetKey()->ShortPrint();
- PrintF(" @ ");
- GetValue()->ShortPrint();
- PrintF(" %d\n", GetDetails().index());
+void Descriptor::Print(FILE* out) {
+ PrintF(out, "Descriptor ");
+ GetKey()->ShortPrint(out);
+ PrintF(out, " @ ");
+ GetValue()->ShortPrint(out);
+ PrintF(out, " %d\n", GetDetails().index());
}
« no previous file with comments | « src/property.h ('k') | src/string-stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698