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

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

Issue 1131593006: Report malformed URIs in library dependencies (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | pkg/compiler/lib/src/library_loader.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 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 bool isForeign(Element element) => false; 411 bool isForeign(Element element) => false;
412 412
413 /// Processes [element] for resolution and returns the [FunctionElement] that 413 /// Processes [element] for resolution and returns the [FunctionElement] that
414 /// defines the implementation of [element]. 414 /// defines the implementation of [element].
415 FunctionElement resolveExternalFunction(FunctionElement element) => element; 415 FunctionElement resolveExternalFunction(FunctionElement element) => element;
416 416
417 /// Returns `true` if [library] is a backend specific library whose members 417 /// Returns `true` if [library] is a backend specific library whose members
418 /// have special treatment, such as being allowed to extends blacklisted 418 /// have special treatment, such as being allowed to extends blacklisted
419 /// classes or member being eagerly resolved. 419 /// classes or member being eagerly resolved.
420 bool isBackendLibrary(LibraryElement library) { 420 bool isBackendLibrary(LibraryElement library) {
421 // TODO(johnnwinther): Remove this when patching is only done by the 421 // TODO(johnniwinther): Remove this when patching is only done by the
422 // JavaScript backend. 422 // JavaScript backend.
423 Uri canonicalUri = library.canonicalUri; 423 Uri canonicalUri = library.canonicalUri;
424 if (canonicalUri == js_backend.JavaScriptBackend.DART_JS_HELPER || 424 if (canonicalUri == js_backend.JavaScriptBackend.DART_JS_HELPER ||
425 canonicalUri == js_backend.JavaScriptBackend.DART_INTERCEPTORS) { 425 canonicalUri == js_backend.JavaScriptBackend.DART_INTERCEPTORS) {
426 return true; 426 return true;
427 } 427 }
428 return false; 428 return false;
429 } 429 }
430 430
431 void registerStaticUse(Element element, Enqueuer enqueuer) {} 431 void registerStaticUse(Element element, Enqueuer enqueuer) {}
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 647
648 final Stopwatch totalCompileTime = new Stopwatch(); 648 final Stopwatch totalCompileTime = new Stopwatch();
649 int nextFreeClassId = 0; 649 int nextFreeClassId = 0;
650 World world; 650 World world;
651 Types types; 651 Types types;
652 _CompilerCoreTypes _coreTypes; 652 _CompilerCoreTypes _coreTypes;
653 653
654 final CacheStrategy cacheStrategy; 654 final CacheStrategy cacheStrategy;
655 655
656 /** 656 /**
657 * Map from token to the first preceeding comment token. 657 * Map from token to the first preceding comment token.
658 */ 658 */
659 final TokenMap commentMap = new TokenMap(); 659 final TokenMap commentMap = new TokenMap();
660 660
661 /** 661 /**
662 * Records global dependencies, that is, dependencies that don't 662 * Records global dependencies, that is, dependencies that don't
663 * correspond to a particular element. 663 * correspond to a particular element.
664 * 664 *
665 * We should get rid of this and ensure that all dependencies are 665 * We should get rid of this and ensure that all dependencies are
666 * associated with a particular element. 666 * associated with a particular element.
667 */ 667 */
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 // TODO(johnniwinther): Initialize core types in [initializeCoreClasses] and 1046 // TODO(johnniwinther): Initialize core types in [initializeCoreClasses] and
1047 // make its field final. 1047 // make its field final.
1048 _coreTypes = new _CompilerCoreTypes(this); 1048 _coreTypes = new _CompilerCoreTypes(this);
1049 types = new Types(this); 1049 types = new Types(this);
1050 tracer = new Tracer(this, this.outputProvider); 1050 tracer = new Tracer(this, this.outputProvider);
1051 1051
1052 if (verbose) { 1052 if (verbose) {
1053 progress = new Stopwatch()..start(); 1053 progress = new Stopwatch()..start();
1054 } 1054 }
1055 1055
1056 // TODO(johnniwinther): Separate the dependency tracking from the enqueueing 1056 // TODO(johnniwinther): Separate the dependency tracking from the enqueuing
1057 // for global dependencies. 1057 // for global dependencies.
1058 globalDependencies = 1058 globalDependencies =
1059 new CodegenRegistry(this, new TreeElementMapping(null)); 1059 new CodegenRegistry(this, new TreeElementMapping(null));
1060 1060
1061 SourceInformationFactory sourceInformationFactory = 1061 SourceInformationFactory sourceInformationFactory =
1062 const SourceInformationFactory(); 1062 const SourceInformationFactory();
1063 if (generateSourceMap) { 1063 if (generateSourceMap) {
1064 sourceInformationFactory = 1064 sourceInformationFactory =
1065 const bool.fromEnvironment('USE_NEW_SOURCE_INFO', defaultValue: false) 1065 const bool.fromEnvironment('USE_NEW_SOURCE_INFO', defaultValue: false)
1066 ? const PositionSourceInformationFactory() 1066 ? const PositionSourceInformationFactory()
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 return futureClass.computeType(compiler).createInstantiation([elementType]); 2433 return futureClass.computeType(compiler).createInstantiation([elementType]);
2434 } 2434 }
2435 2435
2436 @override 2436 @override
2437 InterfaceType streamType([DartType elementType = const DynamicType()]) { 2437 InterfaceType streamType([DartType elementType = const DynamicType()]) {
2438 return streamClass.computeType(compiler).createInstantiation([elementType]); 2438 return streamClass.computeType(compiler).createInstantiation([elementType]);
2439 } 2439 }
2440 } 2440 }
2441 2441
2442 typedef void InternalErrorFunction(Spannable location, String message); 2442 typedef void InternalErrorFunction(Spannable location, String message);
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698