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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 Type* const kSingletonZero = CreateRange(0.0, 0.0); | 43 Type* const kSingletonZero = CreateRange(0.0, 0.0); |
44 Type* const kSingletonOne = CreateRange(1.0, 1.0); | 44 Type* const kSingletonOne = CreateRange(1.0, 1.0); |
45 Type* const kSingletonTen = CreateRange(10.0, 10.0); | 45 Type* const kSingletonTen = CreateRange(10.0, 10.0); |
46 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0); | 46 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0); |
47 Type* const kZeroOrUndefined = | 47 Type* const kZeroOrUndefined = |
48 Type::Union(kSingletonZero, Type::Undefined(), zone()); | 48 Type::Union(kSingletonZero, Type::Undefined(), zone()); |
49 Type* const kTenOrUndefined = | 49 Type* const kTenOrUndefined = |
50 Type::Union(kSingletonTen, Type::Undefined(), zone()); | 50 Type::Union(kSingletonTen, Type::Undefined(), zone()); |
51 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0); | 51 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0); |
| 52 Type* const kMinusOneToOne = CreateRange(-1.0, 1.0); |
52 Type* const kZeroOrOne = CreateRange(0.0, 1.0); | 53 Type* const kZeroOrOne = CreateRange(0.0, 1.0); |
53 Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone()); | 54 Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone()); |
54 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); | 55 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); |
55 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); | 56 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); |
56 Type* const kZeroish = | 57 Type* const kZeroish = |
57 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); | 58 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); |
58 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); | 59 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); |
59 Type* const kIntegerOrMinusZero = | 60 Type* const kIntegerOrMinusZero = |
60 Type::Union(kInteger, Type::MinusZero(), zone()); | 61 Type::Union(kInteger, Type::MinusZero(), zone()); |
61 Type* const kIntegerOrMinusZeroOrNaN = | 62 Type* const kIntegerOrMinusZeroOrNaN = |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return Type::Range(min, max, zone()); | 164 return Type::Range(min, max, zone()); |
164 } | 165 } |
165 | 166 |
166 Zone* zone() { return &zone_; } | 167 Zone* zone() { return &zone_; } |
167 }; | 168 }; |
168 | 169 |
169 } // namespace internal | 170 } // namespace internal |
170 } // namespace v8 | 171 } // namespace v8 |
171 | 172 |
172 #endif // V8_TYPE_CACHE_H_ | 173 #endif // V8_TYPE_CACHE_H_ |
OLD | NEW |