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 #include "src/types.h" | 5 #include "src/types.h" |
6 | 6 |
7 #include "src/string-stream.h" | 7 #include "src/string-stream.h" |
8 #include "src/types-inl.h" | 8 #include "src/types-inl.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 bool TypeImpl<Config>::SlowIs(TypeImpl* that) { | 254 bool TypeImpl<Config>::SlowIs(TypeImpl* that) { |
255 DisallowHeapAllocation no_allocation; | 255 DisallowHeapAllocation no_allocation; |
256 | 256 |
257 // Fast path for bitsets. | 257 // Fast path for bitsets. |
258 if (this->IsNone()) return true; | 258 if (this->IsNone()) return true; |
259 if (that->IsBitset()) { | 259 if (that->IsBitset()) { |
260 return (BitsetType::Lub(this) | that->AsBitset()) == that->AsBitset(); | 260 return (BitsetType::Lub(this) | that->AsBitset()) == that->AsBitset(); |
261 } | 261 } |
262 if (this->IsBitset() && SEMANTIC(this->AsBitset()) == BitsetType::kNone) { | 262 if (this->IsBitset() && SEMANTIC(this->AsBitset()) == BitsetType::kNone) { |
263 // Bitsets only have non-bitset supertypes along the representation axis. | 263 // Bitsets only have non-bitset supertypes along the representation axis. |
264 int that_bitset = that->BitsetGlb(); | 264 return BitsetType::Is(this->AsBitset(), that->BitsetGlb()); |
265 return (BitsetType::Is(this->AsBitset(), that_bitset)); | |
266 } | 265 } |
267 | 266 |
268 if (that->IsClass()) { | 267 if (that->IsClass()) { |
269 return this->IsClass() | 268 return this->IsClass() |
270 && *this->AsClass()->Map() == *that->AsClass()->Map() | 269 && *this->AsClass()->Map() == *that->AsClass()->Map() |
271 && ((Config::is_class(that) && Config::is_class(this)) || | 270 && ((Config::is_class(that) && Config::is_class(this)) || |
272 BitsetType::New(this->BitsetLub())->Is( | 271 BitsetType::New(this->BitsetLub())->Is( |
273 BitsetType::New(that->BitsetLub()))); | 272 BitsetType::New(that->BitsetLub()))); |
274 } | 273 } |
275 if (that->IsConstant()) { | 274 if (that->IsConstant()) { |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; | 960 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; |
962 | 961 |
963 template TypeImpl<ZoneTypeConfig>::TypeHandle | 962 template TypeImpl<ZoneTypeConfig>::TypeHandle |
964 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( | 963 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( |
965 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); | 964 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); |
966 template TypeImpl<HeapTypeConfig>::TypeHandle | 965 template TypeImpl<HeapTypeConfig>::TypeHandle |
967 TypeImpl<HeapTypeConfig>::Convert<Type>( | 966 TypeImpl<HeapTypeConfig>::Convert<Type>( |
968 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); | 967 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); |
969 | 968 |
970 } } // namespace v8::internal | 969 } } // namespace v8::internal |
OLD | NEW |