| 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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 List<HInstruction> providedArguments, | 1253 List<HInstruction> providedArguments, |
| 1254 Node currentNode) { | 1254 Node currentNode) { |
| 1255 // We cannot inline a method from a deferred library into a method | 1255 // We cannot inline a method from a deferred library into a method |
| 1256 // which isn't deferred. | 1256 // which isn't deferred. |
| 1257 // TODO(ahe): But we should still inline into the same | 1257 // TODO(ahe): But we should still inline into the same |
| 1258 // connected-component of the deferred library. | 1258 // connected-component of the deferred library. |
| 1259 if (compiler.deferredLoadTask.isDeferred(element)) return false; | 1259 if (compiler.deferredLoadTask.isDeferred(element)) return false; |
| 1260 if (compiler.disableInlining) return false; | 1260 if (compiler.disableInlining) return false; |
| 1261 if (inliningStack.length > MAX_INLINING_DEPTH) return false; | 1261 if (inliningStack.length > MAX_INLINING_DEPTH) return false; |
| 1262 | 1262 |
| 1263 // BUG(11136): The backend inferrer does not work when inlining |
| 1264 // these elements. |
| 1265 if (element.isGenerativeConstructor() |
| 1266 || element.isGenerativeConstructorBody()) { |
| 1267 return false; |
| 1268 } |
| 1269 |
| 1263 // Ensure that [element] is an implementation element. | 1270 // Ensure that [element] is an implementation element. |
| 1264 element = element.implementation; | 1271 element = element.implementation; |
| 1265 FunctionElement function = element; | 1272 FunctionElement function = element; |
| 1266 bool canBeInlined = backend.canBeInlined[function]; | 1273 bool canBeInlined = backend.canBeInlined[function]; |
| 1267 if (canBeInlined == false) return false; | 1274 if (canBeInlined == false) return false; |
| 1268 assert(selector != null | 1275 assert(selector != null |
| 1269 || Elements.isStaticOrTopLevel(element) | 1276 || Elements.isStaticOrTopLevel(element) |
| 1270 || element.isGenerativeConstructorBody()); | 1277 || element.isGenerativeConstructorBody()); |
| 1271 if (selector != null && !selector.applies(function, compiler)) return false; | 1278 if (selector != null && !selector.applies(function, compiler)) return false; |
| 1272 | 1279 |
| (...skipping 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5419 new HSubGraphBlockInformation(elseBranch.graph)); | 5426 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5420 | 5427 |
| 5421 HBasicBlock conditionStartBlock = conditionBranch.block; | 5428 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5422 conditionStartBlock.setBlockFlow(info, joinBlock); | 5429 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5423 SubGraph conditionGraph = conditionBranch.graph; | 5430 SubGraph conditionGraph = conditionBranch.graph; |
| 5424 HIf branch = conditionGraph.end.last; | 5431 HIf branch = conditionGraph.end.last; |
| 5425 assert(branch is HIf); | 5432 assert(branch is HIf); |
| 5426 branch.blockInformation = conditionStartBlock.blockFlow; | 5433 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5427 } | 5434 } |
| 5428 } | 5435 } |
| OLD | NEW |