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 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 expression = expression.withSourceInformation(sourceInformation); | 1917 expression = expression.withSourceInformation(sourceInformation); |
1918 } | 1918 } |
1919 push(expression); | 1919 push(expression); |
1920 } | 1920 } |
1921 | 1921 |
1922 visitConstant(HConstant node) { | 1922 visitConstant(HConstant node) { |
1923 assert(isGenerateAtUseSite(node)); | 1923 assert(isGenerateAtUseSite(node)); |
1924 generateConstant(node.constant, node.sourceInformation); | 1924 generateConstant(node.constant, node.sourceInformation); |
1925 | 1925 |
1926 registry.registerCompileTimeConstant(node.constant); | 1926 registry.registerCompileTimeConstant(node.constant); |
1927 backend.constants.addCompileTimeConstantForEmission(node.constant); | |
1928 } | 1927 } |
1929 | 1928 |
1930 visitNot(HNot node) { | 1929 visitNot(HNot node) { |
1931 assert(node.inputs.length == 1); | 1930 assert(node.inputs.length == 1); |
1932 generateNot(node.inputs[0], node.sourceInformation); | 1931 generateNot(node.inputs[0], node.sourceInformation); |
1933 } | 1932 } |
1934 | 1933 |
1935 static String mapRelationalOperator(String op, bool inverse) { | 1934 static String mapRelationalOperator(String op, bool inverse) { |
1936 Map<String, String> inverseOperator = const <String, String>{ | 1935 Map<String, String> inverseOperator = const <String, String>{ |
1937 "==" : "!=", | 1936 "==" : "!=", |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 } | 2863 } |
2865 registry.registerStaticUse(helper); | 2864 registry.registerStaticUse(helper); |
2866 return backend.emitter.staticFunctionAccess(helper); | 2865 return backend.emitter.staticFunctionAccess(helper); |
2867 } | 2866 } |
2868 | 2867 |
2869 @override | 2868 @override |
2870 void visitRef(HRef node) { | 2869 void visitRef(HRef node) { |
2871 visit(node.value); | 2870 visit(node.value); |
2872 } | 2871 } |
2873 } | 2872 } |
OLD | NEW |