Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: runtime/vm/object.h

Issue 1407533005: Eliminate RawClass::patch_class_ field (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 1044
1045 // Asserts that the class of the super type has been resolved. 1045 // Asserts that the class of the super type has been resolved.
1046 RawClass* SuperClass() const; 1046 RawClass* SuperClass() const;
1047 1047
1048 RawType* mixin() const { return raw_ptr()->mixin_; } 1048 RawType* mixin() const { return raw_ptr()->mixin_; }
1049 void set_mixin(const Type& value) const; 1049 void set_mixin(const Type& value) const;
1050 1050
1051 // Note this returns false for mixin application aliases. 1051 // Note this returns false for mixin application aliases.
1052 bool IsMixinApplication() const; 1052 bool IsMixinApplication() const;
1053 1053
1054 RawClass* patch_class() const { 1054 RawClass* GetPatchClass() const;
1055 return raw_ptr()->patch_class_; 1055 void SetPatchClass(const Class& patch_class) const;
1056 }
1057 void set_patch_class(const Class& patch_class) const;
1058 1056
1059 // Interfaces is an array of Types. 1057 // Interfaces is an array of Types.
1060 RawArray* interfaces() const { return raw_ptr()->interfaces_; } 1058 RawArray* interfaces() const { return raw_ptr()->interfaces_; }
1061 void set_interfaces(const Array& value) const; 1059 void set_interfaces(const Array& value) const;
1062 static intptr_t interfaces_offset() { 1060 static intptr_t interfaces_offset() {
1063 return OFFSET_OF(RawClass, interfaces_); 1061 return OFFSET_OF(RawClass, interfaces_);
1064 } 1062 }
1065 1063
1066 // Returns the list of classes having this class as direct superclass. 1064 // Returns the list of classes having this class as direct superclass.
1067 RawGrowableObjectArray* direct_subclasses() const { 1065 RawGrowableObjectArray* direct_subclasses() const {
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3381 void AddFieldMetadata(const Field& field, intptr_t token_pos) const; 3379 void AddFieldMetadata(const Field& field, intptr_t token_pos) const;
3382 void AddFunctionMetadata(const Function& func, intptr_t token_pos) const; 3380 void AddFunctionMetadata(const Function& func, intptr_t token_pos) const;
3383 void AddLibraryMetadata(const Class& cls, intptr_t token_pos) const; 3381 void AddLibraryMetadata(const Class& cls, intptr_t token_pos) const;
3384 void AddTypeParameterMetadata(const TypeParameter& param, 3382 void AddTypeParameterMetadata(const TypeParameter& param,
3385 intptr_t token_pos) const; 3383 intptr_t token_pos) const;
3386 RawObject* GetMetadata(const Object& obj) const; 3384 RawObject* GetMetadata(const Object& obj) const;
3387 3385
3388 intptr_t num_anonymous_classes() const { return raw_ptr()->num_anonymous_; } 3386 intptr_t num_anonymous_classes() const { return raw_ptr()->num_anonymous_; }
3389 RawArray* anonymous_classes() const { return raw_ptr()->anonymous_classes_; } 3387 RawArray* anonymous_classes() const { return raw_ptr()->anonymous_classes_; }
3390 3388
3389 RawGrowableObjectArray* patch_classes() const {
3390 return raw_ptr()->patch_classes_;
3391 }
3392
3391 // Library imports. 3393 // Library imports.
3392 RawArray* imports() const { return raw_ptr()->imports_; } 3394 RawArray* imports() const { return raw_ptr()->imports_; }
3393 RawArray* exports() const { return raw_ptr()->exports_; } 3395 RawArray* exports() const { return raw_ptr()->exports_; }
3394 void AddImport(const Namespace& ns) const; 3396 void AddImport(const Namespace& ns) const;
3395 intptr_t num_imports() const { return raw_ptr()->num_imports_; } 3397 intptr_t num_imports() const { return raw_ptr()->num_imports_; }
3396 RawNamespace* ImportAt(intptr_t index) const; 3398 RawNamespace* ImportAt(intptr_t index) const;
3397 RawLibrary* ImportLibraryAt(intptr_t index) const; 3399 RawLibrary* ImportLibraryAt(intptr_t index) const;
3398 bool ImportsCorelib() const; 3400 bool ImportsCorelib() const;
3399 3401
3400 RawFunction* LookupFunctionInScript(const Script& script, 3402 RawFunction* LookupFunctionInScript(const Script& script,
(...skipping 4742 matching lines...) Expand 10 before | Expand all | Expand 10 after
8143 8145
8144 8146
8145 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8147 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8146 intptr_t index) { 8148 intptr_t index) {
8147 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8149 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8148 } 8150 }
8149 8151
8150 } // namespace dart 8152 } // namespace dart
8151 8153
8152 #endif // VM_OBJECT_H_ 8154 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698