| 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 class Interceptors { | 7 class Interceptors { |
| 8 Compiler compiler; | 8 Compiler compiler; |
| 9 Interceptors(Compiler this.compiler); | 9 Interceptors(Compiler this.compiler); |
| 10 | 10 |
| (...skipping 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3138 // TODO(5347): Try to avoid the need for calling [implementation] before | 3138 // TODO(5347): Try to avoid the need for calling [implementation] before |
| 3139 // calling [addStaticSendArgumentsToList]. | 3139 // calling [addStaticSendArgumentsToList]. |
| 3140 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, | 3140 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, |
| 3141 constructor.implementation, | 3141 constructor.implementation, |
| 3142 inputs); | 3142 inputs); |
| 3143 if (!succeeded) { | 3143 if (!succeeded) { |
| 3144 generateWrongArgumentCountError(node, constructor, node.arguments); | 3144 generateWrongArgumentCountError(node, constructor, node.arguments); |
| 3145 return; | 3145 return; |
| 3146 } | 3146 } |
| 3147 | 3147 |
| 3148 if (type.element.modifiers.isAbstract() && | 3148 if (constructor.getEnclosingClass().isAbstract(compiler) && |
| 3149 constructor.isGenerativeConstructor()) { | 3149 constructor.isGenerativeConstructor()) { |
| 3150 generateAbstractClassInstantiationError(node, type.name.slowToString()); | 3150 generateAbstractClassInstantiationError(node, type.name.slowToString()); |
| 3151 return; | 3151 return; |
| 3152 } | 3152 } |
| 3153 if (compiler.world.needsRti(constructor.enclosingElement)) { | 3153 if (compiler.world.needsRti(constructor.enclosingElement)) { |
| 3154 if (!type.arguments.isEmpty) { | 3154 if (!type.arguments.isEmpty) { |
| 3155 type.arguments.forEach((DartType argument) { | 3155 type.arguments.forEach((DartType argument) { |
| 3156 inputs.add(analyzeTypeArgument(argument, node)); | 3156 inputs.add(analyzeTypeArgument(argument, node)); |
| 3157 }); | 3157 }); |
| 3158 } else if (compiler.enabledRuntimeType) { | 3158 } else if (compiler.enabledRuntimeType) { |
| (...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4828 new HSubGraphBlockInformation(elseBranch.graph)); | 4828 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4829 | 4829 |
| 4830 HBasicBlock conditionStartBlock = conditionBranch.block; | 4830 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4831 conditionStartBlock.setBlockFlow(info, joinBlock); | 4831 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4832 SubGraph conditionGraph = conditionBranch.graph; | 4832 SubGraph conditionGraph = conditionBranch.graph; |
| 4833 HIf branch = conditionGraph.end.last; | 4833 HIf branch = conditionGraph.end.last; |
| 4834 assert(branch is HIf); | 4834 assert(branch is HIf); |
| 4835 branch.blockInformation = conditionStartBlock.blockFlow; | 4835 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4836 } | 4836 } |
| 4837 } | 4837 } |
| OLD | NEW |