| 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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 } | 1169 } |
| 1170 }); | 1170 }); |
| 1171 | 1171 |
| 1172 // Build the initializers in the context of the new constructor. | 1172 // Build the initializers in the context of the new constructor. |
| 1173 TreeElements oldElements = elements; | 1173 TreeElements oldElements = elements; |
| 1174 elements = | 1174 elements = |
| 1175 compiler.enqueuer.resolution.getCachedElements(constructor); | 1175 compiler.enqueuer.resolution.getCachedElements(constructor); |
| 1176 | 1176 |
| 1177 ClosureClassMap oldClosureData = localsHandler.closureData; | 1177 ClosureClassMap oldClosureData = localsHandler.closureData; |
| 1178 Node node = constructor.parseNode(compiler); | 1178 Node node = constructor.parseNode(compiler); |
| 1179 localsHandler.closureData = | 1179 ClosureClassMap newClosureData = |
| 1180 compiler.closureToClassMapper.computeClosureToClassMapping( | 1180 compiler.closureToClassMapper.computeClosureToClassMapping( |
| 1181 constructor, node, elements); | 1181 constructor, node, elements); |
| 1182 // The [:this:] element now refers to the one in the new closure |
| 1183 // data, that is the [:this:] of the super constructor. We |
| 1184 // update the element to refer to the current [:this:]. |
| 1185 localsHandler.updateLocal(newClosureData.thisElement, |
| 1186 localsHandler.readThis()); |
| 1187 localsHandler.closureData = newClosureData; |
| 1182 | 1188 |
| 1183 params.orderedForEachParameter((Element parameterElement) { | 1189 params.orderedForEachParameter((Element parameterElement) { |
| 1184 if (elements.isParameterChecked(parameterElement)) { | 1190 if (elements.isParameterChecked(parameterElement)) { |
| 1185 addParameterCheckInstruction(parameterElement); | 1191 addParameterCheckInstruction(parameterElement); |
| 1186 } | 1192 } |
| 1187 }); | 1193 }); |
| 1188 localsHandler.enterScope(node, constructor); | 1194 localsHandler.enterScope(node, constructor); |
| 1189 buildInitializers(constructor, constructors, fieldValues); | 1195 buildInitializers(constructor, constructors, fieldValues); |
| 1190 localsHandler.closureData = oldClosureData; | 1196 localsHandler.closureData = oldClosureData; |
| 1191 elements = oldElements; | 1197 elements = oldElements; |
| (...skipping 3803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4995 new HSubGraphBlockInformation(elseBranch.graph)); | 5001 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4996 | 5002 |
| 4997 HBasicBlock conditionStartBlock = conditionBranch.block; | 5003 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4998 conditionStartBlock.setBlockFlow(info, joinBlock); | 5004 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4999 SubGraph conditionGraph = conditionBranch.graph; | 5005 SubGraph conditionGraph = conditionBranch.graph; |
| 5000 HIf branch = conditionGraph.end.last; | 5006 HIf branch = conditionGraph.end.last; |
| 5001 assert(branch is HIf); | 5007 assert(branch is HIf); |
| 5002 branch.blockInformation = conditionStartBlock.blockFlow; | 5008 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5003 } | 5009 } |
| 5004 } | 5010 } |
| OLD | NEW |