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 "handles.h" | 8 #include "handles.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 static TypeHandle NowOf(i::Object* value, Region* region); | 314 static TypeHandle NowOf(i::Object* value, Region* region); |
315 static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) { | 315 static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) { |
316 return NowOf(*value, region); | 316 return NowOf(*value, region); |
317 } | 317 } |
318 bool NowIs(TypeImpl* that); | 318 bool NowIs(TypeImpl* that); |
319 template<class TypeHandle> | 319 template<class TypeHandle> |
320 bool NowIs(TypeHandle that) { return this->NowIs(*that); } | 320 bool NowIs(TypeHandle that) { return this->NowIs(*that); } |
321 inline bool NowContains(i::Object* val); | 321 inline bool NowContains(i::Object* val); |
322 bool NowContains(i::Handle<i::Object> val) { return this->NowContains(*val); } | 322 bool NowContains(i::Handle<i::Object> val) { return this->NowContains(*val); } |
323 | 323 |
| 324 bool NowStable(); |
| 325 |
324 bool IsClass() { return Config::is_class(this); } | 326 bool IsClass() { return Config::is_class(this); } |
325 bool IsConstant() { return Config::is_constant(this); } | 327 bool IsConstant() { return Config::is_constant(this); } |
326 bool IsArray() { return Config::is_struct(this, StructuralType::kArrayTag); } | 328 bool IsArray() { return Config::is_struct(this, StructuralType::kArrayTag); } |
327 bool IsFunction() { | 329 bool IsFunction() { |
328 return Config::is_struct(this, StructuralType::kFunctionTag); | 330 return Config::is_struct(this, StructuralType::kFunctionTag); |
329 } | 331 } |
330 | 332 |
331 ClassType* AsClass() { return ClassType::cast(this); } | 333 ClassType* AsClass() { return ClassType::cast(this); } |
332 ConstantType* AsConstant() { return ConstantType::cast(this); } | 334 ConstantType* AsConstant() { return ConstantType::cast(this); } |
333 ArrayType* AsArray() { return ArrayType::cast(this); } | 335 ArrayType* AsArray() { return ArrayType::cast(this); } |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 bool Narrows(BoundsImpl that) { | 723 bool Narrows(BoundsImpl that) { |
722 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 724 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
723 } | 725 } |
724 }; | 726 }; |
725 | 727 |
726 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 728 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
727 | 729 |
728 } } // namespace v8::internal | 730 } } // namespace v8::internal |
729 | 731 |
730 #endif // V8_TYPES_H_ | 732 #endif // V8_TYPES_H_ |
OLD | NEW |