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

Side by Side Diff: dart/pkg/dart2js_incremental/lib/library_updater.dart

Issue 713263003: Add test for removing static method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_incremental.library_updater; 5 library dart2js_incremental.library_updater;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return canReuseRemovedFunction(element); 226 return canReuseRemovedFunction(element);
227 } 227 }
228 return cannotReuse( 228 return cannotReuse(
229 element, "Removed element that isn't a method."); 229 element, "Removed element that isn't a method.");
230 } 230 }
231 231
232 bool canReuseRemovedFunction(PartialFunctionElement element) { 232 bool canReuseRemovedFunction(PartialFunctionElement element) {
233 logVerbose("Removed method $element."); 233 logVerbose("Removed method $element.");
234 234
235 PartialClassElement cls = element.enclosingClass; 235 PartialClassElement cls = element.enclosingClass;
236 if (cls != null && !element.isInstanceMember) {
237 return cannotReuse(element, "Removed static method");
238 }
239 for (ScopeContainerElement scope in scopesAffectedBy(element, cls)) { 236 for (ScopeContainerElement scope in scopesAffectedBy(element, cls)) {
240 scanSites(scope, (Element member, DeclarationSite site) { 237 scanSites(scope, (Element member, DeclarationSite site) {
241 // TODO(ahe): Cache qualifiedNamesIn to avoid quadratic behavior. 238 // TODO(ahe): Cache qualifiedNamesIn to avoid quadratic behavior.
242 Map<String, List<String>> names = qualifiedNamesIn(site); 239 Map<String, List<String>> names = qualifiedNamesIn(site);
243 if (canNamesResolveTo(names, element, cls)) { 240 if (canNamesResolveTo(names, element, cls)) {
244 _elementsToInvalidate.add(member); 241 _elementsToInvalidate.add(member);
245 } 242 }
246 }); 243 });
247 } 244 }
248 245
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 679
683 abstract class JsFeatures { 680 abstract class JsFeatures {
684 Compiler get compiler; 681 Compiler get compiler;
685 682
686 JavaScriptBackend get backend => compiler.backend; 683 JavaScriptBackend get backend => compiler.backend;
687 684
688 Namer get namer => backend.namer; 685 Namer get namer => backend.namer;
689 686
690 CodeEmitterTask get emitter => backend.emitter; 687 CodeEmitterTask get emitter => backend.emitter;
691 } 688 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698