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

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

Issue 2451283004: Merged: [turbofan] Fix typing rule for Math.sign. (Closed)
Patch Set: Created 4 years, 1 month 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') | test/mjsunit/compiler/regress-math-sign-nan-type.js » ('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 43
44 Type* const kSingletonZero = CreateRange(0.0, 0.0); 44 Type* const kSingletonZero = CreateRange(0.0, 0.0);
45 Type* const kSingletonOne = CreateRange(1.0, 1.0); 45 Type* const kSingletonOne = CreateRange(1.0, 1.0);
46 Type* const kSingletonTen = CreateRange(10.0, 10.0); 46 Type* const kSingletonTen = CreateRange(10.0, 10.0);
47 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0); 47 Type* const kSingletonMinusOne = CreateRange(-1.0, -1.0);
48 Type* const kZeroOrUndefined = 48 Type* const kZeroOrUndefined =
49 Type::Union(kSingletonZero, Type::Undefined(), zone()); 49 Type::Union(kSingletonZero, Type::Undefined(), zone());
50 Type* const kTenOrUndefined = 50 Type* const kTenOrUndefined =
51 Type::Union(kSingletonTen, Type::Undefined(), zone()); 51 Type::Union(kSingletonTen, Type::Undefined(), zone());
52 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0); 52 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0);
53 Type* const kMinusOneToOne = CreateRange(-1.0, 1.0); 53 Type* const kMinusOneToOneOrMinusZeroOrNaN = Type::Union(
54 Type::Union(CreateRange(-1.0, 1.0), Type::MinusZero(), zone()),
55 Type::NaN(), zone());
54 Type* const kZeroOrOne = CreateRange(0.0, 1.0); 56 Type* const kZeroOrOne = CreateRange(0.0, 1.0);
55 Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone()); 57 Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone());
56 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); 58 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0);
57 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); 59 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0);
58 Type* const kZeroish = 60 Type* const kZeroish =
59 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); 61 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone());
60 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); 62 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY);
61 Type* const kIntegerOrMinusZero = 63 Type* const kIntegerOrMinusZero =
62 Type::Union(kInteger, Type::MinusZero(), zone()); 64 Type::Union(kInteger, Type::MinusZero(), zone());
63 Type* const kIntegerOrMinusZeroOrNaN = 65 Type* const kIntegerOrMinusZeroOrNaN =
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return Type::Range(min, max, zone()); 167 return Type::Range(min, max, zone());
166 } 168 }
167 169
168 Zone* zone() { return &zone_; } 170 Zone* zone() { return &zone_; }
169 }; 171 };
170 172
171 } // namespace internal 173 } // namespace internal
172 } // namespace v8 174 } // namespace v8
173 175
174 #endif // V8_TYPE_CACHE_H_ 176 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/mjsunit/compiler/regress-math-sign-nan-type.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698