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

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
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 38259)
+++ runtime/vm/object.h (working copy)
@@ -4325,6 +4325,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;
@@ -6687,6 +6688,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') | runtime/vm/snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698