OLD | NEW |
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_TYPES_H_ | 5 #ifndef V8_TYPES_H_ |
6 #define V8_TYPES_H_ | 6 #define V8_TYPES_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/ostreams.h" | 10 #include "src/ostreams.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 typedef typename Config::template Handle<ConstantType>::type ConstantHandle; | 268 typedef typename Config::template Handle<ConstantType>::type ConstantHandle; |
269 typedef typename Config::template Handle<RangeType>::type RangeHandle; | 269 typedef typename Config::template Handle<RangeType>::type RangeHandle; |
270 typedef typename Config::template Handle<ContextType>::type ContextHandle; | 270 typedef typename Config::template Handle<ContextType>::type ContextHandle; |
271 typedef typename Config::template Handle<ArrayType>::type ArrayHandle; | 271 typedef typename Config::template Handle<ArrayType>::type ArrayHandle; |
272 typedef typename Config::template Handle<FunctionType>::type FunctionHandle; | 272 typedef typename Config::template Handle<FunctionType>::type FunctionHandle; |
273 typedef typename Config::template Handle<UnionType>::type UnionHandle; | 273 typedef typename Config::template Handle<UnionType>::type UnionHandle; |
274 typedef typename Config::Region Region; | 274 typedef typename Config::Region Region; |
275 | 275 |
276 // Constructors. | 276 // Constructors. |
277 | 277 |
| 278 // Explicitly mask, since VS on Win64 (wrongly?) sign extends the enum value. |
278 #define DEFINE_TYPE_CONSTRUCTOR(type, value) \ | 279 #define DEFINE_TYPE_CONSTRUCTOR(type, value) \ |
279 static TypeImpl* type() { return BitsetType::New(BitsetType::k##type); } \ | 280 static TypeImpl* type() { \ |
| 281 return BitsetType::New(BitsetType::k##type & 0xffffffffu); \ |
| 282 } \ |
280 static TypeHandle type(Region* region) { \ | 283 static TypeHandle type(Region* region) { \ |
281 return BitsetType::New(BitsetType::k##type, region); \ | 284 return BitsetType::New(BitsetType::k##type & 0xffffffffu, region); \ |
282 } | 285 } |
283 BITSET_TYPE_LIST(DEFINE_TYPE_CONSTRUCTOR) | 286 BITSET_TYPE_LIST(DEFINE_TYPE_CONSTRUCTOR) |
284 #undef DEFINE_TYPE_CONSTRUCTOR | 287 #undef DEFINE_TYPE_CONSTRUCTOR |
285 | 288 |
286 static TypeHandle Class(i::Handle<i::Map> map, Region* region) { | 289 static TypeHandle Class(i::Handle<i::Map> map, Region* region) { |
287 return ClassType::New(map, region); | 290 return ClassType::New(map, region); |
288 } | 291 } |
289 static TypeHandle Constant(i::Handle<i::Object> value, Region* region) { | 292 static TypeHandle Constant(i::Handle<i::Object> value, Region* region) { |
290 // TODO(neis): Return RangeType for numerical values. | 293 // TODO(neis): Return RangeType for numerical values. |
291 return ConstantType::New(value, region); | 294 return ConstantType::New(value, region); |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 bool Narrows(BoundsImpl that) { | 997 bool Narrows(BoundsImpl that) { |
995 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 998 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
996 } | 999 } |
997 }; | 1000 }; |
998 | 1001 |
999 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 1002 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
1000 | 1003 |
1001 } } // namespace v8::internal | 1004 } } // namespace v8::internal |
1002 | 1005 |
1003 #endif // V8_TYPES_H_ | 1006 #endif // V8_TYPES_H_ |
OLD | NEW |