| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
| 9 * methods. We need to override [Element.computeType] because our | 9 * methods. We need to override [Element.computeType] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3270 // TODO(5347): Try to avoid the need for calling [implementation] before | 3270 // TODO(5347): Try to avoid the need for calling [implementation] before |
| 3271 // calling [addStaticSendArgumentsToList]. | 3271 // calling [addStaticSendArgumentsToList]. |
| 3272 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, | 3272 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, |
| 3273 constructor.implementation, | 3273 constructor.implementation, |
| 3274 inputs); | 3274 inputs); |
| 3275 if (!succeeded) { | 3275 if (!succeeded) { |
| 3276 generateWrongArgumentCountError(node, constructor, node.arguments); | 3276 generateWrongArgumentCountError(node, constructor, node.arguments); |
| 3277 return; | 3277 return; |
| 3278 } | 3278 } |
| 3279 | 3279 |
| 3280 if (constructor.getEnclosingClass().isAbstract(compiler) && | 3280 ClassElement cls = constructor.getEnclosingClass(); |
| 3281 constructor.isGenerativeConstructor()) { | 3281 if (cls.isAbstract(compiler) && constructor.isGenerativeConstructor()) { |
| 3282 generateAbstractClassInstantiationError(node, type.name.slowToString()); | 3282 generateAbstractClassInstantiationError(node, cls.name.slowToString()); |
| 3283 return; | 3283 return; |
| 3284 } | 3284 } |
| 3285 if (compiler.world.needsRti(constructor.enclosingElement)) { | 3285 if (compiler.world.needsRti(constructor.enclosingElement)) { |
| 3286 if (!type.isRaw) { | 3286 if (!type.isRaw) { |
| 3287 type.typeArguments.forEach((DartType argument) { | 3287 type.typeArguments.forEach((DartType argument) { |
| 3288 inputs.add(analyzeTypeArgument(argument, node)); | 3288 inputs.add(analyzeTypeArgument(argument, node)); |
| 3289 }); | 3289 }); |
| 3290 } | 3290 } |
| 3291 } | 3291 } |
| 3292 | 3292 |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4957 new HSubGraphBlockInformation(elseBranch.graph)); | 4957 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4958 | 4958 |
| 4959 HBasicBlock conditionStartBlock = conditionBranch.block; | 4959 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4960 conditionStartBlock.setBlockFlow(info, joinBlock); | 4960 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4961 SubGraph conditionGraph = conditionBranch.graph; | 4961 SubGraph conditionGraph = conditionBranch.graph; |
| 4962 HIf branch = conditionGraph.end.last; | 4962 HIf branch = conditionGraph.end.last; |
| 4963 assert(branch is HIf); | 4963 assert(branch is HIf); |
| 4964 branch.blockInformation = conditionStartBlock.blockFlow; | 4964 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4965 } | 4965 } |
| 4966 } | 4966 } |
| OLD | NEW |