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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart

Issue 2647613004: Use entities in code_emitter_task (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.js_emitter.lazy_emitter; 5 library dart2js.js_emitter.lazy_emitter;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin; 7 import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
8 8
9 import '../../common.dart'; 9 import '../../common.dart';
10 import '../../compiler.dart' show Compiler; 10 import '../../compiler.dart' show Compiler;
11 import '../../constants/values.dart' show ConstantValue; 11 import '../../constants/values.dart' show ConstantValue;
12 import '../../elements/elements.dart' 12 import '../../elements/elements.dart'
13 show ClassElement, Element, FieldElement, FunctionElement; 13 show ClassElement, Element, FieldElement, MethodElement;
14 import '../../js/js.dart' as js; 14 import '../../js/js.dart' as js;
15 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer; 15 import '../../js_backend/js_backend.dart' show JavaScriptBackend, Namer;
16 import '../../world.dart' show ClosedWorld; 16 import '../../world.dart' show ClosedWorld;
17 import '../js_emitter.dart' show CodeEmitterTask, NativeEmitter; 17 import '../js_emitter.dart' show CodeEmitterTask, NativeEmitter;
18 import '../js_emitter.dart' as emitterTask show Emitter, EmitterFactory; 18 import '../js_emitter.dart' as emitterTask show Emitter, EmitterFactory;
19 import '../model.dart'; 19 import '../model.dart';
20 import '../program_builder/program_builder.dart' show ProgramBuilder; 20 import '../program_builder/program_builder.dart' show ProgramBuilder;
21 import 'model_emitter.dart'; 21 import 'model_emitter.dart';
22 22
23 class EmitterFactory implements emitterTask.EmitterFactory { 23 class EmitterFactory implements emitterTask.EmitterFactory {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return pa; 89 return pa;
90 } 90 }
91 91
92 @override 92 @override
93 js.Expression isolateLazyInitializerAccess(FieldElement element) { 93 js.Expression isolateLazyInitializerAccess(FieldElement element) {
94 return js.js('#.#', 94 return js.js('#.#',
95 [namer.globalObjectFor(element), namer.lazyInitializerName(element)]); 95 [namer.globalObjectFor(element), namer.lazyInitializerName(element)]);
96 } 96 }
97 97
98 @override 98 @override
99 js.Expression isolateStaticClosureAccess(FunctionElement element) { 99 js.Expression isolateStaticClosureAccess(MethodElement element) {
100 return _emitter.generateStaticClosureAccess(element); 100 return _emitter.generateStaticClosureAccess(element);
101 } 101 }
102 102
103 @override 103 @override
104 js.PropertyAccess staticFieldAccess(FieldElement element) { 104 js.PropertyAccess staticFieldAccess(FieldElement element) {
105 return _globalPropertyAccess(element); 105 return _globalPropertyAccess(element);
106 } 106 }
107 107
108 @override 108 @override
109 js.PropertyAccess staticFunctionAccess(FunctionElement element) { 109 js.PropertyAccess staticFunctionAccess(MethodElement element) {
110 return _globalPropertyAccess(element); 110 return _globalPropertyAccess(element);
111 } 111 }
112 112
113 @override 113 @override
114 js.PropertyAccess constructorAccess(ClassElement element) { 114 js.PropertyAccess constructorAccess(ClassElement element) {
115 return _globalPropertyAccess(element); 115 return _globalPropertyAccess(element);
116 } 116 }
117 117
118 @override 118 @override
119 js.PropertyAccess prototypeAccess( 119 js.PropertyAccess prototypeAccess(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 default: 183 default:
184 reporter.internalError( 184 reporter.internalError(
185 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin"); 185 NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
186 return null; 186 return null;
187 } 187 }
188 } 188 }
189 189
190 @override 190 @override
191 void invalidateCaches() {} 191 void invalidateCaches() {}
192 } 192 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698