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

Side by Side Diff: src/types.h

Issue 230463003: Fix various bugs in the type systems, and improve test coverage. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/types.cc » ('j') | test/cctest/test-types.cc » ('J')
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 #ifndef V8_TYPES_H_ 5 #ifndef V8_TYPES_H_
6 #define V8_TYPES_H_ 6 #define V8_TYPES_H_
7 7
8 #include "handles.h" 8 #include "handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 V(UniqueName, kSymbol | kInternalizedString) \ 147 V(UniqueName, kSymbol | kInternalizedString) \
148 V(Name, kSymbol | kString) \ 148 V(Name, kSymbol | kString) \
149 V(NumberOrString, kNumber | kString) \ 149 V(NumberOrString, kNumber | kString) \
150 V(DetectableObject, kArray | kFunction | kRegExp | kOtherObject) \ 150 V(DetectableObject, kArray | kFunction | kRegExp | kOtherObject) \
151 V(DetectableReceiver, kDetectableObject | kProxy) \ 151 V(DetectableReceiver, kDetectableObject | kProxy) \
152 V(Detectable, kDetectableReceiver | kNumber | kName) \ 152 V(Detectable, kDetectableReceiver | kNumber | kName) \
153 V(Object, kDetectableObject | kUndetectable) \ 153 V(Object, kDetectableObject | kUndetectable) \
154 V(Receiver, kObject | kProxy) \ 154 V(Receiver, kObject | kProxy) \
155 V(NonNumber, kBoolean | kName | kNull | kReceiver | \ 155 V(NonNumber, kBoolean | kName | kNull | kReceiver | \
156 kUndefined | kInternal) \ 156 kUndefined | kInternal) \
157 V(Any, kNumber | kNonNumber) 157 V(Any, -1)
158 158
159 #define BITSET_TYPE_LIST(V) \ 159 #define BITSET_TYPE_LIST(V) \
160 MASK_BITSET_TYPE_LIST(V) \ 160 MASK_BITSET_TYPE_LIST(V) \
161 REPRESENTATION_BITSET_TYPE_LIST(V) \ 161 REPRESENTATION_BITSET_TYPE_LIST(V) \
162 SEMANTIC_BITSET_TYPE_LIST(V) 162 SEMANTIC_BITSET_TYPE_LIST(V)
163 163
164 164
165 // struct Config { 165 // struct Config {
166 // typedef Base; 166 // typedef Base;
167 // typedef Struct; 167 // typedef Struct;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 template<class OtherTypeImpl> 292 template<class OtherTypeImpl>
293 static TypeHandle Convert( 293 static TypeHandle Convert(
294 typename OtherTypeImpl::TypeHandle type, Region* region); 294 typename OtherTypeImpl::TypeHandle type, Region* region);
295 295
296 enum PrintDimension { BOTH_DIMS, SEMANTIC_DIM, REPRESENTATION_DIM }; 296 enum PrintDimension { BOTH_DIMS, SEMANTIC_DIM, REPRESENTATION_DIM };
297 void TypePrint(PrintDimension = BOTH_DIMS); 297 void TypePrint(PrintDimension = BOTH_DIMS);
298 void TypePrint(FILE* out, PrintDimension = BOTH_DIMS); 298 void TypePrint(FILE* out, PrintDimension = BOTH_DIMS);
299 299
300 bool IsInhabited() {
rossberg 2014/04/09 10:56:56 Nit: move this up to line 222
Benedikt Meurer 2014/04/09 11:12:26 Done.
301 return !this->IsBitset() || IsInhabited(this->AsBitset());
302 }
303
300 private: 304 private:
301 template<class> friend class Iterator; 305 template<class> friend class Iterator;
302 template<class> friend class TypeImpl; 306 template<class> friend class TypeImpl;
303 friend struct ZoneTypeConfig; 307 friend struct ZoneTypeConfig;
304 friend struct HeapTypeConfig; 308 friend struct HeapTypeConfig;
305 309
306 enum Tag { 310 enum Tag {
307 kClassTag, 311 kClassTag,
308 kConstantTag, 312 kConstantTag,
309 kUnionTag 313 kUnionTag
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool Narrows(BoundsImpl that) { 501 bool Narrows(BoundsImpl that) {
498 return that.lower->Is(this->lower) && this->upper->Is(that.upper); 502 return that.lower->Is(this->lower) && this->upper->Is(that.upper);
499 } 503 }
500 }; 504 };
501 505
502 typedef BoundsImpl<ZoneTypeConfig> Bounds; 506 typedef BoundsImpl<ZoneTypeConfig> Bounds;
503 507
504 } } // namespace v8::internal 508 } } // namespace v8::internal
505 509
506 #endif // V8_TYPES_H_ 510 #endif // V8_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/types.cc » ('j') | test/cctest/test-types.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698