| 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 abstract class OptimizationPhase { | 7 abstract class OptimizationPhase { |
| 8 String get name; | 8 String get name; |
| 9 void visitGraph(HGraph graph); | 9 void visitGraph(HGraph graph); |
| 10 } | 10 } |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 HInstruction receiver = | 1836 HInstruction receiver = |
| 1837 instruction.getDartReceiver(compiler).nonCheck(); | 1837 instruction.getDartReceiver(compiler).nonCheck(); |
| 1838 memorySet.registerFieldValueUpdate( | 1838 memorySet.registerFieldValueUpdate( |
| 1839 instruction.element, receiver, instruction.inputs.last); | 1839 instruction.element, receiver, instruction.inputs.last); |
| 1840 } | 1840 } |
| 1841 | 1841 |
| 1842 void visitForeignNew(HForeignNew instruction) { | 1842 void visitForeignNew(HForeignNew instruction) { |
| 1843 memorySet.registerAllocation(instruction); | 1843 memorySet.registerAllocation(instruction); |
| 1844 int argumentIndex = 0; | 1844 int argumentIndex = 0; |
| 1845 instruction.element.forEachInstanceField((_, Element member) { | 1845 instruction.element.forEachInstanceField((_, Element member) { |
| 1846 if (compiler.elementHasCompileTimeError(member)) return; |
| 1846 memorySet.registerFieldValue( | 1847 memorySet.registerFieldValue( |
| 1847 member, instruction, instruction.inputs[argumentIndex++]); | 1848 member, instruction, instruction.inputs[argumentIndex++]); |
| 1848 }, includeSuperAndInjectedMembers: true); | 1849 }, includeSuperAndInjectedMembers: true); |
| 1849 // In case this instruction has as input non-escaping objects, we | 1850 // In case this instruction has as input non-escaping objects, we |
| 1850 // need to mark these objects as escaping. | 1851 // need to mark these objects as escaping. |
| 1851 memorySet.killAffectedBy(instruction); | 1852 memorySet.killAffectedBy(instruction); |
| 1852 } | 1853 } |
| 1853 | 1854 |
| 1854 void visitInstruction(HInstruction instruction) { | 1855 void visitInstruction(HInstruction instruction) { |
| 1855 memorySet.killAffectedBy(instruction); | 1856 memorySet.killAffectedBy(instruction); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 | 2189 |
| 2189 keyedValues.forEach((receiver, values) { | 2190 keyedValues.forEach((receiver, values) { |
| 2190 result.keyedValues[receiver] = | 2191 result.keyedValues[receiver] = |
| 2191 new Map<HInstruction, HInstruction>.from(values); | 2192 new Map<HInstruction, HInstruction>.from(values); |
| 2192 }); | 2193 }); |
| 2193 | 2194 |
| 2194 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2195 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2195 return result; | 2196 return result; |
| 2196 } | 2197 } |
| 2197 } | 2198 } |
| OLD | NEW |