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

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

Issue 11111017: Re-land r13557 on behalf of Alexander. (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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1211
1212 if (!foundSuperOrRedirect) { 1212 if (!foundSuperOrRedirect) {
1213 // No super initializer found. Try to find the default constructor if 1213 // No super initializer found. Try to find the default constructor if
1214 // the class is not Object. 1214 // the class is not Object.
1215 ClassElement enclosingClass = constructor.getEnclosingClass(); 1215 ClassElement enclosingClass = constructor.getEnclosingClass();
1216 ClassElement superClass = enclosingClass.superclass; 1216 ClassElement superClass = enclosingClass.superclass;
1217 if (!enclosingClass.isObject(compiler)) { 1217 if (!enclosingClass.isObject(compiler)) {
1218 assert(superClass !== null); 1218 assert(superClass !== null);
1219 assert(superClass.resolutionState == STATE_DONE); 1219 assert(superClass.resolutionState == STATE_DONE);
1220 Selector selector = 1220 Selector selector =
1221 new Selector.call(superClass.name, enclosingClass.getLibrary(), 0); 1221 new Selector.callDefaultConstructor(enclosingClass.getLibrary());
1222 // TODO(johnniwinther): Should we find injected constructors as well? 1222 // TODO(johnniwinther): Should we find injected constructors as well?
1223 FunctionElement target = superClass.lookupConstructor(superClass.name); 1223 FunctionElement target = superClass.lookupConstructor(selector);
1224 if (target === null) { 1224 if (target === null) {
1225 compiler.internalError("no default constructor available"); 1225 compiler.internalError("no default constructor available");
1226 } 1226 }
1227 inlineSuperOrRedirect(target.implementation, 1227 inlineSuperOrRedirect(target.implementation,
1228 selector, 1228 selector,
1229 const Link<Node>(), 1229 const Link<Node>(),
1230 constructors, 1230 constructors,
1231 fieldValues); 1231 fieldValues);
1232 } 1232 }
1233 } 1233 }
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4482 new HSubGraphBlockInformation(elseBranch.graph)); 4482 new HSubGraphBlockInformation(elseBranch.graph));
4483 4483
4484 HBasicBlock conditionStartBlock = conditionBranch.block; 4484 HBasicBlock conditionStartBlock = conditionBranch.block;
4485 conditionStartBlock.setBlockFlow(info, joinBlock); 4485 conditionStartBlock.setBlockFlow(info, joinBlock);
4486 SubGraph conditionGraph = conditionBranch.graph; 4486 SubGraph conditionGraph = conditionBranch.graph;
4487 HIf branch = conditionGraph.end.last; 4487 HIf branch = conditionGraph.end.last;
4488 assert(branch is HIf); 4488 assert(branch is HIf);
4489 branch.blockInformation = conditionStartBlock.blockFlow; 4489 branch.blockInformation = conditionStartBlock.blockFlow;
4490 } 4490 }
4491 } 4491 }
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