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

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

Issue 2725933006: Reduce use of elements/resolution_types in enqueuer. (Closed)
Patch Set: Updated cf. comment. Created 3 years, 9 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/enqueue.dart » ('j') | 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 library dart2js.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show EventSink, Future; 7 import 'dart:async' show EventSink, Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'closure.dart' as closureMapping show ClosureTask; 10 import 'closure.dart' as closureMapping show ClosureTask;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 } 937 }
938 return element; 938 return element;
939 } 939 }
940 940
941 bool get isMockCompilation => false; 941 bool get isMockCompilation => false;
942 942
943 void reportUnusedCode() { 943 void reportUnusedCode() {
944 void checkLive(member) { 944 void checkLive(member) {
945 if (member.isMalformed) return; 945 if (member.isMalformed) return;
946 if (member.isFunction) { 946 if (member.isFunction) {
947 if (!enqueuer.resolution.hasBeenProcessed(member)) { 947 if (!resolutionWorldBuilder.isMemberUsed(member)) {
948 reporter.reportHintMessage( 948 reporter.reportHintMessage(
949 member, MessageKind.UNUSED_METHOD, {'name': member.name}); 949 member, MessageKind.UNUSED_METHOD, {'name': member.name});
950 } 950 }
951 } else if (member.isClass) { 951 } else if (member.isClass) {
952 if (!member.isResolved) { 952 if (!member.isResolved) {
953 reporter.reportHintMessage( 953 reporter.reportHintMessage(
954 member, MessageKind.UNUSED_CLASS, {'name': member.name}); 954 member, MessageKind.UNUSED_CLASS, {'name': member.name});
955 } else { 955 } else {
956 member.forEachLocalMember(checkLive); 956 member.forEachLocalMember(checkLive);
957 } 957 }
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 if (library != null && library.isSynthesized) { 2037 if (library != null && library.isSynthesized) {
2038 return null; 2038 return null;
2039 } 2039 }
2040 if (library == null && required) { 2040 if (library == null && required) {
2041 throw new SpannableAssertionFailure( 2041 throw new SpannableAssertionFailure(
2042 library, "The library '${uri}' was not found."); 2042 library, "The library '${uri}' was not found.");
2043 } 2043 }
2044 return library; 2044 return library;
2045 } 2045 }
2046 } 2046 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698