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

Unified Diff: pkg/compiler/lib/src/info/info.dart

Issue 1286733002: dart2js: fixes additional warnings from analyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/info/info.dart
diff --git a/pkg/compiler/lib/src/info/info.dart b/pkg/compiler/lib/src/info/info.dart
index 941a9454e262240969d5daf941cd1d2c7384524a..f003d191b787f7a77bfcc2c07e3a009972819cef 100644
--- a/pkg/compiler/lib/src/info/info.dart
+++ b/pkg/compiler/lib/src/info/info.dart
@@ -241,12 +241,11 @@ class _ParseHelper {
}
LibraryInfo parseLibrary(Map json) {
- var result = parseId(json['id'])
- ..name = json['name']
+ LibraryInfo result = parseId(json['id']);
+ result..name = json['name']
..uri = Uri.parse(json['canonicalUri'])
..outputUnit = parseId(json['outputUnit'])
..size = json['size'];
- assert(result is LibraryInfo);
for (var child in json['children'].map(parseId)) {
if (child is FunctionInfo) {
result.topLevelFunctions.add(child);
@@ -263,8 +262,8 @@ class _ParseHelper {
}
ClassInfo parseClass(Map json) {
- var result = parseId(json['id'])
- ..name = json['name']
+ ClassInfo result = parseId(json['id']);
+ result..name = json['name']
..outputUnit = parseId(json['outputUnit'])
..size = json['size']
..isAbstract = json['modifiers']['abstract'] == true;
@@ -281,8 +280,8 @@ class _ParseHelper {
}
FieldInfo parseField(Map json) {
- return parseId(json['id'])
- ..name = json['name']
+ FieldInfo result = parseId(json['id']);
+ return result..name = json['name']
..outputUnit = parseId(json['outputUnit'])
..size = json['size']
..type = json['type']
@@ -291,17 +290,19 @@ class _ParseHelper {
..closures = json['children'].map(parseId).toList();
}
- TypedefInfo parseTypedef(Map json) => parseId(json['id'])
- ..name = json['name']
+ TypedefInfo parseTypedef(Map json) {
+ TypedefInfo result = parseId(json['id']);
+ return result..name = json['name']
..type = json['type']
..size = 0;
+ }
ProgramInfo parseProgram(Map json) =>
new ProgramInfo()..size = json['size'];
FunctionInfo parseFunction(Map json) {
- return parseId(json['id'])
- ..name = json['name']
+ FunctionInfo result = parseId(json['id']);
+ return result..name = json['name']
..outputUnit = parseId(json['outputUnit'])
..size = json['size']
..type = json['type']
@@ -639,10 +640,10 @@ String _kindToString(InfoKind kind) {
}
}
-int _idFromSerializedId(String serialiedId) =>
+int _idFromSerializedId(String serializedId) =>
int.parse(serializedId.substring(serializedId.indexOf('/') + 1));
-String _kindFromSerializedId(String serializedId) =>
+InfoKind _kindFromSerializedId(String serializedId) =>
_kindFromString(serializedId.substring(0, serializedId.indexOf('/')));
InfoKind _kindFromString(String kind) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698