| 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 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 } | 1770 } |
| 1771 } | 1771 } |
| 1772 push(backend.emitter.constantReference(constant)); | 1772 push(backend.emitter.constantReference(constant)); |
| 1773 } | 1773 } |
| 1774 | 1774 |
| 1775 visitConstant(HConstant node) { | 1775 visitConstant(HConstant node) { |
| 1776 assert(isGenerateAtUseSite(node)); | 1776 assert(isGenerateAtUseSite(node)); |
| 1777 generateConstant(node.constant); | 1777 generateConstant(node.constant); |
| 1778 | 1778 |
| 1779 backend.registerCompileTimeConstant(node.constant, work.resolutionTree); | 1779 backend.registerCompileTimeConstant(node.constant, work.resolutionTree); |
| 1780 compiler.constantHandler.addCompileTimeConstantForEmission(node.constant); | 1780 backend.constants.addCompileTimeConstantForEmission(node.constant); |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 visitNot(HNot node) { | 1783 visitNot(HNot node) { |
| 1784 assert(node.inputs.length == 1); | 1784 assert(node.inputs.length == 1); |
| 1785 generateNot(node.inputs[0]); | 1785 generateNot(node.inputs[0]); |
| 1786 attachLocationToLast(node); | 1786 attachLocationToLast(node); |
| 1787 } | 1787 } |
| 1788 | 1788 |
| 1789 static String mapRelationalOperator(String op, bool inverse) { | 1789 static String mapRelationalOperator(String op, bool inverse) { |
| 1790 Map<String, String> inverseOperator = const <String, String>{ | 1790 Map<String, String> inverseOperator = const <String, String>{ |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2669 js.PropertyAccess accessHelper(String name) { | 2669 js.PropertyAccess accessHelper(String name) { |
| 2670 Element helper = compiler.findHelper(name); | 2670 Element helper = compiler.findHelper(name); |
| 2671 if (helper == null) { | 2671 if (helper == null) { |
| 2672 // For mocked-up tests. | 2672 // For mocked-up tests. |
| 2673 return js.js('(void 0).$name'); | 2673 return js.js('(void 0).$name'); |
| 2674 } | 2674 } |
| 2675 world.registerStaticUse(helper); | 2675 world.registerStaticUse(helper); |
| 2676 return backend.namer.elementAccess(helper); | 2676 return backend.namer.elementAccess(helper); |
| 2677 } | 2677 } |
| 2678 } | 2678 } |
| OLD | NEW |