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

Unified Diff: frog/leg/ssa/builder.dart

Issue 9243011: Implement named constructors and resolving of redirecting constructors and super-initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move constructor name creation to lookup function. Created 8 years, 11 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: frog/leg/ssa/builder.dart
diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart
index 590abed39daee5710d3e2395fd448632dc6a4560..d9d40874850be634368af9b23610b79b9ef113dc 100644
--- a/frog/leg/ssa/builder.dart
+++ b/frog/leg/ssa/builder.dart
@@ -205,13 +205,14 @@ class SsaBuilder implements Visitor {
assert(link.head is Send);
if (link.head is !SendSet) {
compiler.unimplemented('SsaBuilder.buildFactory super-init');
+ } else {
+ SendSet init = link.head;
+ Link<Node> arguments = init.arguments;
+ assert(!arguments.isEmpty() && arguments.tail.isEmpty());
+ visit(arguments.head);
+ HInstruction value = pop();
+ updateDefinition(init, value);
}
- SendSet init = link.head;
- Link<Node> arguments = init.arguments;
- assert(!arguments.isEmpty() && arguments.tail.isEmpty());
- visit(arguments.head);
- HInstruction value = pop();
- updateDefinition(init, value);
}
}
@@ -241,8 +242,7 @@ class SsaBuilder implements Visitor {
// We expect exactly one identifier.
assert(!identifierLink.isEmpty() && identifierLink.tail.isEmpty());
if (identifierLink.head is !Identifier) {
- compiler.unimplemented(
- "SsaBuilder.buildFactory non-identifier");
+ compiler.unimplemented("SsaBuilder.buildFactory non-identifier");
}
Identifier name = identifierLink.head;
Element parameterElement = elements[name];
@@ -805,7 +805,7 @@ class SsaBuilder implements Visitor {
if (send.receiver == null) {
receiver = thisDefinition;
if (receiver === null) {
- compiler.unimplemented("Ssa.generateGetter.", node: send);
+ compiler.unimplemented("SsaBuilder.generateGetter.", node: send);
}
} else {
visit(send.receiver);

Powered by Google App Engine
This is Rietveld 408576698