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_INL_H_ | 5 #ifndef V8_TYPES_INL_H_ |
6 #define V8_TYPES_INL_H_ | 6 #define V8_TYPES_INL_H_ |
7 | 7 |
8 #include "types.h" | 8 #include "types.h" |
9 | 9 |
10 #include "factory.h" | 10 #include "factory.h" |
11 #include "handles-inl.h" | 11 #include "handles-inl.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 // -------------------------------------------------------------------------- // | 16 // -------------------------------------------------------------------------- // |
17 // TypeImpl | 17 // TypeImpl |
18 | 18 |
19 template<class Config> | 19 template<class Config> |
20 TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) { | 20 TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) { |
21 TypeImpl* t = static_cast<TypeImpl*>(object); | 21 TypeImpl* t = static_cast<TypeImpl*>(object); |
22 ASSERT(t->IsBitset() || t->IsClass() || t->IsConstant() || | 22 ASSERT(t->IsBitset() || t->IsClass() || t->IsConstant() || |
23 t->IsUnion() || t->IsArray() || t->IsFunction()); | 23 t->IsUnion() || t->IsArray() || t->IsFunction() || t->IsContext()); |
24 return t; | 24 return t; |
25 } | 25 } |
26 | 26 |
27 | 27 |
28 template<class Config> | 28 template<class Config> |
29 bool TypeImpl<Config>::NowContains(i::Object* value) { | 29 bool TypeImpl<Config>::NowContains(i::Object* value) { |
30 DisallowHeapAllocation no_allocation; | 30 DisallowHeapAllocation no_allocation; |
31 if (this->IsAny()) return true; | 31 if (this->IsAny()) return true; |
32 if (value->IsHeapObject()) { | 32 if (value->IsHeapObject()) { |
33 i::Map* map = i::HeapObject::cast(value)->map(); | 33 i::Map* map = i::HeapObject::cast(value)->map(); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 | 344 |
345 // static | 345 // static |
346 int HeapTypeConfig::lub_bitset(Type* type) { | 346 int HeapTypeConfig::lub_bitset(Type* type) { |
347 return 0; // kNone, which causes recomputation. | 347 return 0; // kNone, which causes recomputation. |
348 } | 348 } |
349 | 349 |
350 } } // namespace v8::internal | 350 } } // namespace v8::internal |
351 | 351 |
352 #endif // V8_TYPES_INL_H_ | 352 #endif // V8_TYPES_INL_H_ |
OLD | NEW |