| 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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 FunctionElement function = element; | 1268 FunctionElement function = element; |
| 1269 | 1269 |
| 1270 bool insideLoop = loopNesting > 0 || graph.calledInLoop; | 1270 bool insideLoop = loopNesting > 0 || graph.calledInLoop; |
| 1271 | 1271 |
| 1272 // Bail out early if the inlining decision is in the cache and we can't | 1272 // Bail out early if the inlining decision is in the cache and we can't |
| 1273 // inline (no need to check the hard constraints). | 1273 // inline (no need to check the hard constraints). |
| 1274 bool cachedCanBeInlined = | 1274 bool cachedCanBeInlined = |
| 1275 backend.inlineCache.canInline(function, insideLoop: insideLoop); | 1275 backend.inlineCache.canInline(function, insideLoop: insideLoop); |
| 1276 if (cachedCanBeInlined == false) return false; | 1276 if (cachedCanBeInlined == false) return false; |
| 1277 | 1277 |
| 1278 // @lry debug |
| 1279 if (element.name == 'noInline') return false; |
| 1280 |
| 1278 bool meetsHardConstraints() { | 1281 bool meetsHardConstraints() { |
| 1279 // We cannot inline a method from a deferred library into a method | 1282 // We cannot inline a method from a deferred library into a method |
| 1280 // which isn't deferred. | 1283 // which isn't deferred. |
| 1281 // TODO(ahe): But we should still inline into the same | 1284 // TODO(ahe): But we should still inline into the same |
| 1282 // connected-component of the deferred library. | 1285 // connected-component of the deferred library. |
| 1283 if (compiler.deferredLoadTask.isDeferred(element)) return false; | 1286 if (compiler.deferredLoadTask.isDeferred(element)) return false; |
| 1284 if (compiler.disableInlining) return false; | 1287 if (compiler.disableInlining) return false; |
| 1285 | 1288 |
| 1286 assert(selector != null | 1289 assert(selector != null |
| 1287 || Elements.isStaticOrTopLevel(element) | 1290 || Elements.isStaticOrTopLevel(element) |
| (...skipping 4457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5745 new HSubGraphBlockInformation(elseBranch.graph)); | 5748 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5746 | 5749 |
| 5747 HBasicBlock conditionStartBlock = conditionBranch.block; | 5750 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5748 conditionStartBlock.setBlockFlow(info, joinBlock); | 5751 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5749 SubGraph conditionGraph = conditionBranch.graph; | 5752 SubGraph conditionGraph = conditionBranch.graph; |
| 5750 HIf branch = conditionGraph.end.last; | 5753 HIf branch = conditionGraph.end.last; |
| 5751 assert(branch is HIf); | 5754 assert(branch is HIf); |
| 5752 branch.blockInformation = conditionStartBlock.blockFlow; | 5755 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5753 } | 5756 } |
| 5754 } | 5757 } |
| OLD | NEW |