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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/property.h ('k') | src/string-stream.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 namespace v8 { 30 namespace v8 {
31 namespace internal { 31 namespace internal {
32 32
33 33
34 #ifdef DEBUG 34 #ifdef OBJECT_PRINT
35 void LookupResult::Print() { 35 void LookupResult::Print(FILE* out) {
36 if (!IsFound()) { 36 if (!IsFound()) {
37 PrintF("Not Found\n"); 37 PrintF(out, "Not Found\n");
38 return; 38 return;
39 } 39 }
40 40
41 PrintF("LookupResult:\n"); 41 PrintF(out, "LookupResult:\n");
42 PrintF(" -cacheable = %s\n", IsCacheable() ? "true" : "false"); 42 PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false");
43 PrintF(" -attributes = %x\n", GetAttributes()); 43 PrintF(out, " -attributes = %x\n", GetAttributes());
44 switch (type()) { 44 switch (type()) {
45 case NORMAL: 45 case NORMAL:
46 PrintF(" -type = normal\n"); 46 PrintF(out, " -type = normal\n");
47 PrintF(" -entry = %d", GetDictionaryEntry()); 47 PrintF(out, " -entry = %d", GetDictionaryEntry());
48 break; 48 break;
49 case MAP_TRANSITION: 49 case MAP_TRANSITION:
50 PrintF(" -type = map transition\n"); 50 PrintF(out, " -type = map transition\n");
51 PrintF(" -map:\n"); 51 PrintF(out, " -map:\n");
52 GetTransitionMap()->Print(); 52 GetTransitionMap()->Print(out);
53 PrintF("\n"); 53 PrintF(out, "\n");
54 break; 54 break;
55 case CONSTANT_FUNCTION: 55 case CONSTANT_FUNCTION:
56 PrintF(" -type = constant function\n"); 56 PrintF(out, " -type = constant function\n");
57 PrintF(" -function:\n"); 57 PrintF(out, " -function:\n");
58 GetConstantFunction()->Print(); 58 GetConstantFunction()->Print(out);
59 PrintF("\n"); 59 PrintF(out, "\n");
60 break; 60 break;
61 case FIELD: 61 case FIELD:
62 PrintF(" -type = field\n"); 62 PrintF(out, " -type = field\n");
63 PrintF(" -index = %d", GetFieldIndex()); 63 PrintF(out, " -index = %d", GetFieldIndex());
64 PrintF("\n"); 64 PrintF(out, "\n");
65 break; 65 break;
66 case CALLBACKS: 66 case CALLBACKS:
67 PrintF(" -type = call backs\n"); 67 PrintF(out, " -type = call backs\n");
68 PrintF(" -callback object:\n"); 68 PrintF(out, " -callback object:\n");
69 GetCallbackObject()->Print(); 69 GetCallbackObject()->Print(out);
70 break; 70 break;
71 case INTERCEPTOR: 71 case INTERCEPTOR:
72 PrintF(" -type = lookup interceptor\n"); 72 PrintF(out, " -type = lookup interceptor\n");
73 break; 73 break;
74 case CONSTANT_TRANSITION: 74 case CONSTANT_TRANSITION:
75 PrintF(" -type = constant property transition\n"); 75 PrintF(out, " -type = constant property transition\n");
76 break; 76 break;
77 case NULL_DESCRIPTOR: 77 case NULL_DESCRIPTOR:
78 PrintF(" =type = null descriptor\n"); 78 PrintF(out, " =type = null descriptor\n");
79 break; 79 break;
80 } 80 }
81 } 81 }
82 82
83 83
84 void Descriptor::Print() { 84 void Descriptor::Print(FILE* out) {
85 PrintF("Descriptor "); 85 PrintF(out, "Descriptor ");
86 GetKey()->ShortPrint(); 86 GetKey()->ShortPrint(out);
87 PrintF(" @ "); 87 PrintF(out, " @ ");
88 GetValue()->ShortPrint(); 88 GetValue()->ShortPrint(out);
89 PrintF(" %d\n", GetDetails().index()); 89 PrintF(out, " %d\n", GetDetails().index());
90 } 90 }
91 91
92 92
93 #endif 93 #endif
94 94
95 95
96 } } // namespace v8::internal 96 } } // namespace v8::internal
OLDNEW
« 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