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

Side by Side Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 9212008: Issue 1164: Out of date system libraries + restarted compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 package com.google.dart.compiler; 5 package com.google.dart.compiler;
6 6
7 import com.google.common.collect.Lists; 7 import com.google.common.collect.Lists;
8 import com.google.common.io.CharStreams; 8 import com.google.common.io.CharStreams;
9 import com.google.common.io.Closeables; 9 import com.google.common.io.Closeables;
10 import com.google.common.io.Files; 10 import com.google.common.io.Files;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 final DartSource dartSrc = libSrc.getSourceFor(libNode.getText()); 253 final DartSource dartSrc = libSrc.getSourceFor(libNode.getText());
254 if (dartSrc == null || !dartSrc.exists()) { 254 if (dartSrc == null || !dartSrc.exists()) {
255 // Dart Editor needs to have all missing files reported as compila tion errors. 255 // Dart Editor needs to have all missing files reported as compila tion errors.
256 // In addition, continue allows lib.populateTopLevelNodes() to be called so that the 256 // In addition, continue allows lib.populateTopLevelNodes() to be called so that the
257 // top level elements are populated preventing an NPE later on. 257 // top level elements are populated preventing an NPE later on.
258 reportMissingSource(context, libSrc, libNode); 258 reportMissingSource(context, libSrc, libNode);
259 continue; 259 continue;
260 } 260 }
261 261
262 DartUnit apiUnit = apiLib.getUnit(dartSrc.getName()); 262 DartUnit apiUnit = apiLib.getUnit(dartSrc.getName());
263 if (apiUnit == null || (!libIsDartUri && isSourceOutOfDate(dartSrc, libSrc))) { 263 if (apiUnit == null || (isSourceOutOfDate(dartSrc, libSrc))) {
mmendez 2012/01/13 18:19:55 Nit: could remove the braces.
codefu 2012/01/13 18:33:21 Done.
264 DartUnit unit = parse(dartSrc, lib.getPrefixes()); 264 DartUnit unit = parse(dartSrc, lib.getPrefixes());
265 if (unit != null) { 265 if (unit != null) {
266 if (libNode == selfSourcePath) { 266 if (libNode == selfSourcePath) {
267 lib.setSelfDartUnit(unit); 267 lib.setSelfDartUnit(unit);
268 } 268 }
269 lib.putUnit(unit); 269 lib.putUnit(unit);
270 apiOutOfDate = true; 270 apiOutOfDate = true;
271 } 271 }
272 } else { 272 } else {
273 if (libNode == selfSourcePath) { 273 if (libNode == selfSourcePath) {
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 return unit; 1264 return unit;
1265 } 1265 }
1266 } 1266 }
1267 return null; 1267 return null;
1268 } 1268 }
1269 1269
1270 public static LibraryUnit getCoreLib(LibraryUnit libraryUnit) { 1270 public static LibraryUnit getCoreLib(LibraryUnit libraryUnit) {
1271 return findLibrary(libraryUnit, "corelib.dart", new HashSet<LibraryElement>( )); 1271 return findLibrary(libraryUnit, "corelib.dart", new HashSet<LibraryElement>( ));
1272 } 1272 }
1273 } 1273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698