| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 76 |
| 77 Type* const kUntaggedUndefined = | 77 Type* const kUntaggedUndefined = |
| 78 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); | 78 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); |
| 79 Type* const kSigned32OrMinusZero = | |
| 80 Type::Union(Type::Signed32(), Type::MinusZero(), zone()); | |
| 81 | 79 |
| 82 // Asm.js related types. | 80 // Asm.js related types. |
| 83 Type* const kAsmSigned = kInt32; | 81 Type* const kAsmSigned = kInt32; |
| 84 Type* const kAsmUnsigned = kUint32; | 82 Type* const kAsmUnsigned = kUint32; |
| 85 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); | 83 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); |
| 86 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone()); | 84 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone()); |
| 87 Type* const kAsmFloat = kFloat32; | 85 Type* const kAsmFloat = kFloat32; |
| 88 Type* const kAsmDouble = kFloat64; | 86 Type* const kAsmDouble = kFloat64; |
| 89 Type* const kAsmFloatQ = Type::Union(kAsmFloat, kUntaggedUndefined, zone()); | 87 Type* const kAsmFloatQ = Type::Union(kAsmFloat, kUntaggedUndefined, zone()); |
| 90 Type* const kAsmDoubleQ = Type::Union(kAsmDouble, kUntaggedUndefined, zone()); | 88 Type* const kAsmDoubleQ = Type::Union(kAsmDouble, kUntaggedUndefined, zone()); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 return Type::Range(min, max, zone()); | 162 return Type::Range(min, max, zone()); |
| 165 } | 163 } |
| 166 | 164 |
| 167 Zone* zone() { return &zone_; } | 165 Zone* zone() { return &zone_; } |
| 168 }; | 166 }; |
| 169 | 167 |
| 170 } // namespace internal | 168 } // namespace internal |
| 171 } // namespace v8 | 169 } // namespace v8 |
| 172 | 170 |
| 173 #endif // V8_TYPE_CACHE_H_ | 171 #endif // V8_TYPE_CACHE_H_ |
| OLD | NEW |