| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // Check if this type represents the 'Dynamic' type. | 708 // Check if this type represents the 'Dynamic' type. |
| 709 bool IsDynamicType() const { | 709 bool IsDynamicType() const { |
| 710 return HasResolvedTypeClass() && (type_class() == Object::dynamic_class()); | 710 return HasResolvedTypeClass() && (type_class() == Object::dynamic_class()); |
| 711 } | 711 } |
| 712 | 712 |
| 713 // Check if this type represents the 'void' type. | 713 // Check if this type represents the 'void' type. |
| 714 bool IsVoidType() const { | 714 bool IsVoidType() const { |
| 715 return HasResolvedTypeClass() && (type_class() == Object::void_class()); | 715 return HasResolvedTypeClass() && (type_class() == Object::void_class()); |
| 716 } | 716 } |
| 717 | 717 |
| 718 bool IsObjectType() const { |
| 719 return HasResolvedTypeClass() && |
| 720 Class::Handle(type_class()).IsObjectClass(); |
| 721 } |
| 722 |
| 718 // Check if this type represents the 'bool' interface. | 723 // Check if this type represents the 'bool' interface. |
| 719 bool IsBoolInterface() const; | 724 bool IsBoolInterface() const; |
| 720 | 725 |
| 721 // Check if this type represents the 'int' interface. | 726 // Check if this type represents the 'int' interface. |
| 722 bool IsIntInterface() const; | 727 bool IsIntInterface() const; |
| 723 | 728 |
| 724 // Check if this type represents the 'double' interface. | 729 // Check if this type represents the 'double' interface. |
| 725 bool IsDoubleInterface() const; | 730 bool IsDoubleInterface() const; |
| 726 | 731 |
| 727 // Check if this type represents the 'num' interface. | 732 // Check if this type represents the 'num' interface. |
| (...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2989 } | 2994 } |
| 2990 | 2995 |
| 2991 | 2996 |
| 2992 void Context::SetAt(intptr_t index, const Instance& value) const { | 2997 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 2993 StorePointer(InstanceAddr(index), value.raw()); | 2998 StorePointer(InstanceAddr(index), value.raw()); |
| 2994 } | 2999 } |
| 2995 | 3000 |
| 2996 } // namespace dart | 3001 } // namespace dart |
| 2997 | 3002 |
| 2998 #endif // VM_OBJECT_H_ | 3003 #endif // VM_OBJECT_H_ |
| OLD | NEW |