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

Unified Diff: runtime/vm/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/clustered_snapshot.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
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index f3a4d29266e3bb331e2381c53724bc3dbd8bf53f..816a79889cb1d0e1b5987e97cadfc7783369d37a 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -488,6 +488,7 @@ class Object {
static RawClass* patch_class_class() { return patch_class_class_; }
static RawClass* function_class() { return function_class_; }
static RawClass* closure_data_class() { return closure_data_class_; }
+ static RawClass* signature_data_class() { return signature_data_class_; }
static RawClass* redirection_data_class() { return redirection_data_class_; }
static RawClass* field_class() { return field_class_; }
static RawClass* literal_token_class() { return literal_token_class_; }
@@ -745,6 +746,7 @@ class Object {
static RawClass* patch_class_class_; // Class of the PatchClass vm object.
static RawClass* function_class_; // Class of the Function vm object.
static RawClass* closure_data_class_; // Class of ClosureData vm obj.
+ static RawClass* signature_data_class_; // Class of SignatureData vm obj.
static RawClass* redirection_data_class_; // Class of RedirectionData vm obj.
static RawClass* field_class_; // Class of the Field vm object.
static RawClass* literal_token_class_; // Class of LiteralToken vm object.
@@ -3022,6 +3024,30 @@ class ClosureData : public Object {
};
+class SignatureData : public Object {
+ public:
+ static intptr_t InstanceSize() {
+ return RoundedAllocationSize(sizeof(RawSignatureData));
+ }
+
+ private:
+ // Enclosing function of this signature function.
+ RawFunction* parent_function() const { return raw_ptr()->parent_function_; }
+ void set_parent_function(const Function& value) const;
+
+ // Signature type of this signature function.
+ RawType* signature_type() const { return raw_ptr()->signature_type_; }
+ void set_signature_type(const Type& value) const;
+
+ static RawSignatureData* New();
+
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(SignatureData, Object);
+ friend class Class;
+ friend class Function;
+ friend class HeapProfiler;
+};
+
+
class RedirectionData : public Object {
public:
static intptr_t InstanceSize() {
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698