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

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: Add asRaw from other CL 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 e606714c28b96a4669b8afd3ddd5d913b0c15ac7..717445a980f4b668cacd2dc8933a3a48c97b42d8 100644
--- a/dart/lib/compiler/implementation/ssa/builder.dart
+++ b/dart/lib/compiler/implementation/ssa/builder.dart
@@ -2910,7 +2910,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];
@@ -2952,11 +2952,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
return;
}
- 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());
@@ -3145,7 +3140,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));
}
}
« no previous file with comments | « dart/lib/compiler/implementation/scanner/parser.dart ('k') | dart/lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698