| 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 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 if (compiler.elementHasCompileTimeError(member)) return; | 1893 if (compiler.elementHasCompileTimeError(member)) return; |
| 1894 memorySet.registerFieldValue( | 1894 memorySet.registerFieldValue( |
| 1895 member, instruction, instruction.inputs[argumentIndex++]); | 1895 member, instruction, instruction.inputs[argumentIndex++]); |
| 1896 }, includeSuperAndInjectedMembers: true); | 1896 }, includeSuperAndInjectedMembers: true); |
| 1897 // In case this instruction has as input non-escaping objects, we | 1897 // In case this instruction has as input non-escaping objects, we |
| 1898 // need to mark these objects as escaping. | 1898 // need to mark these objects as escaping. |
| 1899 memorySet.killAffectedBy(instruction); | 1899 memorySet.killAffectedBy(instruction); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 void visitInstruction(HInstruction instruction) { | 1902 void visitInstruction(HInstruction instruction) { |
| 1903 if (instruction.isAllocation()) { |
| 1904 memorySet.registerAllocation(instruction); |
| 1905 } |
| 1903 memorySet.killAffectedBy(instruction); | 1906 memorySet.killAffectedBy(instruction); |
| 1904 } | 1907 } |
| 1905 | 1908 |
| 1906 void visitLazyStatic(HLazyStatic instruction) { | 1909 void visitLazyStatic(HLazyStatic instruction) { |
| 1907 handleStaticLoad(instruction.element, instruction); | 1910 handleStaticLoad(instruction.element, instruction); |
| 1908 } | 1911 } |
| 1909 | 1912 |
| 1910 void handleStaticLoad(Element element, HInstruction instruction) { | 1913 void handleStaticLoad(Element element, HInstruction instruction) { |
| 1911 HInstruction existing = memorySet.lookupFieldValue(element, null); | 1914 HInstruction existing = memorySet.lookupFieldValue(element, null); |
| 1912 if (existing != null) { | 1915 if (existing != null) { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 | 2239 |
| 2237 keyedValues.forEach((receiver, values) { | 2240 keyedValues.forEach((receiver, values) { |
| 2238 result.keyedValues[receiver] = | 2241 result.keyedValues[receiver] = |
| 2239 new Map<HInstruction, HInstruction>.from(values); | 2242 new Map<HInstruction, HInstruction>.from(values); |
| 2240 }); | 2243 }); |
| 2241 | 2244 |
| 2242 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2245 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2243 return result; | 2246 return result; |
| 2244 } | 2247 } |
| 2245 } | 2248 } |
| OLD | NEW |