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

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

Issue 362743002: Report an error from dart2dart when deferred loading is used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 'dart2jslib.dart' show 7 import 'dart2jslib.dart' show
8 Backend, 8 Backend,
9 Compiler, 9 Compiler,
10 CompilerTask, 10 CompilerTask,
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 } 734 }
735 } 735 }
736 }); 736 });
737 } 737 }
738 Backend backend = compiler.backend; 738 Backend backend = compiler.backend;
739 if (splitProgram && backend is JavaScriptBackend) { 739 if (splitProgram && backend is JavaScriptBackend) {
740 backend.registerCheckDeferredIsLoaded(compiler.globalDependencies); 740 backend.registerCheckDeferredIsLoaded(compiler.globalDependencies);
741 } 741 }
742 if (splitProgram && backend is DartBackend) { 742 if (splitProgram && backend is DartBackend) {
743 // TODO(sigurdm): Implement deferred loading for dart2dart. 743 // TODO(sigurdm): Implement deferred loading for dart2dart.
744 splitProgram = false; 744 compiler.reportFatalError(
745 compiler.reportInfo(
746 lastDeferred, 745 lastDeferred,
747 MessageKind.DEFERRED_LIBRARY_DART_2_DART); 746 MessageKind.DEFERRED_LIBRARY_DART_2_DART);
748 } 747 }
749 } 748 }
750 749
751 /// If [send] is a static send with a deferred element, returns the 750 /// If [send] is a static send with a deferred element, returns the
752 /// [PrefixElement] that the first prefix of the send resolves to. 751 /// [PrefixElement] that the first prefix of the send resolves to.
753 /// Otherwise returns null. 752 /// Otherwise returns null.
754 /// 753 ///
755 /// Precondition: send must be static. 754 /// Precondition: send must be static.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 Element maybePrefix = elements[identifier]; 796 Element maybePrefix = elements[identifier];
798 if (maybePrefix != null && maybePrefix.isPrefix) { 797 if (maybePrefix != null && maybePrefix.isPrefix) {
799 PrefixElement prefixElement = maybePrefix; 798 PrefixElement prefixElement = maybePrefix;
800 if (prefixElement.isDeferred) { 799 if (prefixElement.isDeferred) {
801 return prefixElement; 800 return prefixElement;
802 } 801 }
803 } 802 }
804 return null; 803 return null;
805 } 804 }
806 } 805 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698