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

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

Issue 784843002: Move isolateStaticClosureAccess and isolateLazyInitializerAccess from namer to emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.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 10
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 } 2064 }
2065 2065
2066 void visitSwitch(HSwitch node) { 2066 void visitSwitch(HSwitch node) {
2067 // Switches are handled using [visitSwitchInfo]. 2067 // Switches are handled using [visitSwitchInfo].
2068 } 2068 }
2069 2069
2070 void visitStatic(HStatic node) { 2070 void visitStatic(HStatic node) {
2071 Element element = node.element; 2071 Element element = node.element;
2072 assert(element.isFunction || element.isField); 2072 assert(element.isFunction || element.isField);
2073 if (element.isFunction) { 2073 if (element.isFunction) {
2074 push(backend.namer.isolateStaticClosureAccess(node.element)); 2074 push(backend.emitter.isolateStaticClosureAccess(node.element));
2075 } else { 2075 } else {
2076 push(backend.emitter.staticFieldAccess(node.element)); 2076 push(backend.emitter.staticFieldAccess(node.element));
2077 } 2077 }
2078 registry.registerStaticUse(element); 2078 registry.registerStaticUse(element);
2079 } 2079 }
2080 2080
2081 void visitLazyStatic(HLazyStatic node) { 2081 void visitLazyStatic(HLazyStatic node) {
2082 Element element = node.element; 2082 Element element = node.element;
2083 registry.registerStaticUse(element); 2083 registry.registerStaticUse(element);
2084 js.Expression lazyGetter = 2084 js.Expression lazyGetter =
2085 backend.namer.isolateLazyInitializerAccess(element); 2085 backend.emitter.isolateLazyInitializerAccess(element);
2086 js.Call call = new js.Call(lazyGetter, <js.Expression>[]); 2086 js.Call call = new js.Call(lazyGetter, <js.Expression>[]);
2087 push(call, node); 2087 push(call, node);
2088 } 2088 }
2089 2089
2090 void visitStaticStore(HStaticStore node) { 2090 void visitStaticStore(HStaticStore node) {
2091 registry.registerStaticUse(node.element); 2091 registry.registerStaticUse(node.element);
2092 js.Node variable = backend.emitter.staticFieldAccess(node.element); 2092 js.Node variable = backend.emitter.staticFieldAccess(node.element);
2093 use(node.inputs[0]); 2093 use(node.inputs[0]);
2094 push(new js.Assignment(variable, pop()), node); 2094 push(new js.Assignment(variable, pop()), node);
2095 } 2095 }
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 js.PropertyAccess accessHelper(String name) { 2651 js.PropertyAccess accessHelper(String name) {
2652 Element helper = backend.findHelper(name); 2652 Element helper = backend.findHelper(name);
2653 if (helper == null) { 2653 if (helper == null) {
2654 // For mocked-up tests. 2654 // For mocked-up tests.
2655 return js.js('(void 0).$name'); 2655 return js.js('(void 0).$name');
2656 } 2656 }
2657 registry.registerStaticUse(helper); 2657 registry.registerStaticUse(helper);
2658 return backend.emitter.staticFunctionAccess(helper); 2658 return backend.emitter.staticFunctionAccess(helper);
2659 } 2659 }
2660 } 2660 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698