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

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

Issue 2202883005: [turbofan] Unify number operation typing rules. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cementation. DCHECKs instead of defensive programming are way more useful. 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/compiler/typer.cc ('k') | src/types.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kZeroOrOne = CreateRange(0.0, 1.0); 52 Type* const kZeroOrOne = CreateRange(0.0, 1.0);
53 Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone());
53 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); 54 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0);
54 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); 55 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0);
55 Type* const kZeroish = 56 Type* const kZeroish =
56 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); 57 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone());
57 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); 58 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY);
58 Type* const kIntegerOrMinusZero = 59 Type* const kIntegerOrMinusZero =
59 Type::Union(kInteger, Type::MinusZero(), zone()); 60 Type::Union(kInteger, Type::MinusZero(), zone());
60 Type* const kIntegerOrMinusZeroOrNaN = 61 Type* const kIntegerOrMinusZeroOrNaN =
61 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone()); 62 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone());
62 Type* const kPositiveInteger = CreateRange(0.0, V8_INFINITY); 63 Type* const kPositiveInteger = CreateRange(0.0, V8_INFINITY);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return Type::Range(min, max, zone()); 163 return Type::Range(min, max, zone());
163 } 164 }
164 165
165 Zone* zone() { return &zone_; } 166 Zone* zone() { return &zone_; }
166 }; 167 };
167 168
168 } // namespace internal 169 } // namespace internal
169 } // namespace v8 170 } // namespace v8
170 171
171 #endif // V8_TYPE_CACHE_H_ 172 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698