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

Unified Diff: runtime/vm/raw_object.h

Issue 8429027: Add an external array type to support typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments from patch set 1 Created 9 years, 1 month 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
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 3e91d91e6dc8ba76ee498e71b164a6923b2d7a11..0525e8826fac57cabf91171f4201b19993fed47e 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -52,6 +52,7 @@ namespace dart {
V(Bool) \
V(Array) \
V(ImmutableArray) \
+ V(ByteBuffer) \
V(Closure) \
V(Stacktrace) \
V(JSRegExp) \
@@ -719,6 +720,18 @@ class RawImmutableArray : public RawArray {
};
+class RawByteBuffer : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ByteBuffer);
+
+ RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
+ RawSmi* length_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->length_);
+ }
+ uint8_t* data_;
+};
+
+
class RawClosure : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);

Powered by Google App Engine
This is Rietveld 408576698