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

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

Issue 2080093002: [turbofan] Allow truncating minus zero in add, sub, mul if we have word32 truncation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/simplified-lowering.cc ('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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 51 Type* const kPositiveInteger = CreateRange(0.0, V8_INFINITY);
52 Type* const kIntegerOrMinusZero = 52 Type* const kIntegerOrMinusZero =
53 Type::Union(kInteger, Type::MinusZero(), zone()); 53 Type::Union(kInteger, Type::MinusZero(), zone());
54 Type* const kIntegerOrMinusZeroOrNaN = 54 Type* const kIntegerOrMinusZeroOrNaN =
55 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone()); 55 Type::Union(kIntegerOrMinusZero, Type::NaN(), zone());
56 56
57 Type* const kAdditiveSafeInteger = 57 Type* const kAdditiveSafeInteger =
58 CreateRange(-4503599627370496.0, 4503599627370496.0); 58 CreateRange(-4503599627370496.0, 4503599627370496.0);
59 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger); 59 Type* const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger);
60 Type* const kAdditiveSafeIntegerOrMinusZero =
61 Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone());
62 Type* const kSafeIntegerOrMinusZero =
63 Type::Union(kSafeInteger, Type::MinusZero(), zone());
60 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); 64 Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger);
61 65
62 Type* const kUntaggedUndefined = 66 Type* const kUntaggedUndefined =
63 Type::Intersect(Type::Undefined(), Type::Untagged(), zone()); 67 Type::Intersect(Type::Undefined(), Type::Untagged(), zone());
64 68
65 // Asm.js related types. 69 // Asm.js related types.
66 Type* const kAsmSigned = kInt32; 70 Type* const kAsmSigned = kInt32;
67 Type* const kAsmUnsigned = kUint32; 71 Type* const kAsmUnsigned = kUint32;
68 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone()); 72 Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone());
69 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone()); 73 Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return Type::Range(min, max, zone()); 146 return Type::Range(min, max, zone());
143 } 147 }
144 148
145 Zone* zone() { return &zone_; } 149 Zone* zone() { return &zone_; }
146 }; 150 };
147 151
148 } // namespace internal 152 } // namespace internal
149 } // namespace v8 153 } // namespace v8
150 154
151 #endif // V8_TYPE_CACHE_H_ 155 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698