| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 return exception_handlers_class_; | 238 return exception_handlers_class_; |
| 239 } | 239 } |
| 240 static RawClass* context_class() { return context_class_; } | 240 static RawClass* context_class() { return context_class_; } |
| 241 static RawClass* context_scope_class() { return context_scope_class_; } | 241 static RawClass* context_scope_class() { return context_scope_class_; } |
| 242 static RawClass* api_failure_class() { return api_failure_class_; } | 242 static RawClass* api_failure_class() { return api_failure_class_; } |
| 243 | 243 |
| 244 static int GetSingletonClassIndex(const RawClass* raw_class); | 244 static int GetSingletonClassIndex(const RawClass* raw_class); |
| 245 static RawClass* GetSingletonClass(int index); | 245 static RawClass* GetSingletonClass(int index); |
| 246 static const char* GetSingletonClassName(int index); | 246 static const char* GetSingletonClassName(int index); |
| 247 | 247 |
| 248 static RawClass* CreateAndRegisterCoreInterface( |
| 249 const char* cname, |
| 250 const Script& script, |
| 251 GrowableArray<const Class*>* classes); |
| 252 static void RegisterCoreImplClass( |
| 253 const Class& cls, |
| 254 const char* cname, |
| 255 const Script& impl_script, |
| 256 GrowableArray<const Class*>* classes); |
| 257 |
| 248 static void Init(Isolate* isolate); | 258 static void Init(Isolate* isolate); |
| 249 static void InitFromSnapshot(Isolate* isolate); | 259 static void InitFromSnapshot(Isolate* isolate); |
| 250 static void InitOnce(); | 260 static void InitOnce(); |
| 251 | 261 |
| 252 static intptr_t InstanceSize() { | 262 static intptr_t InstanceSize() { |
| 253 return RoundedAllocationSize(sizeof(RawObject)); | 263 return RoundedAllocationSize(sizeof(RawObject)); |
| 254 } | 264 } |
| 255 | 265 |
| 256 static const ObjectKind kInstanceKind = kObject; | 266 static const ObjectKind kInstanceKind = kObject; |
| 257 | 267 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 741 |
| 732 // Check if this type represents the 'num' interface. | 742 // Check if this type represents the 'num' interface. |
| 733 bool IsNumberInterface() const; | 743 bool IsNumberInterface() const; |
| 734 | 744 |
| 735 // Check if this type represents the 'String' interface. | 745 // Check if this type represents the 'String' interface. |
| 736 bool IsStringInterface() const; | 746 bool IsStringInterface() const; |
| 737 | 747 |
| 738 // Check if this type represents the 'Function' interface. | 748 // Check if this type represents the 'Function' interface. |
| 739 bool IsFunctionInterface() const; | 749 bool IsFunctionInterface() const; |
| 740 | 750 |
| 751 // Check if this type represents a signature type. |
| 752 bool IsSignatureType() const; |
| 753 |
| 741 // Check if this type is an interface type. | 754 // Check if this type is an interface type. |
| 742 bool IsInterfaceType() const { | 755 bool IsInterfaceType() const { |
| 743 if (!HasResolvedTypeClass()) { | 756 if (!HasResolvedTypeClass()) { |
| 744 return false; | 757 return false; |
| 745 } | 758 } |
| 746 const Class& cls = Class::Handle(type_class()); | 759 const Class& cls = Class::Handle(type_class()); |
| 747 return !cls.IsNull() && cls.is_interface(); | 760 return !cls.IsNull() && cls.is_interface(); |
| 748 } | 761 } |
| 749 | 762 |
| 750 // Check the "more specific than" relationship. | 763 // Check the "more specific than" relationship. |
| (...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 } | 3007 } |
| 2995 | 3008 |
| 2996 | 3009 |
| 2997 void Context::SetAt(intptr_t index, const Instance& value) const { | 3010 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 2998 StorePointer(InstanceAddr(index), value.raw()); | 3011 StorePointer(InstanceAddr(index), value.raw()); |
| 2999 } | 3012 } |
| 3000 | 3013 |
| 3001 } // namespace dart | 3014 } // namespace dart |
| 3002 | 3015 |
| 3003 #endif // VM_OBJECT_H_ | 3016 #endif // VM_OBJECT_H_ |
| OLD | NEW |