| Index: pkg/compiler/lib/src/js_backend/runtime_types.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
|
| index 937703692faf049174143f2f3316d143294a8521..cee17622ac079808fec3a2dcf3cb79acf992b6c2 100644
|
| --- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
|
| @@ -550,11 +550,19 @@ class RuntimeTypes {
|
| }
|
| }
|
|
|
| + /**
|
| + * Returns a [jsAst.Expression] representing the given [type]. Type
|
| + * variables are replaced by placeholders in the ast.
|
| + *
|
| + * [firstPlaceholderIndex] is the index to use for the first placeholder.
|
| + * This is useful if the returned [jsAst.Expression] is only part of a
|
| + * larger template. By default, indexing starts with 0.
|
| + */
|
| jsAst.Expression getTypeRepresentationWithPlaceholders(DartType type,
|
| - OnVariableCallback onVariable) {
|
| + OnVariableCallback onVariable, {int firstPlaceholderIndex : 0}) {
|
| // Create a type representation. For type variables call the original
|
| // callback for side effects and return a template placeholder.
|
| - int positions = 0;
|
| + int positions = firstPlaceholderIndex;
|
| jsAst.Expression representation = getTypeRepresentation(type, (variable) {
|
| onVariable(variable);
|
| return new jsAst.InterpolatedExpression(positions++);
|
|
|