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

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

Issue 2116753002: [builtins] Unify most of the remaining Math builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2102223005
Patch Set: 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
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 24 matching lines...) Expand all
35 Type* const kUint32 = 35 Type* const kUint32 =
36 CreateNative(Type::Unsigned32(), Type::UntaggedIntegral32()); 36 CreateNative(Type::Unsigned32(), Type::UntaggedIntegral32());
37 Type* const kFloat32 = CreateNative(Type::Number(), Type::UntaggedFloat32()); 37 Type* const kFloat32 = CreateNative(Type::Number(), Type::UntaggedFloat32());
38 Type* const kFloat64 = CreateNative(Type::Number(), Type::UntaggedFloat64()); 38 Type* const kFloat64 = CreateNative(Type::Number(), Type::UntaggedFloat64());
39 39
40 Type* const kSmi = CreateNative(Type::SignedSmall(), Type::TaggedSigned()); 40 Type* const kSmi = CreateNative(Type::SignedSmall(), Type::TaggedSigned());
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 kSingletonMinusOne = CreateRange(-1.0, -1.0);
46 Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0);
45 Type* const kZeroOrOne = CreateRange(0.0, 1.0); 47 Type* const kZeroOrOne = CreateRange(0.0, 1.0);
46 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0); 48 Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0);
47 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); 49 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0);
48 Type* const kZeroish = 50 Type* const kZeroish =
49 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); 51 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone());
50 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); 52 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY);
51 Type* const kIntegerOrMinusZero = 53 Type* const kIntegerOrMinusZero =
52 Type::Union(kInteger, Type::MinusZero(), zone()); 54 Type::Union(kInteger, Type::MinusZero(), zone());
53 Type* const kIntegerOrMinusZeroOrNaN = 55 Type* const kIntegerOrMinusZeroOrNaN =
54 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone()); 56 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return Type::Range(min, max, zone()); 155 return Type::Range(min, max, zone());
154 } 156 }
155 157
156 Zone* zone() { return &zone_; } 158 Zone* zone() { return &zone_; }
157 }; 159 };
158 160
159 } // namespace internal 161 } // namespace internal
160 } // namespace v8 162 } // namespace v8
161 163
162 #endif // V8_TYPE_CACHE_H_ 164 #endif // V8_TYPE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698