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

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

Issue 791263003: Remove Compiler.reportFatalError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restore code I accidentally removed. Created 5 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 deferred_load; 5 library deferred_load;
6 6
7 import 'constants/expressions.dart'; 7 import 'constants/expressions.dart';
8 import 'constants/values.dart' show 8 import 'constants/values.dart' show
9 ConstantValue, 9 ConstantValue,
10 ConstructedConstantValue, 10 ConstructedConstantValue,
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 Import import = tag; 652 Import import = tag;
653 653
654 /// Give an error if the old annotation-based syntax has been used. 654 /// Give an error if the old annotation-based syntax has been used.
655 Link<MetadataAnnotation> metadataList = import.metadata; 655 Link<MetadataAnnotation> metadataList = import.metadata;
656 if (metadataList != null) { 656 if (metadataList != null) {
657 for (MetadataAnnotation metadata in metadataList) { 657 for (MetadataAnnotation metadata in metadataList) {
658 metadata.ensureResolved(compiler); 658 metadata.ensureResolved(compiler);
659 Element element = 659 Element element =
660 metadata.constant.value.getType(compiler.coreTypes).element; 660 metadata.constant.value.getType(compiler.coreTypes).element;
661 if (element == deferredLibraryClass) { 661 if (element == deferredLibraryClass) {
662 compiler.reportFatalError( 662 compiler.reportError(
663 import, MessageKind.DEFERRED_OLD_SYNTAX); 663 import, MessageKind.DEFERRED_OLD_SYNTAX);
664 } 664 }
665 } 665 }
666 } 666 }
667 667
668 String prefix = (import.prefix != null) 668 String prefix = (import.prefix != null)
669 ? import.prefix.toString() 669 ? import.prefix.toString()
670 : null; 670 : null;
671 // The last import we saw with the same prefix. 671 // The last import we saw with the same prefix.
672 Import previousDeferredImport = prefixDeferredImport[prefix]; 672 Import previousDeferredImport = prefixDeferredImport[prefix];
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 Element maybePrefix = elements[identifier]; 758 Element maybePrefix = elements[identifier];
759 if (maybePrefix != null && maybePrefix.isPrefix) { 759 if (maybePrefix != null && maybePrefix.isPrefix) {
760 PrefixElement prefixElement = maybePrefix; 760 PrefixElement prefixElement = maybePrefix;
761 if (prefixElement.isDeferred) { 761 if (prefixElement.isDeferred) {
762 return prefixElement; 762 return prefixElement;
763 } 763 }
764 } 764 }
765 return null; 765 return null;
766 } 766 }
767 } 767 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/compiler.dart ('k') | dart/pkg/compiler/lib/src/diagnostic_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698