| 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 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 if (compiler.elementHasCompileTimeError(member)) return; | 1900 if (compiler.elementHasCompileTimeError(member)) return; |
| 1901 memorySet.registerFieldValue( | 1901 memorySet.registerFieldValue( |
| 1902 member, instruction, instruction.inputs[argumentIndex++]); | 1902 member, instruction, instruction.inputs[argumentIndex++]); |
| 1903 }, includeSuperAndInjectedMembers: true); | 1903 }, includeSuperAndInjectedMembers: true); |
| 1904 // In case this instruction has as input non-escaping objects, we | 1904 // In case this instruction has as input non-escaping objects, we |
| 1905 // need to mark these objects as escaping. | 1905 // need to mark these objects as escaping. |
| 1906 memorySet.killAffectedBy(instruction); | 1906 memorySet.killAffectedBy(instruction); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 void visitInstruction(HInstruction instruction) { | 1909 void visitInstruction(HInstruction instruction) { |
| 1910 if (instruction.isAllocation) { |
| 1911 memorySet.registerAllocation(instruction); |
| 1912 } |
| 1910 memorySet.killAffectedBy(instruction); | 1913 memorySet.killAffectedBy(instruction); |
| 1911 } | 1914 } |
| 1912 | 1915 |
| 1913 void visitLazyStatic(HLazyStatic instruction) { | 1916 void visitLazyStatic(HLazyStatic instruction) { |
| 1914 handleStaticLoad(instruction.element, instruction); | 1917 handleStaticLoad(instruction.element, instruction); |
| 1915 } | 1918 } |
| 1916 | 1919 |
| 1917 void handleStaticLoad(Element element, HInstruction instruction) { | 1920 void handleStaticLoad(Element element, HInstruction instruction) { |
| 1918 HInstruction existing = memorySet.lookupFieldValue(element, null); | 1921 HInstruction existing = memorySet.lookupFieldValue(element, null); |
| 1919 if (existing != null) { | 1922 if (existing != null) { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2243 | 2246 |
| 2244 keyedValues.forEach((receiver, values) { | 2247 keyedValues.forEach((receiver, values) { |
| 2245 result.keyedValues[receiver] = | 2248 result.keyedValues[receiver] = |
| 2246 new Map<HInstruction, HInstruction>.from(values); | 2249 new Map<HInstruction, HInstruction>.from(values); |
| 2247 }); | 2250 }); |
| 2248 | 2251 |
| 2249 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2252 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2250 return result; | 2253 return result; |
| 2251 } | 2254 } |
| 2252 } | 2255 } |
| OLD | NEW |