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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 812523002: Change signature of lookupConstructor to only require a name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fail gracefully on missing default constructors when evaluating constant constructors. Created 5 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: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 239aea90b9eca8ad971c26caa358a7d947fce129..ac2b436c19a040a0bddd986076ccdd8be657a523 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1878,14 +1878,14 @@ class SsaBuilder extends ResolvedVisitor {
if (!enclosingClass.isObject) {
assert(superClass != null);
assert(superClass.resolutionState == STATE_DONE);
- Selector selector =
- new Selector.callDefaultConstructor(enclosingClass.library);
// TODO(johnniwinther): Should we find injected constructors as well?
- FunctionElement target = superClass.lookupConstructor(selector);
+ FunctionElement target = superClass.lookupDefaultConstructor();
if (target == null) {
compiler.internalError(superClass,
"No default constructor available.");
}
+ Selector selector =
+ new Selector.callDefaultConstructor(enclosingClass.library);
List<HInstruction> arguments =
selector.makeArgumentsList2(const Link<ast.Node>(),
target.implementation,
« pkg/compiler/lib/src/js_backend/backend.dart ('K') | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698