| 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 class SsaCodeGeneratorTask extends CompilerTask { | 7 class SsaCodeGeneratorTask extends CompilerTask { |
| 8 | 8 |
| 9 final JavaScriptBackend backend; | 9 final JavaScriptBackend backend; |
| 10 final SourceInformationStrategy sourceInformationFactory; | 10 final SourceInformationStrategy sourceInformationFactory; |
| (...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1744 ClassElement superClass = superElement.enclosingClass; | 1744 ClassElement superClass = superElement.enclosingClass; |
| 1745 if (superElement.isField) { | 1745 if (superElement.isField) { |
| 1746 js.Name fieldName = | 1746 js.Name fieldName = |
| 1747 backend.namer.instanceFieldPropertyName(superElement); | 1747 backend.namer.instanceFieldPropertyName(superElement); |
| 1748 use(node.inputs[0]); | 1748 use(node.inputs[0]); |
| 1749 js.PropertyAccess access = | 1749 js.PropertyAccess access = |
| 1750 new js.PropertyAccess(pop(), fieldName) | 1750 new js.PropertyAccess(pop(), fieldName) |
| 1751 .withSourceInformation(node.sourceInformation); | 1751 .withSourceInformation(node.sourceInformation); |
| 1752 if (node.isSetter) { | 1752 if (node.isSetter) { |
| 1753 registry.registerStaticUse( | 1753 registry.registerStaticUse( |
| 1754 new StaticUse.superSet(superElement)); | 1754 superElement.isSetter |
| 1755 ? new StaticUse.superSetterSet(superElement) |
| 1756 : new StaticUse.superFieldSet(superElement)); |
| 1755 use(node.value); | 1757 use(node.value); |
| 1756 push(new js.Assignment(access, pop()) | 1758 push(new js.Assignment(access, pop()) |
| 1757 .withSourceInformation(node.sourceInformation)); | 1759 .withSourceInformation(node.sourceInformation)); |
| 1758 } else { | 1760 } else { |
| 1759 registry.registerStaticUse(new StaticUse.superGet(superElement)); | 1761 registry.registerStaticUse(new StaticUse.superGet(superElement)); |
| 1760 push(access); | 1762 push(access); |
| 1761 } | 1763 } |
| 1762 } else { | 1764 } else { |
| 1763 Selector selector = node.selector; | 1765 Selector selector = node.selector; |
| 1764 if (!backend.maybeRegisterAliasedSuperMember(superElement, selector)) { | 1766 if (!backend.maybeRegisterAliasedSuperMember(superElement, selector)) { |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2909 new StaticUse.staticInvoke(helper, | 2911 new StaticUse.staticInvoke(helper, |
| 2910 new CallStructure.unnamed(argumentCount))); | 2912 new CallStructure.unnamed(argumentCount))); |
| 2911 return backend.emitter.staticFunctionAccess(helper); | 2913 return backend.emitter.staticFunctionAccess(helper); |
| 2912 } | 2914 } |
| 2913 | 2915 |
| 2914 @override | 2916 @override |
| 2915 void visitRef(HRef node) { | 2917 void visitRef(HRef node) { |
| 2916 visit(node.value); | 2918 visit(node.value); |
| 2917 } | 2919 } |
| 2918 } | 2920 } |
| OLD | NEW |