| Index: lib/compiler/implementation/ssa/builder.dart
|
| diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
|
| index e8517ce475764335c6489bd52a864f9fbc6c4a97..8a2d33a4108cb9ced2661e73ee6a18dee2b61b65 100644
|
| --- a/lib/compiler/implementation/ssa/builder.dart
|
| +++ b/lib/compiler/implementation/ssa/builder.dart
|
| @@ -328,7 +328,6 @@ class LocalsHandler {
|
| Compiler compiler = builder.compiler;
|
| closureData = compiler.closureToClassMapper.computeClosureToClassMapping(
|
| node, builder.elements);
|
| -
|
| FunctionSignature signature = function.computeSignature(compiler);
|
| signature.forEachParameter((Element element) {
|
| HInstruction parameter = new HParameterValue(element);
|
| @@ -2528,8 +2527,12 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
|
| compiler.cancel('Unimplemented non-matching static call', node: node);
|
| }
|
|
|
| - TypeAnnotation annotation = getTypeAnnotationFromSend(node);
|
| - elements.getType(annotation).arguments.forEach((DartType argument) {
|
| + TypeAnnotation annotation = node.getTypeAnnotation();
|
| + if (annotation == null) {
|
| + compiler.internalError("malformed send in new expression");
|
| + }
|
| + InterfaceType type = elements.getType(annotation);
|
| + type.arguments.forEach((DartType argument) {
|
| inputs.add(analyzeTypeArgument(argument, node));
|
| });
|
|
|
| @@ -2589,20 +2592,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
|
| compiler.internalError(reason, node: node);
|
| }
|
|
|
| - // TODO(karlklose): share with resolver.
|
| - TypeAnnotation getTypeAnnotationFromSend(Send send) {
|
| - if (send.selector is TypeAnnotation) {
|
| - return send.selector;
|
| - } else if (send.selector is Send) {
|
| - Send selector = send.selector;
|
| - if (selector.receiver is TypeAnnotation) {
|
| - return selector.receiver;
|
| - }
|
| - } else {
|
| - compiler.internalError("malformed send in new expression");
|
| - }
|
| - }
|
| -
|
| void generateRuntimeError(Node node, String message) {
|
| DartString messageObject = new DartString.literal(message);
|
| HInstruction errorMessage = graph.addConstantString(messageObject, node);
|
|
|