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

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

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: 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) 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 int assembleProgram(ClosedWorld closedWorld) { 962 int assembleProgram(ClosedWorld closedWorld) {
963 int programSize = emitter.assembleProgram(namer, closedWorld); 963 int programSize = emitter.assembleProgram(namer, closedWorld);
964 noSuchMethodRegistry.emitDiagnostic(reporter); 964 noSuchMethodRegistry.emitDiagnostic(reporter);
965 int totalMethodCount = generatedCode.length; 965 int totalMethodCount = generatedCode.length;
966 // TODO(johnniwinther): Support `preMirrorsMethodCount` for entities. 966 // TODO(johnniwinther): Support `preMirrorsMethodCount` for entities.
967 if (mirrorsCodegenAnalysis.preMirrorsMethodCount != null && 967 if (mirrorsCodegenAnalysis.preMirrorsMethodCount != null &&
968 totalMethodCount != mirrorsCodegenAnalysis.preMirrorsMethodCount) { 968 totalMethodCount != mirrorsCodegenAnalysis.preMirrorsMethodCount) {
969 int mirrorCount = 969 int mirrorCount =
970 totalMethodCount - mirrorsCodegenAnalysis.preMirrorsMethodCount; 970 totalMethodCount - mirrorsCodegenAnalysis.preMirrorsMethodCount;
971 double percentage = (mirrorCount / totalMethodCount) * 100; 971 double percentage = (mirrorCount / totalMethodCount) * 100;
972 DiagnosticMessage hint = 972 DiagnosticMessage hint = reporter.createMessage(
973 reporter.createMessage(compiler.mainApp, MessageKind.MIRROR_BLOAT, { 973 closedWorld.elementEnvironment.mainLibrary,
974 MessageKind.MIRROR_BLOAT, {
974 'count': mirrorCount, 975 'count': mirrorCount,
975 'total': totalMethodCount, 976 'total': totalMethodCount,
976 'percentage': percentage.round() 977 'percentage': percentage.round()
977 }); 978 });
978 979
979 List<DiagnosticMessage> infos = <DiagnosticMessage>[]; 980 List<DiagnosticMessage> infos = <DiagnosticMessage>[];
980 for (LibraryElement library in compiler.libraryLoader.libraries) { 981 for (LibraryElement library in compiler.libraryLoader.libraries) {
981 if (library.isInternalLibrary) continue; 982 if (library.isInternalLibrary) continue;
982 for (ImportElement import in library.imports) { 983 for (ImportElement import in library.imports) {
983 LibraryElement importedLibrary = import.importedLibrary; 984 LibraryElement importedLibrary = import.importedLibrary;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1394
1394 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1395 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1395 return !selector.isGetter; 1396 return !selector.isGetter;
1396 } 1397 }
1397 1398
1398 /// Returns `true` if [member] is called from a subclass via `super`. 1399 /// Returns `true` if [member] is called from a subclass via `super`.
1399 bool isAliasedSuperMember(MemberEntity member) { 1400 bool isAliasedSuperMember(MemberEntity member) {
1400 return _aliasedSuperMembers.contains(member); 1401 return _aliasedSuperMembers.contains(member);
1401 } 1402 }
1402 } 1403 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dump_info.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