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

Side by Side Diff: src/property.cc

Issue 167303005: Track field types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/property.h ('k') | src/x64/lithium-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "property.h" 5 #include "property.h"
6 6
7 #include "handles-inl.h" 7 #include "handles-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 12 matching lines...) Expand all
23 void LookupResult::Print(FILE* out) { 23 void LookupResult::Print(FILE* out) {
24 if (!IsFound()) { 24 if (!IsFound()) {
25 PrintF(out, "Not Found\n"); 25 PrintF(out, "Not Found\n");
26 return; 26 return;
27 } 27 }
28 28
29 PrintF(out, "LookupResult:\n"); 29 PrintF(out, "LookupResult:\n");
30 PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false"); 30 PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false");
31 PrintF(out, " -attributes = %x\n", GetAttributes()); 31 PrintF(out, " -attributes = %x\n", GetAttributes());
32 if (IsTransition()) { 32 if (IsTransition()) {
33 switch (type()) { 33 PrintF(out, " -transition target:\n");
34 case FIELD: 34 GetTransitionTarget()->Print(out);
35 PrintF(out, " -type = map transition\n"); 35 PrintF(out, "\n");
36 PrintF(out, " -map:\n"); 36 }
37 GetTransitionTarget()->Print(out); 37 switch (type()) {
38 PrintF(out, "\n"); 38 case NORMAL:
39 break; 39 PrintF(out, " -type = normal\n");
40 case CONSTANT: 40 PrintF(out, " -entry = %d", GetDictionaryEntry());
41 PrintF(out, " -type = constant property transition\n"); 41 break;
42 PrintF(out, " -map:\n"); 42 case CONSTANT:
43 GetTransitionTarget()->Print(out); 43 PrintF(out, " -type = constant\n");
44 PrintF(out, "\n"); 44 PrintF(out, " -value:\n");
45 break; 45 GetConstant()->Print(out);
46 case CALLBACKS: 46 PrintF(out, "\n");
47 PrintF(out, " -type = callbacks transition\n"); 47 break;
48 PrintF(out, " -callback object:\n"); 48 case FIELD:
49 GetCallbackObject()->Print(out); 49 PrintF(out, " -type = field\n");
50 break; 50 PrintF(out, " -index = %d\n", GetFieldIndex().field_index());
51 default: 51 PrintF(out, " -field type:\n");
52 UNREACHABLE(); 52 GetFieldType()->TypePrint(out);
53 break; 53 break;
54 } 54 case CALLBACKS:
55 } else { 55 PrintF(out, " -type = call backs\n");
56 switch (type()) { 56 PrintF(out, " -callback object:\n");
57 case NORMAL: 57 GetCallbackObject()->Print(out);
58 PrintF(out, " -type = normal\n"); 58 break;
59 PrintF(out, " -entry = %d", GetDictionaryEntry()); 59 case HANDLER:
60 break; 60 PrintF(out, " -type = lookup proxy\n");
61 case CONSTANT: 61 break;
62 PrintF(out, " -type = constant\n"); 62 case INTERCEPTOR:
63 PrintF(out, " -value:\n"); 63 PrintF(out, " -type = lookup interceptor\n");
64 GetConstant()->Print(out); 64 break;
65 PrintF(out, "\n"); 65 case NONEXISTENT:
66 break; 66 UNREACHABLE();
67 case FIELD: 67 break;
68 PrintF(out, " -type = field\n");
69 PrintF(out, " -index = %d", GetFieldIndex().field_index());
70 PrintF(out, "\n");
71 break;
72 case CALLBACKS:
73 PrintF(out, " -type = call backs\n");
74 PrintF(out, " -callback object:\n");
75 GetCallbackObject()->Print(out);
76 break;
77 case HANDLER:
78 PrintF(out, " -type = lookup proxy\n");
79 break;
80 case INTERCEPTOR:
81 PrintF(out, " -type = lookup interceptor\n");
82 break;
83 case NONEXISTENT:
84 UNREACHABLE();
85 break;
86 }
87 } 68 }
88 } 69 }
89 70
90 71
91 void Descriptor::Print(FILE* out) { 72 void Descriptor::Print(FILE* out) {
92 PrintF(out, "Descriptor "); 73 PrintF(out, "Descriptor ");
93 GetKey()->ShortPrint(out); 74 GetKey()->ShortPrint(out);
94 PrintF(out, " @ "); 75 PrintF(out, " @ ");
95 GetValue()->ShortPrint(out); 76 GetValue()->ShortPrint(out);
96 } 77 }
97 #endif 78 #endif
98 79
99 } } // namespace v8::internal 80 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/property.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698