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

Unified Diff: dart/pkg/dart2js_incremental/lib/diff.dart

Issue 659813002: Apply updates to static methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix types. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/dart2js_incremental/lib/diff.dart
diff --git a/dart/pkg/dart2js_incremental/lib/diff.dart b/dart/pkg/dart2js_incremental/lib/diff.dart
index e3fad3afd209bf748bf555ccea6b1603c4239bfb..0cb659bf15ac34d346e450ce5494beef1f843ce4 100644
--- a/dart/pkg/dart2js_incremental/lib/diff.dart
+++ b/dart/pkg/dart2js_incremental/lib/diff.dart
@@ -31,9 +31,16 @@ import 'package:compiler/implementation/scanner/scannerlib.dart' show
class Difference {
final DeclarationSite before;
final DeclarationSite after;
+
+ /// Records the position of first difference between [before] and [after]. If
+ /// either [before] or [after] are null, [token] is null.
Token token;
- Difference(this.before, this.after);
+ Difference(this.before, this.after) {
+ if (before == after) {
+ throw '[before] and [after] are the same.';
+ }
+ }
String toString() {
if (before == null) return 'Added($after)';
@@ -48,8 +55,10 @@ List<Difference> computeDifference(
Map<String, DeclarationSite> beforeMap = <String, DeclarationSite>{};
before.forEachLocalMember((modelx.ElementX element) {
DeclarationSite site = element.declarationSite;
- assert(site != null);
- beforeMap[element.name] = site;
+ assert(site != null || element.isSynthesized);
+ if (!element.isSynthesized) {
+ beforeMap[element.name] = site;
+ }
});
List<Difference> modifications = <Difference>[];
List<Difference> potentiallyChanged = <Difference>[];
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698