Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/builder.dart |
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
| index 2dca5031067a69d05063bccad4a974cf8654d439..6f609e245f456c89876714904a7c5ce0c60f6051 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -3556,17 +3556,17 @@ class SsaBuilder extends NewResolvedVisitor { |
| InterfaceType interface = type; |
| List<HInstruction> inputs = <HInstruction>[]; |
| bool first = true; |
| - List<String> templates = <String>[]; |
| + List<js.Expression> templates = <js.Expression>[]; |
| for (DartType argument in interface.typeArguments) { |
| templates.add(rti.getTypeRepresentationWithHashes(argument, (variable) { |
| HInstruction runtimeType = addTypeVariableReference(variable); |
| inputs.add(runtimeType); |
| })); |
| } |
| - String template = '[${templates.join(', ')}]'; |
| // TODO(sra): This is a fresh template each time. We can't let the |
| // template manager build them. |
| - js.Template code = js.js.uncachedExpressionTemplate(template); |
| + js.Template code = new js.Template.withExpressionResult( |
| + new js.ArrayInitializer(templates), hasPlaceholders : true); |
| HInstruction representation = |
| new HForeignCode(code, backend.readableArrayType, inputs, |
| nativeBehavior: native.NativeBehavior.PURE_ALLOCATION); |
| @@ -4623,11 +4623,14 @@ class SsaBuilder extends NewResolvedVisitor { |
| List<HInstruction> inputs = <HInstruction>[]; |
| - String template = rti.getTypeRepresentationWithHashes(argument, (variable) { |
| - inputs.add(addTypeVariableReference(variable)); |
| - }); |
| + js.Expression template = |
| + rti.getTypeRepresentationWithHashes(argument, |
|
floitsch
2015/05/19 13:43:35
looks like it fits on one line.
herhut
2015/05/19 14:08:09
Done.
|
| + (variable) { |
| + inputs.add(addTypeVariableReference(variable)); |
| + }); |
| - js.Template code = js.js.uncachedExpressionTemplate(template); |
| + js.Template code = |
| + new js.Template.withExpressionResult(template, hasPlaceholders : true); |
| HInstruction result = new HForeignCode(code, backend.stringType, inputs, |
| nativeBehavior: native.NativeBehavior.PURE); |
| add(result); |