OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // existing assumptions or tests. | 85 // existing assumptions or tests. |
86 // | 86 // |
87 // Consequently, do not use pointer equality for type tests, always use Is! | 87 // Consequently, do not use pointer equality for type tests, always use Is! |
88 // | 88 // |
89 // Internally, all 'primitive' types, and their unions, are represented as | 89 // Internally, all 'primitive' types, and their unions, are represented as |
90 // bitsets via smis. Class is a heap pointer to the respective map. Only | 90 // bitsets via smis. Class is a heap pointer to the respective map. Only |
91 // Constant's, or unions containing Class'es or Constant's, require allocation. | 91 // Constant's, or unions containing Class'es or Constant's, require allocation. |
92 // Note that the bitset representation is closed under both Union and Intersect. | 92 // Note that the bitset representation is closed under both Union and Intersect. |
93 // | 93 // |
94 // The type representation is heap-allocated, so cannot (currently) be used in | 94 // The type representation is heap-allocated, so cannot (currently) be used in |
95 // a parallel compilation context. | 95 // a concurrent compilation context. |
96 | 96 |
97 | 97 |
98 #define PRIMITIVE_TYPE_LIST(V) \ | 98 #define PRIMITIVE_TYPE_LIST(V) \ |
99 V(None, 0) \ | 99 V(None, 0) \ |
100 V(Null, 1 << 0) \ | 100 V(Null, 1 << 0) \ |
101 V(Undefined, 1 << 1) \ | 101 V(Undefined, 1 << 1) \ |
102 V(Boolean, 1 << 2) \ | 102 V(Boolean, 1 << 2) \ |
103 V(Smi, 1 << 3) \ | 103 V(Smi, 1 << 3) \ |
104 V(OtherSigned32, 1 << 4) \ | 104 V(OtherSigned32, 1 << 4) \ |
105 V(Unsigned32, 1 << 5) \ | 105 V(Unsigned32, 1 << 5) \ |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 return Bounds(handle(Type::Union(b.lower, t), isl), b.upper); | 326 return Bounds(handle(Type::Union(b.lower, t), isl), b.upper); |
327 } | 327 } |
328 static Bounds NarrowUpper(Bounds b, Handle<Type> t, Isolate* isl) { | 328 static Bounds NarrowUpper(Bounds b, Handle<Type> t, Isolate* isl) { |
329 return Bounds(b.lower, handle(Type::Intersect(b.upper, t), isl)); | 329 return Bounds(b.lower, handle(Type::Intersect(b.upper, t), isl)); |
330 } | 330 } |
331 }; | 331 }; |
332 | 332 |
333 } } // namespace v8::internal | 333 } } // namespace v8::internal |
334 | 334 |
335 #endif // V8_TYPES_H_ | 335 #endif // V8_TYPES_H_ |
OLD | NEW |