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

Unified Diff: runtime/vm/raw_object.h

Issue 18242003: Add a VM defined class MirrorReference as an opaque pointer for Dart code to VM internal objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/object_test.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 24693)
+++ runtime/vm/raw_object.h (working copy)
@@ -66,6 +66,7 @@
V(Stacktrace) \
V(JSRegExp) \
V(WeakProperty) \
+ V(MirrorReference) \
V(DartFunction) \
V(Float32x4) \
V(Uint32x4) \
@@ -1526,7 +1527,21 @@
friend class ScavengerVisitor;
};
+// MirrorReferences are used by mirrors to hold reflectees that are VM
+// internal objects, such as libraries, classes, functions or types.
+class RawMirrorReference : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(MirrorReference);
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->referent_);
+ }
+ RawObject* referent_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->referent_);
+ }
+};
+
+
// Class Id predicates.
inline bool RawObject::IsErrorClassId(intptr_t index) {
« no previous file with comments | « 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