Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: dart/lib/compiler/implementation/ssa/builder.dart

Issue 11227007: Unify parsing of constructor references. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/lib/compiler/implementation/ssa/builder.dart
diff --git a/dart/lib/compiler/implementation/ssa/builder.dart b/dart/lib/compiler/implementation/ssa/builder.dart
index d48f76ee959121bff3828e1f9aab731273648cab..294036d11ada45e4533ad91977784ba30492a59a 100644
--- a/dart/lib/compiler/implementation/ssa/builder.dart
+++ b/dart/lib/compiler/implementation/ssa/builder.dart
@@ -2898,7 +2898,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
<HInstruction>[typeInfoSetter, newObject, runtimeInfo]));
}
- visitNewSend(Send node) {
+ visitNewSend(Send node, InterfaceType type) {
bool isListConstructor = false;
computeType(element) {
Element originalElement = elements[node];
@@ -2941,11 +2941,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
compiler.cancel('Unimplemented non-matching static call', node: node);
}
- TypeAnnotation annotation = node.getTypeAnnotation();
- if (annotation == null) {
- compiler.internalError("malformed send in new expression");
- }
- InterfaceType type = elements.getType(annotation);
if (type.element.modifiers.isAbstract() &&
constructor.isGenerativeConstructor()) {
generateAbstractClassInstantiationError(node, type.name.slowToString());
@@ -3098,7 +3093,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
Constant constant = handler.compileNodeWithDefinitions(node, elements);
stack.add(graph.addConstant(constant));
} else {
- visitNewSend(node.send);
+ visitNewSend(node.send, elements.getType(node));
}
}

Powered by Google App Engine
This is Rietveld 408576698