| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 CreateRange(-4503599627370496.0, 4503599627370496.0); | 58 CreateRange(-4503599627370496.0, 4503599627370496.0); |
| 59 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); | 59 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); |
| 60 Type* const kAdditiveSafeIntegerOrMinusZero = | 60 Type* const kAdditiveSafeIntegerOrMinusZero = |
| 61 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone()); | 61 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone()); |
| 62 Type* const kSafeIntegerOrMinusZero = | 62 Type* const kSafeIntegerOrMinusZero = |
| 63 Type::Union(kSafeInteger, Type::MinusZero(), zone()); | 63 Type::Union(kSafeInteger, Type::MinusZero(), zone()); |
| 64 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); | 64 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); |
| 65 | 65 |
| 66 Type* const kUntaggedUndefined = | 66 Type* const kUntaggedUndefined = |
| 67 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); | 67 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); |
| 68 Type* const kSigned32OrMinusZero = |
| 69 Type::Union(Type::Signed32(), Type::MinusZero(), zone()); |
| 68 | 70 |
| 69 // Asm.js related types. | 71 // Asm.js related types. |
| 70 Type* const kAsmSigned = kInt32; | 72 Type* const kAsmSigned = kInt32; |
| 71 Type* const kAsmUnsigned = kUint32; | 73 Type* const kAsmUnsigned = kUint32; |
| 72 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); | 74 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); |
| 73 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone()); | 75 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone()); |
| 74 Type* const kAsmFloat = kFloat32; | 76 Type* const kAsmFloat = kFloat32; |
| 75 Type* const kAsmDouble = kFloat64; | 77 Type* const kAsmDouble = kFloat64; |
| 76 Type* const kAsmFloatQ = Type::Union(kAsmFloat, kUntaggedUndefined, zone()); | 78 Type* const kAsmFloatQ = Type::Union(kAsmFloat, kUntaggedUndefined, zone()); |
| 77 Type* const kAsmDoubleQ = Type::Union(kAsmDouble, kUntaggedUndefined, zone()); | 79 Type* const kAsmDoubleQ = Type::Union(kAsmDouble, kUntaggedUndefined, zone()); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return Type::Range(min, max, zone()); | 148 return Type::Range(min, max, zone()); |
| 147 } | 149 } |
| 148 | 150 |
| 149 Zone* zone() { return &zone_; } | 151 Zone* zone() { return &zone_; } |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } // namespace internal | 154 } // namespace internal |
| 153 } // namespace v8 | 155 } // namespace v8 |
| 154 | 156 |
| 155 #endif // V8_TYPE_CACHE_H_ | 157 #endif // V8_TYPE_CACHE_H_ |
| OLD | NEW |