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

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

Issue 2222053002: [turbofan] Improve typing rules for various builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/objects.h ('k') | no next file » | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698