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

Unified Diff: runtime/vm/raw_object.h

Issue 103913005: Introduce class TypeRef in the VM to fully support recursive types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/parser.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 31085)
+++ runtime/vm/raw_object.h (working copy)
@@ -50,6 +50,7 @@
V(Instance) \
V(AbstractType) \
V(Type) \
+ V(TypeRef) \
V(TypeParameter) \
V(BoundedType) \
V(MixinAppType) \
@@ -1178,6 +1179,21 @@
};
+class RawTypeRef : public RawAbstractType {
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(TypeRef);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->type_);
+ }
+ RawAbstractType* type_; // The referenced type.
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->type_);
+ }
+ bool is_being_checked_; // Transient field, not snapshotted.
+};
+
+
class RawTypeParameter : public RawAbstractType {
private:
RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter);
@@ -1208,7 +1224,7 @@
RawObject** to() {
return reinterpret_cast<RawObject**>(&ptr()->type_parameter_);
}
- bool is_being_checked_;
+ bool is_being_checked_; // Transient field, not snapshotted.
};
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698