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

Side by Side Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 1215513003: Revert "Mark static function getters as used in codegen." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 final SourceInformationFactory sourceInformationFactory; 10 final SourceInformationFactory sourceInformationFactory;
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 } 2129 }
2130 2130
2131 void visitSwitch(HSwitch node) { 2131 void visitSwitch(HSwitch node) {
2132 // Switches are handled using [visitSwitchInfo]. 2132 // Switches are handled using [visitSwitchInfo].
2133 } 2133 }
2134 2134
2135 void visitStatic(HStatic node) { 2135 void visitStatic(HStatic node) {
2136 Element element = node.element; 2136 Element element = node.element;
2137 assert(element.isFunction || element.isField); 2137 assert(element.isFunction || element.isField);
2138 if (element.isFunction) { 2138 if (element.isFunction) {
2139 push(backend.emitter.isolateStaticClosureAccess(element)); 2139 push(backend.emitter.isolateStaticClosureAccess(node.element));
2140 registry.registerGetOfStaticFunction(element);
2141 } else { 2140 } else {
2142 push(backend.emitter.staticFieldAccess(element)); 2141 push(backend.emitter.staticFieldAccess(node.element));
2143 } 2142 }
2144 registry.registerStaticUse(element); 2143 registry.registerStaticUse(element);
2145 } 2144 }
2146 2145
2147 void visitLazyStatic(HLazyStatic node) { 2146 void visitLazyStatic(HLazyStatic node) {
2148 Element element = node.element; 2147 Element element = node.element;
2149 registry.registerStaticUse(element); 2148 registry.registerStaticUse(element);
2150 js.Expression lazyGetter = 2149 js.Expression lazyGetter =
2151 backend.emitter.isolateLazyInitializerAccess(element); 2150 backend.emitter.isolateLazyInitializerAccess(element);
2152 js.Call call = new js.Call(lazyGetter, <js.Expression>[]); 2151 js.Call call = new js.Call(lazyGetter, <js.Expression>[]);
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 js.PropertyAccess accessHelper(String name) { 2739 js.PropertyAccess accessHelper(String name) {
2741 Element helper = backend.findHelper(name); 2740 Element helper = backend.findHelper(name);
2742 if (helper == null) { 2741 if (helper == null) {
2743 // For mocked-up tests. 2742 // For mocked-up tests.
2744 return js.js('(void 0).$name'); 2743 return js.js('(void 0).$name');
2745 } 2744 }
2746 registry.registerStaticUse(helper); 2745 registry.registerStaticUse(helper);
2747 return backend.emitter.staticFunctionAccess(helper); 2746 return backend.emitter.staticFunctionAccess(helper);
2748 } 2747 }
2749 } 2748 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698