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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart

Issue 2935663002: Remove Compiler.commonElements (Closed)
Patch Set: Remove Compiler._commonElements Created 3 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.full_emitter.interceptor_emitter; 5 library dart2js.js_emitter.full_emitter.interceptor_emitter;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
8 import '../../elements/entities.dart'; 8 import '../../elements/entities.dart';
9 import '../../js/js.dart' as jsAst; 9 import '../../js/js.dart' as jsAst;
10 import '../../js/js.dart' show js; 10 import '../../js/js.dart' show js;
(...skipping 11 matching lines...) Expand all
22 void recordMangledNameOfMemberMethod(MemberEntity member, jsAst.Name name) { 22 void recordMangledNameOfMemberMethod(MemberEntity member, jsAst.Name name) {
23 if (closedWorld.interceptorData.isInterceptedMethod(member)) { 23 if (closedWorld.interceptorData.isInterceptedMethod(member)) {
24 interceptorInvocationNames.add(name); 24 interceptorInvocationNames.add(name);
25 } 25 }
26 } 26 }
27 27
28 jsAst.Expression buildGetInterceptorMethod( 28 jsAst.Expression buildGetInterceptorMethod(
29 jsAst.Name key, Set<ClassEntity> classes) { 29 jsAst.Name key, Set<ClassEntity> classes) {
30 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( 30 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
31 compiler.options, 31 compiler.options,
32 compiler.commonElements, 32 closedWorld.commonElements,
33 backend.emitter, 33 backend.emitter,
34 backend.nativeCodegenEnqueuer, 34 backend.nativeCodegenEnqueuer,
35 namer, 35 namer,
36 backend.oneShotInterceptorData, 36 backend.oneShotInterceptorData,
37 backend.customElementsCodegenAnalysis, 37 backend.customElementsCodegenAnalysis,
38 compiler.codegenWorldBuilder, 38 compiler.codegenWorldBuilder,
39 closedWorld); 39 closedWorld);
40 jsAst.Expression function = 40 jsAst.Expression function =
41 stubGenerator.generateGetInterceptorMethod(classes); 41 stubGenerator.generateGetInterceptorMethod(classes);
42 42
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 */ 122 */
123 jsAst.Statement buildTypeToInterceptorMap(Program program) { 123 jsAst.Statement buildTypeToInterceptorMap(Program program) {
124 jsAst.Expression array = program.typeToInterceptorMap; 124 jsAst.Expression array = program.typeToInterceptorMap;
125 if (array == null) return js.comment("Empty type-to-interceptor map."); 125 if (array == null) return js.comment("Empty type-to-interceptor map.");
126 126
127 jsAst.Expression typeToInterceptorMap = emitter 127 jsAst.Expression typeToInterceptorMap = emitter
128 .generateEmbeddedGlobalAccess(embeddedNames.TYPE_TO_INTERCEPTOR_MAP); 128 .generateEmbeddedGlobalAccess(embeddedNames.TYPE_TO_INTERCEPTOR_MAP);
129 return js.statement('# = #', [typeToInterceptorMap, array]); 129 return js.statement('# = #', [typeToInterceptorMap, array]);
130 } 130 }
131 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698