Index: lib/runtime/_types.js |
diff --git a/lib/runtime/_types.js b/lib/runtime/_types.js |
index af5e2d04d24fce2fe1fdf0f7c351b3816aaed66a..482adf4fa1c714f73f63168c77b1fc3052d142ec 100644 |
--- a/lib/runtime/_types.js |
+++ b/lib/runtime/_types.js |
@@ -139,6 +139,26 @@ dart_library.library('dart_runtime/_types', null, /* Imports */[ |
this.args = args; |
this.optionals = optionals; |
this.named = named; |
+ |
+ // TODO(vsm): This is just parameter metadata for now. |
+ this.metadata = []; |
+ function process(array, metadata) { |
+ var result = []; |
+ for (var i = 0; i < array.length; ++i) { |
+ var arg = array[i]; |
+ if (arg instanceof Array) { |
+ metadata.push(arg.slice(1)); |
+ result.push(arg[0]); |
+ } else { |
+ metadata.push([]); |
+ result.push(arg); |
+ } |
+ } |
+ return result; |
+ } |
+ this.args = process(this.args, this.metadata); |
+ this.optionals = process(this.optionals, this.metadata); |
+ // TODO(vsm): Add named arguments. |
this._canonize(); |
} |
_canonize() { |
@@ -202,6 +222,10 @@ dart_library.library('dart_runtime/_types', null, /* Imports */[ |
get named() { |
return this.functionType.named; |
} |
+ |
+ get metadata() { |
+ return this.functionType.metadata; |
+ } |
} |
function _functionType(definite, returnType, args, extra) { |