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

Side by Side Diff: src/property.cc

Issue 9320066: Removed IsTransitionType predicate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
Jakob Kummerow 2012/02/03 13:17:14 nit: 2012
Sven Panne 2012/02/03 13:33:14 Done.
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
11 // with the distribution. 11 // with the distribution.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 GetCallbackObject()->Print(out); 84 GetCallbackObject()->Print(out);
85 break; 85 break;
86 case HANDLER: 86 case HANDLER:
87 PrintF(out, " -type = lookup proxy\n"); 87 PrintF(out, " -type = lookup proxy\n");
88 break; 88 break;
89 case INTERCEPTOR: 89 case INTERCEPTOR:
90 PrintF(out, " -type = lookup interceptor\n"); 90 PrintF(out, " -type = lookup interceptor\n");
91 break; 91 break;
92 case CONSTANT_TRANSITION: 92 case CONSTANT_TRANSITION:
93 PrintF(out, " -type = constant property transition\n"); 93 PrintF(out, " -type = constant property transition\n");
94 PrintF(out, " -map:\n");
95 GetTransitionMap()->Print(out);
96 PrintF(out, "\n");
94 break; 97 break;
95 case NULL_DESCRIPTOR: 98 case NULL_DESCRIPTOR:
96 PrintF(out, " =type = null descriptor\n"); 99 PrintF(out, " =type = null descriptor\n");
97 break; 100 break;
98 } 101 }
99 } 102 }
100 103
101 104
102 void Descriptor::Print(FILE* out) { 105 void Descriptor::Print(FILE* out) {
103 PrintF(out, "Descriptor "); 106 PrintF(out, "Descriptor ");
104 GetKey()->ShortPrint(out); 107 GetKey()->ShortPrint(out);
105 PrintF(out, " @ "); 108 PrintF(out, " @ ");
106 GetValue()->ShortPrint(out); 109 GetValue()->ShortPrint(out);
107 PrintF(out, " %d\n", GetDetails().index()); 110 PrintF(out, " %d\n", GetDetails().index());
108 } 111 }
109 112
110 113
111 #endif 114 #endif
112 115
113 116
117 bool Descriptor::ContainsTransition() {
118 switch (details_.type()) {
119 case MAP_TRANSITION:
120 case CONSTANT_TRANSITION:
121 case ELEMENTS_TRANSITION:
122 return true;
123 case CALLBACKS: {
124 if (!value_->IsAccessorPair()) return false;
125 AccessorPair* accessors = AccessorPair::cast(value_);
126 return accessors->getter()->IsMap() || accessors->setter()->IsMap();
127 }
128 case NORMAL:
129 case FIELD:
130 case CONSTANT_FUNCTION:
131 case HANDLER:
132 case INTERCEPTOR:
Jakob Kummerow 2012/02/03 13:17:14 nit: indentation
Sven Panne 2012/02/03 13:33:14 Done.
133 case NULL_DESCRIPTOR:
134 return false;
135 }
136 UNREACHABLE(); // keep the compiler happy
Jakob Kummerow 2012/02/03 13:17:14 Missing capital letter and period.
Sven Panne 2012/02/03 13:33:14 Done.
137 return false;
138 }
139
140
114 } } // namespace v8::internal 141 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698