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

Side by Side Diff: src/compiler/types.h

Issue 2646743002: [turbofan] Improve constant-folding for typeof. (Closed)
Patch Set: Created 3 years, 11 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/js-typed-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_COMPILER_TYPES_H_ 5 #ifndef V8_COMPILER_TYPES_H_
6 #define V8_COMPILER_TYPES_H_ 6 #define V8_COMPILER_TYPES_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 V(OtherObject, 1u << 17) \ 121 V(OtherObject, 1u << 17) \
122 V(OtherUndetectable, 1u << 18) \ 122 V(OtherUndetectable, 1u << 18) \
123 V(CallableProxy, 1u << 19) \ 123 V(CallableProxy, 1u << 19) \
124 V(OtherProxy, 1u << 20) \ 124 V(OtherProxy, 1u << 20) \
125 V(Function, 1u << 21) \ 125 V(Function, 1u << 21) \
126 V(BoundFunction, 1u << 22) \ 126 V(BoundFunction, 1u << 22) \
127 V(Hole, 1u << 23) \ 127 V(Hole, 1u << 23) \
128 V(OtherInternal, 1u << 24) \ 128 V(OtherInternal, 1u << 24) \
129 V(ExternalPointer, 1u << 25) \ 129 V(ExternalPointer, 1u << 25) \
130 \ 130 \
131 V(Signed31, kUnsigned30 | kNegative31) \ 131 V(Signed31, kUnsigned30 | kNegative31) \
132 V(Signed32, kSigned31 | kOtherUnsigned31 | kOtherSigned32) \ 132 V(Signed32, kSigned31 | kOtherUnsigned31 | \
133 V(Signed32OrMinusZero, kSigned32 | kMinusZero) \ 133 kOtherSigned32) \
134 V(Signed32OrMinusZeroOrNaN, kSigned32 | kMinusZero | kNaN) \ 134 V(Signed32OrMinusZero, kSigned32 | kMinusZero) \
135 V(Negative32, kNegative31 | kOtherSigned32) \ 135 V(Signed32OrMinusZeroOrNaN, kSigned32 | kMinusZero | kNaN) \
136 V(Unsigned31, kUnsigned30 | kOtherUnsigned31) \ 136 V(Negative32, kNegative31 | kOtherSigned32) \
137 V(Unsigned32, kUnsigned30 | kOtherUnsigned31 | \ 137 V(Unsigned31, kUnsigned30 | kOtherUnsigned31) \
138 kOtherUnsigned32) \ 138 V(Unsigned32, kUnsigned30 | kOtherUnsigned31 | \
139 V(Unsigned32OrMinusZero, kUnsigned32 | kMinusZero) \ 139 kOtherUnsigned32) \
140 V(Unsigned32OrMinusZeroOrNaN, kUnsigned32 | kMinusZero | kNaN) \ 140 V(Unsigned32OrMinusZero, kUnsigned32 | kMinusZero) \
141 V(Integral32, kSigned32 | kUnsigned32) \ 141 V(Unsigned32OrMinusZeroOrNaN, kUnsigned32 | kMinusZero | kNaN) \
142 V(Integral32OrMinusZeroOrNaN, kIntegral32 | kMinusZero | kNaN) \ 142 V(Integral32, kSigned32 | kUnsigned32) \
143 V(PlainNumber, kIntegral32 | kOtherNumber) \ 143 V(Integral32OrMinusZeroOrNaN, kIntegral32 | kMinusZero | kNaN) \
144 V(OrderedNumber, kPlainNumber | kMinusZero) \ 144 V(PlainNumber, kIntegral32 | kOtherNumber) \
145 V(MinusZeroOrNaN, kMinusZero | kNaN) \ 145 V(OrderedNumber, kPlainNumber | kMinusZero) \
146 V(Number, kOrderedNumber | kNaN) \ 146 V(MinusZeroOrNaN, kMinusZero | kNaN) \
147 V(String, kInternalizedString | kOtherString) \ 147 V(Number, kOrderedNumber | kNaN) \
148 V(UniqueName, kSymbol | kInternalizedString) \ 148 V(String, kInternalizedString | kOtherString) \
149 V(Name, kSymbol | kString) \ 149 V(UniqueName, kSymbol | kInternalizedString) \
150 V(BooleanOrNumber, kBoolean | kNumber) \ 150 V(Name, kSymbol | kString) \
151 V(BooleanOrNullOrNumber, kBooleanOrNumber | kNull) \ 151 V(BooleanOrNumber, kBoolean | kNumber) \
152 V(BooleanOrNullOrUndefined, kBoolean | kNull | kUndefined) \ 152 V(BooleanOrNullOrNumber, kBooleanOrNumber | kNull) \
153 V(NullOrNumber, kNull | kNumber) \ 153 V(BooleanOrNullOrUndefined, kBoolean | kNull | kUndefined) \
154 V(NullOrUndefined, kNull | kUndefined) \ 154 V(NullOrNumber, kNull | kNumber) \
155 V(Undetectable, kNullOrUndefined | kOtherUndetectable) \ 155 V(NullOrUndefined, kNull | kUndefined) \
156 V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | kHole) \ 156 V(Undetectable, kNullOrUndefined | kOtherUndetectable) \
157 V(NumberOrSimdOrString, kNumber | kSimd | kString) \ 157 V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | \
158 V(NumberOrString, kNumber | kString) \ 158 kHole) \
159 V(NumberOrUndefined, kNumber | kUndefined) \ 159 V(NumberOrSimdOrString, kNumber | kSimd | kString) \
160 V(PlainPrimitive, kNumberOrString | kBoolean | kNullOrUndefined) \ 160 V(NumberOrString, kNumber | kString) \
161 V(Primitive, kSymbol | kSimd | kPlainPrimitive) \ 161 V(NumberOrUndefined, kNumber | kUndefined) \
162 V(Proxy, kCallableProxy | kOtherProxy) \ 162 V(PlainPrimitive, kNumberOrString | kBoolean | \
163 V(Callable, kFunction | kBoundFunction | kOtherCallable | \ 163 kNullOrUndefined) \
164 kCallableProxy | kOtherUndetectable) \ 164 V(Primitive, kSymbol | kSimd | kPlainPrimitive) \
165 V(DetectableObject, kFunction | kBoundFunction | kOtherCallable | \ 165 V(OtherUndetectableOrUndefined, kOtherUndetectable | kUndefined) \
166 kOtherObject) \ 166 V(Proxy, kCallableProxy | kOtherProxy) \
167 V(DetectableReceiver, kDetectableObject | kProxy) \ 167 V(Callable, kFunction | kBoundFunction | \
168 V(DetectableReceiverOrNull, kDetectableReceiver | kNull) \ 168 kOtherCallable | kCallableProxy | \
169 V(Object, kDetectableObject | kOtherUndetectable) \ 169 kOtherUndetectable) \
170 V(Receiver, kObject | kProxy) \ 170 V(NonCallable, kOtherObject | kOtherProxy) \
171 V(ReceiverOrUndefined, kReceiver | kUndefined) \ 171 V(NonCallableOrNull, kNonCallable | kNull) \
172 V(ReceiverOrNullOrUndefined, kReceiver | kNull | kUndefined) \ 172 V(DetectableObject, kFunction | kBoundFunction | \
173 V(StringOrReceiver, kString | kReceiver) \ 173 kOtherCallable | kOtherObject) \
174 V(Unique, kBoolean | kUniqueName | kNull | kUndefined | \ 174 V(DetectableReceiver, kDetectableObject | kProxy) \
175 kReceiver) \ 175 V(DetectableReceiverOrNull, kDetectableReceiver | kNull) \
176 V(NonStringUniqueOrHole, kBoolean | kHole | kNull | kReceiver | \ 176 V(Object, kDetectableObject | kOtherUndetectable) \
177 kSymbol | kUndefined) \ 177 V(Receiver, kObject | kProxy) \
178 V(Internal, kHole | kExternalPointer | kOtherInternal) \ 178 V(ReceiverOrUndefined, kReceiver | kUndefined) \
179 V(NonInternal, kPrimitive | kReceiver) \ 179 V(ReceiverOrNullOrUndefined, kReceiver | kNull | kUndefined) \
180 V(NonNumber, kUnique | kString | kInternal) \ 180 V(StringOrReceiver, kString | kReceiver) \
181 V(Any, 0xfffffffeu) 181 V(Unique, kBoolean | kUniqueName | kNull | \
182 kUndefined | kReceiver) \
183 V(NonStringUniqueOrHole, kBoolean | kHole | kNull | kReceiver | \
184 kSymbol | kUndefined) \
185 V(Internal, kHole | kExternalPointer | kOtherInternal) \
186 V(NonInternal, kPrimitive | kReceiver) \
187 V(NonNumber, kUnique | kString | kInternal) \
188 V(Any, 0xfffffffeu)
182 189
183 // clang-format on 190 // clang-format on
184 191
185 /* 192 /*
186 * The following diagrams show how integers (in the mathematical sense) are 193 * The following diagrams show how integers (in the mathematical sense) are
187 * divided among the different atomic numerical types. 194 * divided among the different atomic numerical types.
188 * 195 *
189 * ON OS32 N31 U30 OU31 OU32 ON 196 * ON OS32 N31 U30 OU31 OU32 ON
190 * ______[_______[_______[_______[_______[_______[_______ 197 * ______[_______[_______[_______[_______[_______[_______
191 * -2^31 -2^30 0 2^30 2^31 2^32 198 * -2^31 -2^30 0 2^30 2^31 2^32
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 RangeType::Limits* limits, Zone* zone); 663 RangeType::Limits* limits, Zone* zone);
657 static Type* NormalizeUnion(Type* unioned, int size, Zone* zone); 664 static Type* NormalizeUnion(Type* unioned, int size, Zone* zone);
658 static Type* NormalizeRangeAndBitset(Type* range, bitset* bits, Zone* zone); 665 static Type* NormalizeRangeAndBitset(Type* range, bitset* bits, Zone* zone);
659 }; 666 };
660 667
661 } // namespace compiler 668 } // namespace compiler
662 } // namespace internal 669 } // namespace internal
663 } // namespace v8 670 } // namespace v8
664 671
665 #endif // V8_COMPILER_TYPES_H_ 672 #endif // V8_COMPILER_TYPES_H_
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698