| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 // Asserts that the class of the super type has been resolved. | 1058 // Asserts that the class of the super type has been resolved. |
| 1059 RawClass* SuperClass() const; | 1059 RawClass* SuperClass() const; |
| 1060 | 1060 |
| 1061 RawType* mixin() const { return raw_ptr()->mixin_; } | 1061 RawType* mixin() const { return raw_ptr()->mixin_; } |
| 1062 void set_mixin(const Type& value) const; | 1062 void set_mixin(const Type& value) const; |
| 1063 | 1063 |
| 1064 // Note this returns false for mixin application aliases. | 1064 // Note this returns false for mixin application aliases. |
| 1065 bool IsMixinApplication() const; | 1065 bool IsMixinApplication() const; |
| 1066 | 1066 |
| 1067 RawClass* GetPatchClass() const; | 1067 RawClass* GetPatchClass() const; |
| 1068 void SetPatchClass(const Class& patch_class) const; | |
| 1069 | 1068 |
| 1070 // Interfaces is an array of Types. | 1069 // Interfaces is an array of Types. |
| 1071 RawArray* interfaces() const { return raw_ptr()->interfaces_; } | 1070 RawArray* interfaces() const { return raw_ptr()->interfaces_; } |
| 1072 void set_interfaces(const Array& value) const; | 1071 void set_interfaces(const Array& value) const; |
| 1073 static intptr_t interfaces_offset() { | 1072 static intptr_t interfaces_offset() { |
| 1074 return OFFSET_OF(RawClass, interfaces_); | 1073 return OFFSET_OF(RawClass, interfaces_); |
| 1075 } | 1074 } |
| 1076 | 1075 |
| 1077 // Returns the list of classes having this class as direct superclass. | 1076 // Returns the list of classes having this class as direct superclass. |
| 1078 RawGrowableObjectArray* direct_subclasses() const { | 1077 RawGrowableObjectArray* direct_subclasses() const { |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3388 void SetLoadInProgress() const; | 3387 void SetLoadInProgress() const; |
| 3389 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } | 3388 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
| 3390 void SetLoaded() const; | 3389 void SetLoaded() const; |
| 3391 bool LoadFailed() const { | 3390 bool LoadFailed() const { |
| 3392 return raw_ptr()->load_state_ == RawLibrary::kLoadError; | 3391 return raw_ptr()->load_state_ == RawLibrary::kLoadError; |
| 3393 } | 3392 } |
| 3394 RawInstance* LoadError() const { return raw_ptr()->load_error_; } | 3393 RawInstance* LoadError() const { return raw_ptr()->load_error_; } |
| 3395 void SetLoadError(const Instance& error) const; | 3394 void SetLoadError(const Instance& error) const; |
| 3396 RawInstance* TransitiveLoadError() const; | 3395 RawInstance* TransitiveLoadError() const; |
| 3397 | 3396 |
| 3397 void AddPatchClass(const Class& cls) const; |
| 3398 RawClass* GetPatchClass(const String& name) const; |
| 3399 void RemovePatchClass(const Class& cls) const; |
| 3400 |
| 3398 static intptr_t InstanceSize() { | 3401 static intptr_t InstanceSize() { |
| 3399 return RoundedAllocationSize(sizeof(RawLibrary)); | 3402 return RoundedAllocationSize(sizeof(RawLibrary)); |
| 3400 } | 3403 } |
| 3401 | 3404 |
| 3402 static RawLibrary* New(const String& url); | 3405 static RawLibrary* New(const String& url); |
| 3403 | 3406 |
| 3404 // Evaluate the given expression as if it appeared in an top-level | 3407 // Evaluate the given expression as if it appeared in an top-level |
| 3405 // method of this library and return the resulting value, or an | 3408 // method of this library and return the resulting value, or an |
| 3406 // error object if evaluating the expression fails. The method has | 3409 // error object if evaluating the expression fails. The method has |
| 3407 // the formal parameters given in param_names, and is invoked with | 3410 // the formal parameters given in param_names, and is invoked with |
| (...skipping 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8220 | 8223 |
| 8221 | 8224 |
| 8222 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8225 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8223 intptr_t index) { | 8226 intptr_t index) { |
| 8224 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8227 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8225 } | 8228 } |
| 8226 | 8229 |
| 8227 } // namespace dart | 8230 } // namespace dart |
| 8228 | 8231 |
| 8229 #endif // VM_OBJECT_H_ | 8232 #endif // VM_OBJECT_H_ |
| OLD | NEW |