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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 // State-dependent versions of Of and Is that consider subtyping between | 265 // State-dependent versions of Of and Is that consider subtyping between |
266 // a constant and its map class. | 266 // a constant and its map class. |
267 static TypeHandle NowOf(i::Object* value, Region* region); | 267 static TypeHandle NowOf(i::Object* value, Region* region); |
268 static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) { | 268 static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) { |
269 return NowOf(*value, region); | 269 return NowOf(*value, region); |
270 } | 270 } |
271 bool NowIs(TypeImpl* that); | 271 bool NowIs(TypeImpl* that); |
272 template<class TypeHandle> | 272 template<class TypeHandle> |
273 bool NowIs(TypeHandle that) { return this->NowIs(*that); } | 273 bool NowIs(TypeHandle that) { return this->NowIs(*that); } |
274 bool NowContains(i::Object* val); | 274 inline bool NowContains(i::Object* val); |
275 bool NowContains(i::Handle<i::Object> val) { return this->NowContains(*val); } | 275 bool NowContains(i::Handle<i::Object> val) { return this->NowContains(*val); } |
276 | 276 |
277 bool IsClass() { return Config::is_class(this); } | 277 bool IsClass() { return Config::is_class(this); } |
278 bool IsConstant() { return Config::is_constant(this); } | 278 bool IsConstant() { return Config::is_constant(this); } |
279 i::Handle<i::Map> AsClass() { return Config::as_class(this); } | 279 i::Handle<i::Map> AsClass() { return Config::as_class(this); } |
280 i::Handle<i::Object> AsConstant() { return Config::as_constant(this); } | 280 i::Handle<i::Object> AsConstant() { return Config::as_constant(this); } |
281 | 281 |
282 int NumClasses(); | 282 int NumClasses(); |
283 int NumConstants(); | 283 int NumConstants(); |
284 | 284 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 bool Narrows(BoundsImpl that) { | 527 bool Narrows(BoundsImpl that) { |
528 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 528 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
529 } | 529 } |
530 }; | 530 }; |
531 | 531 |
532 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 532 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
533 | 533 |
534 } } // namespace v8::internal | 534 } } // namespace v8::internal |
535 | 535 |
536 #endif // V8_TYPES_H_ | 536 #endif // V8_TYPES_H_ |
OLD | NEW |