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

Side by Side Diff: pkg/compiler/lib/src/library_loader.dart

Issue 1309743006: Move common URIs to common/names.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
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 library dart2js.library_loader; 5 library dart2js.library_loader;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'common/names.dart' show
10 Uris;
9 import 'common/tasks.dart' show 11 import 'common/tasks.dart' show
10 CompilerTask; 12 CompilerTask;
11 import 'compiler.dart' show 13 import 'compiler.dart' show
12 Compiler; 14 Compiler;
13 import 'diagnostics/diagnostic_listener.dart'; 15 import 'diagnostics/diagnostic_listener.dart';
14 import 'diagnostics/invariant.dart' show 16 import 'diagnostics/invariant.dart' show
15 invariant; 17 invariant;
16 import 'diagnostics/messages.dart' show 18 import 'diagnostics/messages.dart' show
17 MessageKind; 19 MessageKind;
18 import 'elements/elements.dart' show 20 import 'elements/elements.dart' show
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 compiler.internalError(tag, "Unhandled library tag."); 406 compiler.internalError(tag, "Unhandled library tag.");
405 } 407 }
406 }); 408 });
407 }).then((_) { 409 }).then((_) {
408 return compiler.onLibraryScanned(library, handler); 410 return compiler.onLibraryScanned(library, handler);
409 }).then((_) { 411 }).then((_) {
410 return compiler.withCurrentElement(library, () { 412 return compiler.withCurrentElement(library, () {
411 checkDuplicatedLibraryName(library); 413 checkDuplicatedLibraryName(library);
412 414
413 // Import dart:core if not already imported. 415 // Import dart:core if not already imported.
414 if (!importsDartCore && library.canonicalUri != Compiler.DART_CORE) { 416 if (!importsDartCore && library.canonicalUri != Uris.dart_core) {
415 return createLibrary(handler, null, Compiler.DART_CORE) 417 return createLibrary(handler, null, Uris.dart_core)
416 .then((LibraryElement coreLibrary) { 418 .then((LibraryElement coreLibrary) {
417 handler.registerDependency(library, null, coreLibrary); 419 handler.registerDependency(library, null, coreLibrary);
418 }); 420 });
419 } 421 }
420 }); 422 });
421 }).then((_) { 423 }).then((_) {
422 return Future.forEach(libraryDependencies.toList(), (tag) { 424 return Future.forEach(libraryDependencies.toList(), (tag) {
423 return compiler.withCurrentElement(library, () { 425 return compiler.withCurrentElement(library, () {
424 return registerLibraryFromTag(handler, library, tag); 426 return registerLibraryFromTag(handler, library, tag);
425 }); 427 });
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1216 }
1215 suffixes.add(const Link<Uri>().prepend(canonicalUri)); 1217 suffixes.add(const Link<Uri>().prepend(canonicalUri));
1216 } 1218 }
1217 suffixChainMap[library] = suffixes; 1219 suffixChainMap[library] = suffixes;
1218 return; 1220 return;
1219 } 1221 }
1220 1222
1221 computeSuffixes(rootLibrary, const Link<Uri>()); 1223 computeSuffixes(rootLibrary, const Link<Uri>());
1222 } 1224 }
1223 } 1225 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698