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_COMPILER_TYPE_CACHE_H_ | 5 #ifndef V8_COMPILER_TYPE_CACHE_H_ |
6 #define V8_COMPILER_TYPE_CACHE_H_ | 6 #define V8_COMPILER_TYPE_CACHE_H_ |
7 | 7 |
8 #include "src/compiler/types.h" | 8 #include "src/compiler/types.h" |
9 #include "src/date.h" | 9 #include "src/date.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 Type* const kUint8Clamped = kUint8; | 28 Type* const kUint8Clamped = kUint8; |
29 Type* const kUint8OrMinusZeroOrNaN = | 29 Type* const kUint8OrMinusZeroOrNaN = |
30 Type::Union(kUint8, Type::MinusZeroOrNaN(), zone()); | 30 Type::Union(kUint8, Type::MinusZeroOrNaN(), zone()); |
31 Type* const kInt16 = CreateRange<int16_t>(); | 31 Type* const kInt16 = CreateRange<int16_t>(); |
32 Type* const kUint16 = CreateRange<uint16_t>(); | 32 Type* const kUint16 = CreateRange<uint16_t>(); |
33 Type* const kInt32 = Type::Signed32(); | 33 Type* const kInt32 = Type::Signed32(); |
34 Type* const kUint32 = Type::Unsigned32(); | 34 Type* const kUint32 = Type::Unsigned32(); |
35 Type* const kFloat32 = Type::Number(); | 35 Type* const kFloat32 = Type::Number(); |
36 Type* const kFloat64 = Type::Number(); | 36 Type* const kFloat64 = Type::Number(); |
37 | 37 |
38 Type* const kSmi = Type::SignedSmall(); | 38 Type* const kHoleySmi = |
39 Type* const kHoleySmi = Type::Union(kSmi, Type::Hole(), zone()); | 39 Type::Union(Type::SignedSmall(), Type::Hole(), zone()); |
40 Type* const kHeapNumber = Type::Number(); | |
41 | 40 |
42 Type* const kSingletonZero = CreateRange(0.0, 0.0); | 41 Type* const kSingletonZero = CreateRange(0.0, 0.0); |
43 Type* const kSingletonOne = CreateRange(1.0, 1.0); | 42 Type* const kSingletonOne = CreateRange(1.0, 1.0); |
44 Type* const kSingletonTen = CreateRange(10.0, 10.0); | 43 Type* const kSingletonTen = CreateRange(10.0, 10.0); |
45 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0); | 44 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0); |
46 Type* const kZeroOrUndefined = | 45 Type* const kZeroOrUndefined = |
47 Type::Union(kSingletonZero, Type::Undefined(), zone()); | 46 Type::Union(kSingletonZero, Type::Undefined(), zone()); |
48 Type* const kTenOrUndefined = | 47 Type* const kTenOrUndefined = |
49 Type::Union(kSingletonTen, Type::Undefined(), zone()); | 48 Type::Union(kSingletonTen, Type::Undefined(), zone()); |
50 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0); | 49 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 149 } |
151 | 150 |
152 Zone* zone() { return &zone_; } | 151 Zone* zone() { return &zone_; } |
153 }; | 152 }; |
154 | 153 |
155 } // namespace compiler | 154 } // namespace compiler |
156 } // namespace internal | 155 } // namespace internal |
157 } // namespace v8 | 156 } // namespace v8 |
158 | 157 |
159 #endif // V8_COMPILER_TYPE_CACHE_H_ | 158 #endif // V8_COMPILER_TYPE_CACHE_H_ |
OLD | NEW |