| 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 */ | 1134 */ |
| 1135 InliningState enterInlinedMethod(FunctionElement function, | 1135 InliningState enterInlinedMethod(FunctionElement function, |
| 1136 Selector selector, | 1136 Selector selector, |
| 1137 List<HInstruction> providedArguments, | 1137 List<HInstruction> providedArguments, |
| 1138 Node currentNode) { | 1138 Node currentNode) { |
| 1139 assert(invariant(function, function.isImplementation)); | 1139 assert(invariant(function, function.isImplementation)); |
| 1140 | 1140 |
| 1141 List<HInstruction> compiledArguments; | 1141 List<HInstruction> compiledArguments; |
| 1142 bool isInstanceMember = function.isInstanceMember(); | 1142 bool isInstanceMember = function.isInstanceMember(); |
| 1143 | 1143 |
| 1144 if (function.isGenerativeConstructor()) { |
| 1145 // The optimistic field type optimization requires |
| 1146 // to know all generative constructors seen in codegen. |
| 1147 backend.registerConstructor(function); |
| 1148 } |
| 1149 |
| 1144 if (currentNode == null | 1150 if (currentNode == null |
| 1145 || currentNode.asForIn() != null | 1151 || currentNode.asForIn() != null |
| 1146 || !isInstanceMember | 1152 || !isInstanceMember |
| 1147 || function.isGenerativeConstructorBody()) { | 1153 || function.isGenerativeConstructorBody()) { |
| 1148 // For these cases, the provided arguments must match the | 1154 // For these cases, the provided arguments must match the |
| 1149 // expected parameters. | 1155 // expected parameters. |
| 1150 assert(providedArguments != null); | 1156 assert(providedArguments != null); |
| 1151 compiledArguments = providedArguments; | 1157 compiledArguments = providedArguments; |
| 1152 } else { | 1158 } else { |
| 1153 Send send = currentNode.asSend(); | 1159 Send send = currentNode.asSend(); |
| (...skipping 4259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5413 new HSubGraphBlockInformation(elseBranch.graph)); | 5419 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5414 | 5420 |
| 5415 HBasicBlock conditionStartBlock = conditionBranch.block; | 5421 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5416 conditionStartBlock.setBlockFlow(info, joinBlock); | 5422 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5417 SubGraph conditionGraph = conditionBranch.graph; | 5423 SubGraph conditionGraph = conditionBranch.graph; |
| 5418 HIf branch = conditionGraph.end.last; | 5424 HIf branch = conditionGraph.end.last; |
| 5419 assert(branch is HIf); | 5425 assert(branch is HIf); |
| 5420 branch.blockInformation = conditionStartBlock.blockFlow; | 5426 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5421 } | 5427 } |
| 5422 } | 5428 } |
| OLD | NEW |