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

Side by Side Diff: vm/raw_object.h

Issue 10012042: Wire GrowableArray to use the internal VM object. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); 1044 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray);
1045 1045
1046 friend class SnapshotReader; 1046 friend class SnapshotReader;
1047 }; 1047 };
1048 1048
1049 1049
1050 class RawGrowableObjectArray : public RawInstance { 1050 class RawGrowableObjectArray : public RawInstance {
1051 RAW_HEAP_OBJECT_IMPLEMENTATION(GrowableObjectArray); 1051 RAW_HEAP_OBJECT_IMPLEMENTATION(GrowableObjectArray);
1052 1052
1053 RawObject** from() { 1053 RawObject** from() {
1054 return reinterpret_cast<RawObject**>(&ptr()->length_); 1054 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_);
1055 } 1055 }
1056 RawAbstractTypeArguments* type_arguments_;
1056 RawSmi* length_; 1057 RawSmi* length_;
1057 RawArray* data_; 1058 RawArray* data_;
1058 RawObject** to() { 1059 RawObject** to() {
1059 return reinterpret_cast<RawObject**>(&ptr()->data_); 1060 return reinterpret_cast<RawObject**>(&ptr()->data_);
1060 } 1061 }
1061 1062
1062 friend class SnapshotReader; 1063 friend class SnapshotReader;
1063 }; 1064 };
1064 1065
1065 1066
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 intptr_t type_; // Uninitialized, simple or complex. 1168 intptr_t type_; // Uninitialized, simple or complex.
1168 intptr_t flags_; // Represents global/local, case insensitive, multiline. 1169 intptr_t flags_; // Represents global/local, case insensitive, multiline.
1169 1170
1170 // Variable length data follows here. 1171 // Variable length data follows here.
1171 uint8_t data_[0]; 1172 uint8_t data_[0];
1172 }; 1173 };
1173 1174
1174 } // namespace dart 1175 } // namespace dart
1175 1176
1176 #endif // VM_RAW_OBJECT_H_ 1177 #endif // VM_RAW_OBJECT_H_
OLDNEW
« vm/object.cc ('K') | « vm/opt_code_generator_ia32.cc ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698