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

Unified Diff: runtime/vm/raw_object.h

Issue 2591823002: Introduce a SignatureData class so that signature functions can store both their (Closed)
Patch Set: address comments Created 4 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
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 7c9732024593b3ff36259482a9b9cb17f9206edf..8cf284d8107bfafacc8001314c8d91536a14720c 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -22,6 +22,7 @@ namespace dart {
V(PatchClass) \
V(Function) \
V(ClosureData) \
+ V(SignatureData) \
V(RedirectionData) \
V(Field) \
V(LiteralToken) \
@@ -867,6 +868,23 @@ class RawClosureData : public RawObject {
};
+class RawSignatureData : public RawObject {
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(SignatureData);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->parent_function_);
+ }
+ RawFunction* parent_function_; // Enclosing function of this sig. function.
+ RawType* signature_type_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->signature_type_);
+ }
+
+ friend class Function;
+};
+
+
class RawRedirectionData : public RawObject {
private:
RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData);
« 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