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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2972523002: Implement JsKernelToElementMap through KernelToElementMapBase (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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) 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 library js_backend.backend; 5 library js_backend.backend;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' 8 import '../common/backend_api.dart'
9 show ForeignResolver, NativeRegistry, ImpactTransformer; 9 show ForeignResolver, NativeRegistry, ImpactTransformer;
10 import '../common/codegen.dart' show CodegenWorkItem; 10 import '../common/codegen.dart' show CodegenWorkItem;
(...skipping 18 matching lines...) Expand all
29 Enqueuer, 29 Enqueuer,
30 EnqueueTask, 30 EnqueueTask,
31 ResolutionEnqueuer, 31 ResolutionEnqueuer,
32 TreeShakingEnqueuerStrategy; 32 TreeShakingEnqueuerStrategy;
33 import '../frontend_strategy.dart'; 33 import '../frontend_strategy.dart';
34 import '../io/source_information.dart' show SourceInformationStrategy; 34 import '../io/source_information.dart' show SourceInformationStrategy;
35 import '../js/js.dart' as jsAst; 35 import '../js/js.dart' as jsAst;
36 import '../js/js.dart' show js; 36 import '../js/js.dart' show js;
37 import '../js/rewrite_async.dart'; 37 import '../js/rewrite_async.dart';
38 import '../js_emitter/js_emitter.dart' show CodeEmitterTask; 38 import '../js_emitter/js_emitter.dart' show CodeEmitterTask;
39 import '../js_emitter/sorter.dart' show Sorter;
39 import '../kernel/task.dart'; 40 import '../kernel/task.dart';
40 import '../library_loader.dart' show LoadedLibraries; 41 import '../library_loader.dart' show LoadedLibraries;
41 import '../native/native.dart' as native; 42 import '../native/native.dart' as native;
42 import '../native/resolver.dart'; 43 import '../native/resolver.dart';
43 import '../ssa/ssa.dart' show SsaFunctionCompiler; 44 import '../ssa/ssa.dart' show SsaFunctionCompiler;
44 import '../tracer.dart'; 45 import '../tracer.dart';
45 import '../tree/tree.dart'; 46 import '../tree/tree.dart';
46 import '../types/types.dart'; 47 import '../types/types.dart';
47 import '../universe/call_structure.dart' show CallStructure; 48 import '../universe/call_structure.dart' show CallStructure;
48 import '../universe/selector.dart' show Selector; 49 import '../universe/selector.dart' show Selector;
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 1058
1058 specialOperatorEqClasses 1059 specialOperatorEqClasses
1059 ..add(commonElements.objectClass) 1060 ..add(commonElements.objectClass)
1060 ..add(commonElements.jsInterceptorClass) 1061 ..add(commonElements.jsInterceptorClass)
1061 ..add(commonElements.jsNullClass); 1062 ..add(commonElements.jsNullClass);
1062 } 1063 }
1063 } 1064 }
1064 1065
1065 /// Called when the compiler starts running the codegen enqueuer. The 1066 /// Called when the compiler starts running the codegen enqueuer. The
1066 /// [WorldImpact] of enabled backend features is returned. 1067 /// [WorldImpact] of enabled backend features is returned.
1067 WorldImpact onCodegenStart( 1068 WorldImpact onCodegenStart(ClosedWorld closedWorld,
1068 ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder) { 1069 CodegenWorldBuilder codegenWorldBuilder, Sorter sorter) {
1069 functionCompiler.onCodegenStart(); 1070 functionCompiler.onCodegenStart();
1070 _oneShotInterceptorData = new OneShotInterceptorData( 1071 _oneShotInterceptorData = new OneShotInterceptorData(
1071 closedWorld.interceptorData, closedWorld.commonElements); 1072 closedWorld.interceptorData, closedWorld.commonElements);
1072 _namer = determineNamer(closedWorld, codegenWorldBuilder); 1073 _namer = determineNamer(closedWorld, codegenWorldBuilder);
1073 tracer = new Tracer(closedWorld, namer, compiler); 1074 tracer = new Tracer(closedWorld, namer, compiler);
1074 _rtiEncoder = _namer.rtiEncoder = new RuntimeTypesEncoderImpl( 1075 _rtiEncoder = _namer.rtiEncoder = new RuntimeTypesEncoderImpl(
1075 namer, closedWorld.elementEnvironment, closedWorld.commonElements); 1076 namer, closedWorld.elementEnvironment, closedWorld.commonElements);
1076 emitter.createEmitter(namer, closedWorld, codegenWorldBuilder); 1077 emitter.createEmitter(namer, closedWorld, codegenWorldBuilder, sorter);
1077 _codegenImpactTransformer = new CodegenImpactTransformer( 1078 _codegenImpactTransformer = new CodegenImpactTransformer(
1078 compiler.options, 1079 compiler.options,
1079 closedWorld.elementEnvironment, 1080 closedWorld.elementEnvironment,
1080 closedWorld.commonElements, 1081 closedWorld.commonElements,
1081 impacts, 1082 impacts,
1082 checkedModeHelpers, 1083 checkedModeHelpers,
1083 closedWorld.nativeData, 1084 closedWorld.nativeData,
1084 closedWorld.backendUsage, 1085 closedWorld.backendUsage,
1085 rtiNeed, 1086 rtiNeed,
1086 nativeCodegenEnqueuer, 1087 nativeCodegenEnqueuer,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 1400
1400 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1401 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1401 return !selector.isGetter; 1402 return !selector.isGetter;
1402 } 1403 }
1403 1404
1404 /// Returns `true` if [member] is called from a subclass via `super`. 1405 /// Returns `true` if [member] is called from a subclass via `super`.
1405 bool isAliasedSuperMember(MemberEntity member) { 1406 bool isAliasedSuperMember(MemberEntity member) {
1406 return _aliasedSuperMembers.contains(member); 1407 return _aliasedSuperMembers.contains(member);
1407 } 1408 }
1408 } 1409 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_emitter/code_emitter_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698