| 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 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 /** | 1210 /** |
| 1211 * Try to inline [element] within the currect context of the | 1211 * Try to inline [element] within the currect context of the |
| 1212 * builder. The insertion point is the state of the builder. | 1212 * builder. The insertion point is the state of the builder. |
| 1213 */ | 1213 */ |
| 1214 bool tryInlineMethod(Element element, | 1214 bool tryInlineMethod(Element element, |
| 1215 Selector selector, | 1215 Selector selector, |
| 1216 List<HInstruction> providedArguments, | 1216 List<HInstruction> providedArguments, |
| 1217 Node currentNode) { | 1217 Node currentNode) { |
| 1218 backend.registerStaticUse(element, compiler.enqueuer.codegen); |
| 1218 // We cannot inline a method from a deferred library into a method | 1219 // We cannot inline a method from a deferred library into a method |
| 1219 // which isn't deferred. | 1220 // which isn't deferred. |
| 1220 // TODO(ahe): But we should still inline into the same | 1221 // TODO(ahe): But we should still inline into the same |
| 1221 // connected-component of the deferred library. | 1222 // connected-component of the deferred library. |
| 1222 if (compiler.deferredLoadTask.isDeferred(element)) return false; | 1223 if (compiler.deferredLoadTask.isDeferred(element)) return false; |
| 1223 if (compiler.disableInlining) return false; | 1224 if (compiler.disableInlining) return false; |
| 1224 if (inliningStack.length > MAX_INLINING_DEPTH) return false; | 1225 if (inliningStack.length > MAX_INLINING_DEPTH) return false; |
| 1225 | 1226 |
| 1226 // Ensure that [element] is an implementation element. | 1227 // Ensure that [element] is an implementation element. |
| 1227 element = element.implementation; | 1228 element = element.implementation; |
| (...skipping 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5380 new HSubGraphBlockInformation(elseBranch.graph)); | 5381 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5381 | 5382 |
| 5382 HBasicBlock conditionStartBlock = conditionBranch.block; | 5383 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5383 conditionStartBlock.setBlockFlow(info, joinBlock); | 5384 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5384 SubGraph conditionGraph = conditionBranch.graph; | 5385 SubGraph conditionGraph = conditionBranch.graph; |
| 5385 HIf branch = conditionGraph.end.last; | 5386 HIf branch = conditionGraph.end.last; |
| 5386 assert(branch is HIf); | 5387 assert(branch is HIf); |
| 5387 branch.blockInformation = conditionStartBlock.blockFlow; | 5388 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5388 } | 5389 } |
| 5389 } | 5390 } |
| OLD | NEW |