| OLD | NEW |
| 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 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 if (!foundSuperOrRedirect) { | 1138 if (!foundSuperOrRedirect) { |
| 1139 // No super initializer found. Try to find the default constructor if | 1139 // No super initializer found. Try to find the default constructor if |
| 1140 // the class is not Object. | 1140 // the class is not Object. |
| 1141 ClassElement enclosingClass = constructor.getEnclosingClass(); | 1141 ClassElement enclosingClass = constructor.getEnclosingClass(); |
| 1142 ClassElement superClass = enclosingClass.superclass; | 1142 ClassElement superClass = enclosingClass.superclass; |
| 1143 if (enclosingClass != compiler.objectClass) { | 1143 if (enclosingClass != compiler.objectClass) { |
| 1144 assert(superClass !== null); | 1144 assert(superClass !== null); |
| 1145 assert(superClass.resolutionState == STATE_DONE); | 1145 assert(superClass.resolutionState == STATE_DONE); |
| 1146 Selector selector = | 1146 Selector selector = new Selector.callConstructor( |
| 1147 new Selector.call(superClass.name, enclosingClass.getLibrary(), 0); | 1147 new SelectorName.namedClass(superClass.name), |
| 1148 FunctionElement target = superClass.lookupConstructor(superClass.name); | 1148 enclosingClass.getLibrary()); |
| 1149 FunctionElement target = superClass.lookupConstructor(selector); |
| 1149 if (target === null) { | 1150 if (target === null) { |
| 1150 compiler.internalError("no default constructor available"); | 1151 compiler.internalError("no default constructor available"); |
| 1151 } | 1152 } |
| 1152 inlineSuperOrRedirect(target, | 1153 inlineSuperOrRedirect(target, |
| 1153 selector, | 1154 selector, |
| 1154 const EmptyLink<Node>(), | 1155 const EmptyLink<Node>(), |
| 1155 constructors, | 1156 constructors, |
| 1156 fieldValues); | 1157 fieldValues); |
| 1157 } | 1158 } |
| 1158 } | 1159 } |
| (...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4232 new HSubGraphBlockInformation(elseBranch.graph)); | 4233 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4233 | 4234 |
| 4234 HBasicBlock conditionStartBlock = conditionBranch.block; | 4235 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4235 conditionStartBlock.setBlockFlow(info, joinBlock); | 4236 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4236 SubGraph conditionGraph = conditionBranch.graph; | 4237 SubGraph conditionGraph = conditionBranch.graph; |
| 4237 HIf branch = conditionGraph.end.last; | 4238 HIf branch = conditionGraph.end.last; |
| 4238 assert(branch is HIf); | 4239 assert(branch is HIf); |
| 4239 branch.blockInformation = conditionStartBlock.blockFlow; | 4240 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4240 } | 4241 } |
| 4241 } | 4242 } |
| OLD | NEW |