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

Unified Diff: runtime/vm/raw_object.h

Issue 2349593003: Support generic method syntax (fixes #25869). (Closed)
Patch Set: address comments Created 4 years, 3 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/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 1e91d1e7c8d7425ca04e1c2775f3048f94e4c4cf..9e40136f949b022e97f22d25dea09af38dec0b40 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -841,6 +841,7 @@ class RawFunction : public RawObject {
RawAbstractType* result_type_;
RawArray* parameter_types_;
RawArray* parameter_names_;
+ RawTypeArguments* type_parameters_; // Array of TypeParameter.
RawObject* data_; // Additional data specific to the function kind.
RawObject** to_snapshot() {
return reinterpret_cast<RawObject**>(&ptr()->data_);
@@ -1747,10 +1748,14 @@ class RawTypeParameter : public RawAbstractType {
RawString* name_;
RawSmi* hash_;
RawAbstractType* bound_; // ObjectType if no explicit bound specified.
- RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->bound_); }
+ RawFunction* parameterized_function_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->parameterized_function_);
+ }
classid_t parameterized_class_id_;
TokenPosition token_pos_;
int16_t index_;
+ uint8_t parent_level_; // Max 255 levels of nested generic functions is OK.
int8_t type_state_;
friend class CidRewriteVisitor;
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698