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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 21074002: Remove support for missing part-of tag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix extra tests. Created 7 years, 4 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 | sdk/lib/_internal/compiler/implementation/warnings.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) 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * [CompilerTask] for loading libraries and setting up the import/export scopes. 8 * [CompilerTask] for loading libraries and setting up the import/export scopes.
9 * 9 *
10 * The library loader uses four different kinds of URIs in different parts of 10 * The library loader uses four different kinds of URIs in different parts of
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 */ 361 */
362 void scanPart(Part part, Uri resolvedUri, LibraryElement library) { 362 void scanPart(Part part, Uri resolvedUri, LibraryElement library) {
363 if (!resolvedUri.isAbsolute) throw new ArgumentError(resolvedUri); 363 if (!resolvedUri.isAbsolute) throw new ArgumentError(resolvedUri);
364 Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part); 364 Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part);
365 Script sourceScript = compiler.readScript(readableUri, part); 365 Script sourceScript = compiler.readScript(readableUri, part);
366 CompilationUnitElement unit = 366 CompilationUnitElement unit =
367 new CompilationUnitElementX(sourceScript, library); 367 new CompilationUnitElementX(sourceScript, library);
368 compiler.withCurrentElement(unit, () { 368 compiler.withCurrentElement(unit, () {
369 compiler.scanner.scan(unit); 369 compiler.scanner.scan(unit);
370 if (unit.partTag == null) { 370 if (unit.partTag == null) {
371 bool wasDiagnosticEmitted = false; 371 compiler.reportMessage(
ahe 2013/08/06 14:22:06 compiler.reportError(unit, MessageKind.MISSING_PAR
Johnni Winther 2013/08/07 06:00:51 Done.
372 compiler.withCurrentElement(library, () { 372 compiler.spanFromElement(unit),
373 wasDiagnosticEmitted = 373 MessageKind.MISSING_PART_OF_TAG.error(),
374 compiler.onDeprecatedFeature(part, 'missing part-of tag'); 374 api.Diagnostic.ERROR);
375 });
376 if (wasDiagnosticEmitted) {
377 compiler.reportMessage(
378 compiler.spanFromElement(unit),
379 MessageKind.MISSING_PART_OF_TAG.error(),
380 api.Diagnostic.INFO);
381 }
382 } 375 }
383 }); 376 });
384 } 377 }
385 378
386 /** 379 /**
387 * Handle an import/export tag by loading the referenced library and 380 * Handle an import/export tag by loading the referenced library and
388 * registering its dependency in [handler] for the computation of the import/ 381 * registering its dependency in [handler] for the computation of the import/
389 * export scope. 382 * export scope.
390 */ 383 */
391 void registerLibraryFromTag(LibraryDependencyHandler handler, 384 void registerLibraryFromTag(LibraryDependencyHandler handler,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 832 }
840 833
841 /** 834 /**
842 * Registers all top-level entities of [library] as starting point for the 835 * Registers all top-level entities of [library] as starting point for the
843 * fixed-point computation of the import/export scopes. 836 * fixed-point computation of the import/export scopes.
844 */ 837 */
845 void registerLibraryExports(LibraryElement library) { 838 void registerLibraryExports(LibraryElement library) {
846 nodeMap[library].registerInitialExports(); 839 nodeMap[library].registerInitialExports();
847 } 840 }
848 } 841 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698