Chromium Code Reviews| 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 a28f2322012b3f443f520800eddf88cb2808a41d..1d7470ffdf17a0cbad922d116f70a44a7ccef62c 100644 |
| --- a/pkg/compiler/lib/src/js_backend/runtime_types.dart |
| +++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart |
| @@ -88,20 +88,11 @@ abstract class RuntimeTypesEncoder { |
| jsAst.Template get templateForCreateFunctionType; |
| jsAst.Name get getFunctionThatReturnsNullName; |
| + /// Returns a [jsAst.Expression] representing the given [type]. Type variables |
| + /// are replaced by the [jsAst.Expression] returned by [onVariable]. |
| jsAst.Expression getTypeRepresentation( |
| DartType type, OnVariableCallback onVariable, |
| [ShouldEncodeTypedefCallback shouldEncodeTypedef]); |
| - /** |
| - * 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, |
| - {int firstPlaceholderIndex: 0}); |
| String getTypeRepresentationForTypeConstant(DartType type); |
| } |
| @@ -619,20 +610,6 @@ class _RuntimeTypesEncoder implements RuntimeTypesEncoder { |
| } |
| @override |
| - jsAst.Expression getTypeRepresentationWithPlaceholders( |
| - DartType type, 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 = firstPlaceholderIndex; |
| - jsAst.Expression representation = getTypeRepresentation(type, (variable) { |
| - onVariable(variable); |
| - return new jsAst.InterpolatedExpression(positions++); |
| - }); |
| - return representation; |
| - } |
| - |
| - @override |
| jsAst.Expression getSubstitutionRepresentation( |
| List<DartType> types, OnVariableCallback onVariable) { |
| List<jsAst.Expression> elements = types |
| @@ -648,7 +625,6 @@ class _RuntimeTypesEncoder implements RuntimeTypesEncoder { |
| return new jsAst.VariableUse(v.name); |
| } |
| - ; |
|
sra1
2016/08/19 22:21:32
I guess this is what happens if you 'terminate' a
|
| jsAst.Expression encoding = getTypeRepresentation(type, onVariable); |
| if (contextClass == null && !alwaysGenerateFunction) { |
| return encoding; |