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

Unified Diff: runtime/vm/parser.cc

Issue 23872010: Add metadata for type parameters (TypeVariableMirror). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed comments Created 7 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
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 905256ba8e3a03d188d496683203dedac9779181..81407aab2fe19c3aa4d2bdbc156c044ec28b7639 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4247,7 +4247,7 @@ void Parser::ParseTypeParameters(const Class& cls) {
AbstractType& type_parameter_bound = Type::Handle();
do {
ConsumeToken();
- SkipMetadata();
+ const intptr_t metadata_pos = SkipMetadata();
const intptr_t type_parameter_pos = TokenPos();
String& type_parameter_name =
*ExpectUserDefinedTypeIdentifier("type parameter expected");
@@ -4276,6 +4276,9 @@ void Parser::ParseTypeParameters(const Class& cls) {
type_parameter_bound,
type_parameter_pos);
type_parameters_array.Add(type_parameter);
+ if (metadata_pos >= 0) {
+ library_.AddTypeParameterMetadata(type_parameter, metadata_pos);
+ }
index++;
} while (CurrentToken() == Token::kCOMMA);
Token::Kind token = CurrentToken();
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698