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 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3058 return HType.UNKNOWN; | 3058 return HType.UNKNOWN; |
3059 } | 3059 } |
3060 } | 3060 } |
3061 | 3061 |
3062 Element constructor = elements[node]; | 3062 Element constructor = elements[node]; |
3063 Selector selector = elements.getSelector(node); | 3063 Selector selector = elements.getSelector(node); |
3064 if (compiler.enqueuer.resolution.getCachedElements(constructor) == null) { | 3064 if (compiler.enqueuer.resolution.getCachedElements(constructor) == null) { |
3065 compiler.internalError("Unresolved element: $constructor", node: node); | 3065 compiler.internalError("Unresolved element: $constructor", node: node); |
3066 } | 3066 } |
3067 FunctionElement functionElement = constructor; | 3067 FunctionElement functionElement = constructor; |
3068 constructor = functionElement.defaultImplementation; | 3068 constructor = functionElement.redirectionTarget; |
3069 // TODO(5346): Try to avoid the need for calling [declaration] before | 3069 // TODO(5346): Try to avoid the need for calling [declaration] before |
3070 // creating an [HStatic]. | 3070 // creating an [HStatic]. |
3071 HInstruction target = new HStatic(constructor.declaration); | 3071 HInstruction target = new HStatic(constructor.declaration); |
3072 add(target); | 3072 add(target); |
3073 var inputs = <HInstruction>[]; | 3073 var inputs = <HInstruction>[]; |
3074 inputs.add(target); | 3074 inputs.add(target); |
3075 // TODO(5347): Try to avoid the need for calling [implementation] before | 3075 // TODO(5347): Try to avoid the need for calling [implementation] before |
3076 // calling [addStaticSendArgumentsToList]. | 3076 // calling [addStaticSendArgumentsToList]. |
3077 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, | 3077 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, |
3078 constructor.implementation, | 3078 constructor.implementation, |
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4763 new HSubGraphBlockInformation(elseBranch.graph)); | 4763 new HSubGraphBlockInformation(elseBranch.graph)); |
4764 | 4764 |
4765 HBasicBlock conditionStartBlock = conditionBranch.block; | 4765 HBasicBlock conditionStartBlock = conditionBranch.block; |
4766 conditionStartBlock.setBlockFlow(info, joinBlock); | 4766 conditionStartBlock.setBlockFlow(info, joinBlock); |
4767 SubGraph conditionGraph = conditionBranch.graph; | 4767 SubGraph conditionGraph = conditionBranch.graph; |
4768 HIf branch = conditionGraph.end.last; | 4768 HIf branch = conditionGraph.end.last; |
4769 assert(branch is HIf); | 4769 assert(branch is HIf); |
4770 branch.blockInformation = conditionStartBlock.blockFlow; | 4770 branch.blockInformation = conditionStartBlock.blockFlow; |
4771 } | 4771 } |
4772 } | 4772 } |
OLD | NEW |