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

Unified Diff: runtime/vm/object.h

Issue 392043003: The dart version of typeddata library has changed to be compatible with the dart2js implementation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 38347)
+++ runtime/vm/object.h (working copy)
@@ -4344,6 +4344,7 @@
// TODO(iposva): Determine if this gets in the way of Smi.
HEAP_OBJECT_IMPLEMENTATION(Instance, Object);
+ friend class ByteBuffer;
friend class Class;
friend class Closure;
friend class DeferredObject;
@@ -6720,6 +6721,28 @@
};
+class ByteBuffer : public AllStatic {
+ public:
+ static RawInstance* Data(const Instance& view_obj) {
+ ASSERT(!view_obj.IsNull());
+ return *reinterpret_cast<RawInstance**>(view_obj.raw_ptr() + kDataOffset);
+ }
+
+ static intptr_t NumberOfFields() {
+ return kDataOffset;
+ }
+
+ static intptr_t data_offset() {
+ return kWordSize * kDataOffset;
+ }
+
+ private:
+ enum {
+ kDataOffset = 1,
+ };
+};
+
+
class Closure : public AllStatic {
public:
static RawFunction* function(const Instance& closure) {
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698