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

Unified Diff: vm/raw_object.h

Issue 9594028: Add a first class GrowableObjectArray type in the VM and use it internally in the VM at all spots w… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/parser.cc ('k') | vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.h
===================================================================
--- vm/raw_object.h (revision 5060)
+++ vm/raw_object.h (working copy)
@@ -61,6 +61,7 @@
V(Bool) \
V(Array) \
V(ImmutableArray) \
+ V(GrowableObjectArray) \
V(ByteArray) \
V(InternalByteArray) \
V(ExternalByteArray) \
@@ -986,6 +987,7 @@
friend class RawImmutableArray;
friend class SnapshotReader;
+ friend class GrowableObjectArray;
};
@@ -996,6 +998,22 @@
};
+class RawGrowableObjectArray : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(GrowableObjectArray);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->data_);
+ }
+ RawSmi* length_;
+ RawArray* data_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->data_);
+ }
+
+ friend class SnapshotReader;
+};
+
+
class RawByteArray : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(ByteArray);
« no previous file with comments | « vm/parser.cc ('k') | vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698