Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 221873002: Compute frontend/backend specific constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698