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

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

Issue 2693863006: VM: Restore old implementation of ClassID.cid* fields (Closed)
Patch Set: Done Created 3 years, 10 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/kernel_to_il.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 RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 bool IsTopLevel() const; 1121 bool IsTopLevel() const;
1122 1122
1123 bool IsPrivate() const; 1123 bool IsPrivate() const;
1124 1124
1125 // Returns an array of instance and static fields defined by this class. 1125 // Returns an array of instance and static fields defined by this class.
1126 RawArray* fields() const { return raw_ptr()->fields_; } 1126 RawArray* fields() const { return raw_ptr()->fields_; }
1127 void SetFields(const Array& value) const; 1127 void SetFields(const Array& value) const;
1128 void AddField(const Field& field) const; 1128 void AddField(const Field& field) const;
1129 void AddFields(const GrowableArray<const Field*>& fields) const; 1129 void AddFields(const GrowableArray<const Field*>& fields) const;
1130 1130
1131 void InjectCIDFields() const;
1132
1131 // Returns an array of all instance fields of this class and its superclasses 1133 // Returns an array of all instance fields of this class and its superclasses
1132 // indexed by offset in words. 1134 // indexed by offset in words.
1133 // |original_classes| only has an effect when reloading. If true and we 1135 // |original_classes| only has an effect when reloading. If true and we
1134 // are reloading, it will prefer the original classes to the replacement 1136 // are reloading, it will prefer the original classes to the replacement
1135 // classes. 1137 // classes.
1136 RawArray* OffsetToFieldMap(bool original_classes = false) const; 1138 RawArray* OffsetToFieldMap(bool original_classes = false) const;
1137 1139
1138 // Returns true if non-static fields are defined. 1140 // Returns true if non-static fields are defined.
1139 bool HasInstanceFields() const; 1141 bool HasInstanceFields() const;
1140 1142
(...skipping 7774 matching lines...) Expand 10 before | Expand all | Expand 10 after
8915 8917
8916 inline void TypeArguments::SetHash(intptr_t value) const { 8918 inline void TypeArguments::SetHash(intptr_t value) const {
8917 // This is only safe because we create a new Smi, which does not cause 8919 // This is only safe because we create a new Smi, which does not cause
8918 // heap allocation. 8920 // heap allocation.
8919 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8921 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8920 } 8922 }
8921 8923
8922 } // namespace dart 8924 } // namespace dart
8923 8925
8924 #endif // RUNTIME_VM_OBJECT_H_ 8926 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698