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

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

Issue 269253005: Put metadata fields in their owner class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 other, 932 other,
933 other_type_arguments, 933 other_type_arguments,
934 bound_error); 934 bound_error);
935 } 935 }
936 936
937 // Check if this is the top level class. 937 // Check if this is the top level class.
938 bool IsTopLevel() const; 938 bool IsTopLevel() const;
939 939
940 RawArray* fields() const { return raw_ptr()->fields_; } 940 RawArray* fields() const { return raw_ptr()->fields_; }
941 void SetFields(const Array& value) const; 941 void SetFields(const Array& value) const;
942 void AddField(const Field& field) const;
943 void AddFields(const GrowableObjectArray& fields) const;
942 intptr_t FindFieldIndex(const Field& field) const; 944 intptr_t FindFieldIndex(const Field& field) const;
943 RawField* FieldFromIndex(intptr_t idx) const; 945 RawField* FieldFromIndex(intptr_t idx) const;
944 946
945 // Returns an array of all fields of this class and its superclasses indexed 947 // Returns an array of all fields of this class and its superclasses indexed
946 // by offset in words. 948 // by offset in words.
947 RawArray* OffsetToFieldMap() const; 949 RawArray* OffsetToFieldMap() const;
948 950
949 // Returns true if non-static fields are defined. 951 // Returns true if non-static fields are defined.
950 bool HasInstanceFields() const; 952 bool HasInstanceFields() const;
951 953
(...skipping 6082 matching lines...) Expand 10 before | Expand all | Expand 10 after
7034 7036
7035 7037
7036 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7038 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7037 intptr_t index) { 7039 intptr_t index) {
7038 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7040 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7039 } 7041 }
7040 7042
7041 } // namespace dart 7043 } // namespace dart
7042 7044
7043 #endif // VM_OBJECT_H_ 7045 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698