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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart

Issue 12294028: Fix warnings spotted by dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart b/dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart
index 75bb26705a13e34da7415d9bf15b80b827913ae9..c623bd824bb34c53c0a0b03c53419d2257f93bdf 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/deferred_load.dart
@@ -10,7 +10,9 @@ import 'dart2jslib.dart'
show Compiler,
CompilerTask,
ConstructedConstant,
- SourceString;
+ MessageKind,
+ SourceString,
+ StringConstant;
import 'elements/elements.dart'
show ClassElement,
@@ -47,7 +49,7 @@ class DeferredLoadTask extends CompilerTask {
compiler.libraryLoader.loadLibrary(uri, null, uri);
var element = asyncLibrary.find(const SourceString('DeferredLibrary'));
if (element == null) {
- internalErrorOnElement(
+ compiler.internalErrorOnElement(
asyncLibrary,
'dart:async library does not contain required class: '
'DeferredLibrary');
@@ -73,7 +75,7 @@ class DeferredLoadTask extends CompilerTask {
});
}
- Link<Element> findDeferredLibraries(LibraryElement library) {
+ Link<LibraryElement> findDeferredLibraries(LibraryElement library) {
Link<LibraryElement> link = const Link<LibraryElement>();
for (LibraryTag tag in library.tags) {
Link<MetadataAnnotation> metadata = tag.metadata;
@@ -83,7 +85,8 @@ class DeferredLoadTask extends CompilerTask {
Element element = metadata.value.computeType(compiler).element;
if (element == deferredLibraryClass) {
ConstructedConstant value = metadata.value;
- SourceString expectedName = value.fields[0].toDartString().source;
+ StringConstant nameField = value.fields[0];
+ SourceString expectedName = nameField.toDartString().source;
LibraryElement deferredLibrary = library.getLibraryFromTag(tag);
link = link.prepend(deferredLibrary);
SourceString actualName =

Powered by Google App Engine
This is Rietveld 408576698