OLD | NEW |
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_TYPE_CACHE_H_ | 5 #ifndef V8_TYPE_CACHE_H_ |
6 #define V8_TYPE_CACHE_H_ | 6 #define V8_TYPE_CACHE_H_ |
7 | 7 |
8 #include "src/types.h" | 8 #include "src/types.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 Type::Union(kPositiveIntegerOrMinusZero, Type::NaN(), zone()); | 66 Type::Union(kPositiveIntegerOrMinusZero, Type::NaN(), zone()); |
67 | 67 |
68 Type* const kAdditiveSafeInteger = | 68 Type* const kAdditiveSafeInteger = |
69 CreateRange(-4503599627370496.0, 4503599627370496.0); | 69 CreateRange(-4503599627370496.0, 4503599627370496.0); |
70 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); | 70 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); |
71 Type* const kAdditiveSafeIntegerOrMinusZero = | 71 Type* const kAdditiveSafeIntegerOrMinusZero = |
72 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone()); | 72 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone()); |
73 Type* const kSafeIntegerOrMinusZero = | 73 Type* const kSafeIntegerOrMinusZero = |
74 Type::Union(kSafeInteger, Type::MinusZero(), zone()); | 74 Type::Union(kSafeInteger, Type::MinusZero(), zone()); |
75 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); | 75 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); |
76 Type* const kSafeSigned32 = CreateRange(-kMaxInt, kMaxInt); | |
77 | 76 |
78 Type* const kUntaggedUndefined = | 77 Type* const kUntaggedUndefined = |
79 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); | 78 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); |
80 Type* const kSigned32OrMinusZero = | 79 Type* const kSigned32OrMinusZero = |
81 Type::Union(Type::Signed32(), Type::MinusZero(), zone()); | 80 Type::Union(Type::Signed32(), Type::MinusZero(), zone()); |
82 | 81 |
83 // Asm.js related types. | 82 // Asm.js related types. |
84 Type* const kAsmSigned = kInt32; | 83 Type* const kAsmSigned = kInt32; |
85 Type* const kAsmUnsigned = kUint32; | 84 Type* const kAsmUnsigned = kUint32; |
86 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); | 85 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return Type::Range(min, max, zone()); | 159 return Type::Range(min, max, zone()); |
161 } | 160 } |
162 | 161 |
163 Zone* zone() { return &zone_; } | 162 Zone* zone() { return &zone_; } |
164 }; | 163 }; |
165 | 164 |
166 } // namespace internal | 165 } // namespace internal |
167 } // namespace v8 | 166 } // namespace v8 |
168 | 167 |
169 #endif // V8_TYPE_CACHE_H_ | 168 #endif // V8_TYPE_CACHE_H_ |
OLD | NEW |