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

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

Issue 10919133: Support for new 'export' directive in resolver (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for parsing import/export directives Created 8 years, 3 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/LibraryExport.java » ('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 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.collect.Maps; 8 import com.google.common.collect.Maps;
9 import com.google.common.collect.Sets; 9 import com.google.common.collect.Sets;
10 import com.google.common.collect.Sets.SetView; 10 import com.google.common.collect.Sets.SetView;
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 if (lib == null) { 421 if (lib == null) {
422 return null; 422 return null;
423 } 423 }
424 424
425 libraries.put(libSrc.getUri(), lib); 425 libraries.put(libSrc.getUri(), lib);
426 426
427 // Update dependencies. 427 // Update dependencies.
428 for (LibraryNode libNode : lib.getImportPaths()) { 428 for (LibraryNode libNode : lib.getImportPaths()) {
429 LibrarySource dep = getImportSource(libSrc, libNode); 429 LibrarySource dep = getImportSource(libSrc, libNode);
430 if (dep != null) { 430 if (dep != null) {
431 lib.addImport(updateLibraries(dep), libNode); 431 LibraryUnit importedLib = updateLibraries(dep);
432 lib.addImport(importedLib, libNode);
433 if (libNode.isExported()) {
434 lib.addExport(importedLib, libNode);
435 }
436 }
437 }
438 for (LibraryNode libNode : lib.getExportPaths()) {
439 LibrarySource dep = getImportSource(libSrc, libNode);
440 if (dep != null) {
441 lib.addExport(updateLibraries(dep), libNode);
432 } 442 }
433 } 443 }
434 return lib; 444 return lib;
435 } finally { 445 } finally {
436 Tracer.end(updateEvent); 446 Tracer.end(updateEvent);
437 } 447 }
438 } 448 }
439 449
440 /** 450 /**
441 * @return the {@link LibrarySource} referenced in the "#import" from "libSr c". May be 451 * @return the {@link LibrarySource} referenced in the "#import" from "libSr c". May be
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 return br.readLine(); 1392 return br.readLine();
1383 } finally { 1393 } finally {
1384 br.close(); 1394 br.close();
1385 } 1395 }
1386 } 1396 }
1387 } catch (Throwable e) { 1397 } catch (Throwable e) {
1388 } 1398 }
1389 return null; 1399 return null;
1390 } 1400 }
1391 } 1401 }
OLDNEW
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/LibraryExport.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698