| 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 | 10 |
| (...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 } | 1786 } |
| 1787 } | 1787 } |
| 1788 push(backend.emitter.constantReference(constant)); | 1788 push(backend.emitter.constantReference(constant)); |
| 1789 } | 1789 } |
| 1790 | 1790 |
| 1791 visitConstant(HConstant node) { | 1791 visitConstant(HConstant node) { |
| 1792 assert(isGenerateAtUseSite(node)); | 1792 assert(isGenerateAtUseSite(node)); |
| 1793 generateConstant(node.constant); | 1793 generateConstant(node.constant); |
| 1794 | 1794 |
| 1795 backend.registerCompileTimeConstant(node.constant, work.resolutionTree); | 1795 backend.registerCompileTimeConstant(node.constant, work.resolutionTree); |
| 1796 compiler.constantHandler.addCompileTimeConstantForEmission(node.constant); | 1796 backend.constants.addCompileTimeConstantForEmission(node.constant); |
| 1797 } | 1797 } |
| 1798 | 1798 |
| 1799 visitNot(HNot node) { | 1799 visitNot(HNot node) { |
| 1800 assert(node.inputs.length == 1); | 1800 assert(node.inputs.length == 1); |
| 1801 generateNot(node.inputs[0]); | 1801 generateNot(node.inputs[0]); |
| 1802 attachLocationToLast(node); | 1802 attachLocationToLast(node); |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 static String mapRelationalOperator(String op, bool inverse) { | 1805 static String mapRelationalOperator(String op, bool inverse) { |
| 1806 Map<String, String> inverseOperator = const <String, String>{ | 1806 Map<String, String> inverseOperator = const <String, String>{ |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2685 js.PropertyAccess accessHelper(String name) { | 2685 js.PropertyAccess accessHelper(String name) { |
| 2686 Element helper = compiler.findHelper(name); | 2686 Element helper = compiler.findHelper(name); |
| 2687 if (helper == null) { | 2687 if (helper == null) { |
| 2688 // For mocked-up tests. | 2688 // For mocked-up tests. |
| 2689 return js.js('(void 0).$name'); | 2689 return js.js('(void 0).$name'); |
| 2690 } | 2690 } |
| 2691 world.registerStaticUse(helper); | 2691 world.registerStaticUse(helper); |
| 2692 return backend.namer.elementAccess(helper); | 2692 return backend.namer.elementAccess(helper); |
| 2693 } | 2693 } |
| 2694 } | 2694 } |
| OLD | NEW |