Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: src/type-cache.h

Issue 2096403002: [turbofan] Introduce simplified operator NumberAbs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: This time fix the compile error for realz Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/js/math.js ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 Type* const kHeapNumber = CreateNative(Type::Number(), Type::TaggedPointer()); 41 Type* const kHeapNumber = CreateNative(Type::Number(), Type::TaggedPointer());
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 kZeroOrOne = CreateRange(0.0, 1.0); 45 Type* const kZeroOrOne = CreateRange(0.0, 1.0);
46 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); 46 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0);
47 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); 47 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0);
48 Type* const kZeroish = 48 Type* const kZeroish =
49 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); 49 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone());
50 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); 50 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY);
51 Type* const kPositiveInteger = CreateRange(0.0, V8_INFINITY);
52 Type* const kIntegerOrMinusZero = 51 Type* const kIntegerOrMinusZero =
53 Type::Union(kInteger, Type::MinusZero(), zone()); 52 Type::Union(kInteger, Type::MinusZero(), zone());
54 Type* const kIntegerOrMinusZeroOrNaN = 53 Type* const kIntegerOrMinusZeroOrNaN =
55 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone()); 54 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone());
55 Type* const kPositiveInteger = CreateRange(0.0, V8_INFINITY);
56 Type* const kPositiveIntegerOrMinusZero =
57 Type::Union(kPositiveInteger, Type::MinusZero(), zone());
58 Type* const kPositiveIntegerOrMinusZeroOrNaN =
59 Type::Union(kPositiveIntegerOrMinusZero, Type::NaN(), zone());
56 60
57 Type* const kAdditiveSafeInteger = 61 Type* const kAdditiveSafeInteger =
58 CreateRange(-4503599627370496.0, 4503599627370496.0); 62 CreateRange(-4503599627370496.0, 4503599627370496.0);
59 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); 63 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger);
60 Type* const kAdditiveSafeIntegerOrMinusZero = 64 Type* const kAdditiveSafeIntegerOrMinusZero =
61 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone()); 65 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone());
62 Type* const kSafeIntegerOrMinusZero = 66 Type* const kSafeIntegerOrMinusZero =
63 Type::Union(kSafeInteger, Type::MinusZero(), zone()); 67 Type::Union(kSafeInteger, Type::MinusZero(), zone());
64 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); 68 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger);
69 Type* const kSafeSigned32 = CreateRange(-kMaxInt, kMaxInt);
65 70
66 Type* const kUntaggedUndefined = 71 Type* const kUntaggedUndefined =
67 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); 72 Type::Intersect(Type::Undefined(), Type::Untagged(), zone());
68 Type* const kSigned32OrMinusZero = 73 Type* const kSigned32OrMinusZero =
69 Type::Union(Type::Signed32(), Type::MinusZero(), zone()); 74 Type::Union(Type::Signed32(), Type::MinusZero(), zone());
70 75
71 // Asm.js related types. 76 // Asm.js related types.
72 Type* const kAsmSigned = kInt32; 77 Type* const kAsmSigned = kInt32;
73 Type* const kAsmUnsigned = kUint32; 78 Type* const kAsmUnsigned = kUint32;
74 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); 79 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone());
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return Type::Range(min, max, zone()); 153 return Type::Range(min, max, zone());
149 } 154 }
150 155
151 Zone* zone() { return &zone_; } 156 Zone* zone() { return &zone_; }
152 }; 157 };
153 158
154 } // namespace internal 159 } // namespace internal
155 } // namespace v8 160 } // namespace v8
156 161
157 #endif // V8_TYPE_CACHE_H_ 162 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « src/js/math.js ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698