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

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

Issue 10829379: Add erroneous elements for function types and use them to allow unresolvable constructors to be han… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 8c6ca6badb54cc3e253a0b5e177c147af88e1d42..81eac1b672b59c2692e84b65f1d1d334a5c2357e 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -2401,7 +2401,13 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
visitNewExpression(NewExpression node) {
- if (node.isConst()) {
+ Element element = elements[node.send];
+ if (Element.isInvalid(element)) {
+ // TODO(karlklose): generate runtime error or noSuchMethodCall, depending
+ // on whether element is null or it is an erroneous element with a
+ // particular error message.
+ compiler.cancel('Unimplemented non-matching static call', node: node);
ahe 2012/08/20 15:06:47 No really a non-matching static call.
karlklose 2012/08/21 11:44:10 Done.
+ } else if (node.isConst()) {
// TODO(karlklose): add type representation
ConstantHandler handler = compiler.constantHandler;
Constant constant = handler.compileNodeWithDefinitions(node, elements);

Powered by Google App Engine
This is Rietveld 408576698