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

Side by Side Diff: lib/compiler/implementation/ssa/builder.dart

Issue 11085092: Revert "Made dart2js constructor lookup logic "private"-aware, fixed 4740 bug." and 5 subsequent at… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 1206
1207 if (!foundSuperOrRedirect) { 1207 if (!foundSuperOrRedirect) {
1208 // No super initializer found. Try to find the default constructor if 1208 // No super initializer found. Try to find the default constructor if
1209 // the class is not Object. 1209 // the class is not Object.
1210 ClassElement enclosingClass = constructor.getEnclosingClass(); 1210 ClassElement enclosingClass = constructor.getEnclosingClass();
1211 ClassElement superClass = enclosingClass.superclass; 1211 ClassElement superClass = enclosingClass.superclass;
1212 if (!enclosingClass.isObject(compiler)) { 1212 if (!enclosingClass.isObject(compiler)) {
1213 assert(superClass !== null); 1213 assert(superClass !== null);
1214 assert(superClass.resolutionState == STATE_DONE); 1214 assert(superClass.resolutionState == STATE_DONE);
1215 Selector selector = 1215 Selector selector =
1216 new Selector.callDefaultConstructor(enclosingClass.getLibrary()); 1216 new Selector.call(superClass.name, enclosingClass.getLibrary(), 0);
1217 // TODO(johnniwinther): Should we find injected constructors as well? 1217 // TODO(johnniwinther): Should we find injected constructors as well?
1218 FunctionElement target = superClass.lookupConstructor(selector); 1218 FunctionElement target = superClass.lookupConstructor(superClass.name);
1219 if (target === null) { 1219 if (target === null) {
1220 compiler.internalError("no default constructor available"); 1220 compiler.internalError("no default constructor available");
1221 } 1221 }
1222 inlineSuperOrRedirect(target.implementation, 1222 inlineSuperOrRedirect(target.implementation,
1223 selector, 1223 selector,
1224 const Link<Node>(), 1224 const Link<Node>(),
1225 constructors, 1225 constructors,
1226 fieldValues); 1226 fieldValues);
1227 } 1227 }
1228 } 1228 }
(...skipping 3234 matching lines...) Expand 10 before | Expand all | Expand 10 after
4463 new HSubGraphBlockInformation(elseBranch.graph)); 4463 new HSubGraphBlockInformation(elseBranch.graph));
4464 4464
4465 HBasicBlock conditionStartBlock = conditionBranch.block; 4465 HBasicBlock conditionStartBlock = conditionBranch.block;
4466 conditionStartBlock.setBlockFlow(info, joinBlock); 4466 conditionStartBlock.setBlockFlow(info, joinBlock);
4467 SubGraph conditionGraph = conditionBranch.graph; 4467 SubGraph conditionGraph = conditionBranch.graph;
4468 HIf branch = conditionGraph.end.last; 4468 HIf branch = conditionGraph.end.last;
4469 assert(branch is HIf); 4469 assert(branch is HIf);
4470 branch.blockInformation = conditionStartBlock.blockFlow; 4470 branch.blockInformation = conditionStartBlock.blockFlow;
4471 } 4471 }
4472 } 4472 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/types/concrete_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698