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/conversions.h" | 8 #include "src/conversions.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 return function; | 424 return function; |
425 } | 425 } |
426 | 426 |
427 #define CONSTRUCT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \ | 427 #define CONSTRUCT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \ |
428 static TypeHandle Name(Isolate* isolate, Region* region); | 428 static TypeHandle Name(Isolate* isolate, Region* region); |
429 SIMD128_TYPES(CONSTRUCT_SIMD_TYPE) | 429 SIMD128_TYPES(CONSTRUCT_SIMD_TYPE) |
430 #undef CONSTRUCT_SIMD_TYPE | 430 #undef CONSTRUCT_SIMD_TYPE |
431 | 431 |
432 static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg); | 432 static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg); |
433 static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg); | 433 static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg); |
434 static TypeImpl* Union(TypeImpl* type1, TypeImpl* type2) { | |
435 return BitsetType::New(type1->AsBitset() | type2->AsBitset()); | |
436 } | |
437 static TypeImpl* Intersect(TypeImpl* type1, TypeImpl* type2) { | |
438 return BitsetType::New(type1->AsBitset() & type2->AsBitset()); | |
439 } | |
440 | 434 |
441 static TypeHandle Of(double value, Region* region) { | 435 static TypeHandle Of(double value, Region* region) { |
442 return Config::from_bitset(BitsetType::Lub(value), region); | 436 return Config::from_bitset(BitsetType::Lub(value), region); |
443 } | 437 } |
444 static TypeHandle Of(i::Object* value, Region* region) { | 438 static TypeHandle Of(i::Object* value, Region* region) { |
445 return Config::from_bitset(BitsetType::Lub(value), region); | 439 return Config::from_bitset(BitsetType::Lub(value), region); |
446 } | 440 } |
447 static TypeHandle Of(i::Handle<i::Object> value, Region* region) { | 441 static TypeHandle Of(i::Handle<i::Object> value, Region* region) { |
448 return Of(*value, region); | 442 return Of(*value, region); |
449 } | 443 } |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 bool Narrows(BoundsImpl that) { | 1165 bool Narrows(BoundsImpl that) { |
1172 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 1166 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
1173 } | 1167 } |
1174 }; | 1168 }; |
1175 | 1169 |
1176 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 1170 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
1177 | 1171 |
1178 } } // namespace v8::internal | 1172 } } // namespace v8::internal |
1179 | 1173 |
1180 #endif // V8_TYPES_H_ | 1174 #endif // V8_TYPES_H_ |
OLD | NEW |