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

Side by Side Diff: tests/compiler/dart2js/analyze_unused_dart2js_test.dart

Issue 1385183002: Revert "Avoid eager enqueueing from resolution" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/memory_compiler.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) 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 analyze_unused_dart2js; 5 library analyze_unused_dart2js;
6 6
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 8
9 import 'package:compiler/src/compiler.dart'; 9 import 'package:compiler/src/compiler.dart';
10 import 'package:compiler/src/diagnostics/messages.dart'; 10 import 'package:compiler/src/diagnostics/messages.dart';
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const {}, // WHITE_LIST 78 const {}, // WHITE_LIST
79 analyzeAll: false, 79 analyzeAll: false,
80 checkResults: checkResults)); 80 checkResults: checkResults));
81 } 81 }
82 82
83 bool checkResults(Compiler compiler, CollectingDiagnosticHandler handler) { 83 bool checkResults(Compiler compiler, CollectingDiagnosticHandler handler) {
84 var helperUri = currentDirectory.resolve( 84 var helperUri = currentDirectory.resolve(
85 'pkg/compiler/lib/src/helpers/helpers.dart'); 85 'pkg/compiler/lib/src/helpers/helpers.dart');
86 void checkLive(member) { 86 void checkLive(member) {
87 if (member.isFunction) { 87 if (member.isFunction) {
88 if (compiler.enqueuer.resolution.hasBeenProcessed(member)) { 88 if (compiler.enqueuer.resolution.hasBeenResolved(member)) {
89 compiler.reporter.reportHintMessage( 89 compiler.reporter.reportHintMessage(
90 member, MessageKind.GENERIC, 90 member, MessageKind.GENERIC,
91 {'text': "Helper function in production code '$member'."}); 91 {'text': "Helper function in production code '$member'."});
92 } 92 }
93 } else if (member.isClass) { 93 } else if (member.isClass) {
94 if (member.isResolved) { 94 if (member.isResolved) {
95 compiler.reporter.reportHintMessage( 95 compiler.reporter.reportHintMessage(
96 member, MessageKind.GENERIC, 96 member, MessageKind.GENERIC,
97 {'text': "Helper class in production code '$member'."}); 97 {'text': "Helper class in production code '$member'."});
98 } else { 98 } else {
99 member.forEachLocalMember(checkLive); 99 member.forEachLocalMember(checkLive);
100 } 100 }
101 } else if (member.isTypedef) { 101 } else if (member.isTypedef) {
102 if (member.isResolved) { 102 if (member.isResolved) {
103 compiler.reporter.reportHintMessage( 103 compiler.reporter.reportHintMessage(
104 member, MessageKind.GENERIC, 104 member, MessageKind.GENERIC,
105 {'text': "Helper typedef in production code '$member'."}); 105 {'text': "Helper typedef in production code '$member'."});
106 } 106 }
107 } 107 }
108 } 108 }
109 compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive); 109 compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive);
110 return handler.checkResults(); 110 return handler.checkResults();
111 } 111 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698