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

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: Make loads and stores byte relative 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 8662311cb4b5fa6049197c83f1988d96e21b8e52..2bbe67e74fb57567dfaadd6fe15548ca9e6dd517 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) \
@@ -718,6 +719,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() {
Ivan Posva 2011/11/10 22:31:02 One line? Same as from() above?
cshapiro 2011/11/11 00:37:53 Sure. Done.
+ return reinterpret_cast<RawObject**>(&ptr()->length_);
+ }
+ uint8_t* data_;
+};
+
+
class RawClosure : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);
« runtime/vm/globals.h ('K') | « runtime/vm/object_test.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698