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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 years, 6 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: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index cc61e440290f295c923d35fa51d3293492aa150e..a27926bb5a042a0104d9269b165be7e479d6d090 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1064,7 +1064,6 @@ class JavaScriptBackend extends Backend {
if (cls == closureClass) {
enqueue(enqueuer, findHelper('closureFromTearOff'), registry);
}
- ClassElement result = null;
if (cls == compiler.stringClass || cls == jsStringClass) {
addInterceptors(jsStringClass, enqueuer, registry);
} else if (cls == compiler.listClass ||
@@ -2022,10 +2021,6 @@ class JavaScriptBackend extends Backend {
}).then((_) {
Uri uri = library.canonicalUri;
- VariableElement findVariable(String name) {
- return find(library, name);
- }
-
FunctionElement findMethod(String name) {
return find(library, name);
}
@@ -2037,29 +2032,25 @@ class JavaScriptBackend extends Backend {
if (uri == DART_INTERCEPTORS) {
getInterceptorMethod = findMethod('getInterceptor');
getNativeInterceptorMethod = findMethod('getNativeInterceptor');
-
- List<ClassElement> classes = [
- jsInterceptorClass = findClass('Interceptor'),
- jsStringClass = findClass('JSString'),
- jsArrayClass = findClass('JSArray'),
- // The int class must be before the double class, because the
- // emitter relies on this list for the order of type checks.
- jsIntClass = findClass('JSInt'),
- jsPositiveIntClass = findClass('JSPositiveInt'),
- jsUInt32Class = findClass('JSUInt32'),
- jsUInt31Class = findClass('JSUInt31'),
- jsDoubleClass = findClass('JSDouble'),
- jsNumberClass = findClass('JSNumber'),
- jsNullClass = findClass('JSNull'),
- jsBoolClass = findClass('JSBool'),
- jsMutableArrayClass = findClass('JSMutableArray'),
- jsFixedArrayClass = findClass('JSFixedArray'),
- jsExtendableArrayClass = findClass('JSExtendableArray'),
- jsUnmodifiableArrayClass = findClass('JSUnmodifiableArray'),
- jsPlainJavaScriptObjectClass = findClass('PlainJavaScriptObject'),
- jsUnknownJavaScriptObjectClass = findClass('UnknownJavaScriptObject'),
- ];
-
+ jsInterceptorClass = findClass('Interceptor');
+ jsStringClass = findClass('JSString');
+ jsArrayClass = findClass('JSArray');
+ // The int class must be before the double class, because the
+ // emitter relies on this list for the order of type checks.
+ jsIntClass = findClass('JSInt');
+ jsPositiveIntClass = findClass('JSPositiveInt');
+ jsUInt32Class = findClass('JSUInt32');
+ jsUInt31Class = findClass('JSUInt31');
+ jsDoubleClass = findClass('JSDouble');
+ jsNumberClass = findClass('JSNumber');
+ jsNullClass = findClass('JSNull');
+ jsBoolClass = findClass('JSBool');
+ jsMutableArrayClass = findClass('JSMutableArray');
+ jsFixedArrayClass = findClass('JSFixedArray');
+ jsExtendableArrayClass = findClass('JSExtendableArray');
+ jsUnmodifiableArrayClass = findClass('JSUnmodifiableArray');
+ jsPlainJavaScriptObjectClass = findClass('PlainJavaScriptObject');
+ jsUnknownJavaScriptObjectClass = findClass('UnknownJavaScriptObject');
jsIndexableClass = findClass('JSIndexable');
jsMutableIndexableClass = findClass('JSMutableIndexable');
} else if (uri == DART_JS_HELPER) {

Powered by Google App Engine
This is Rietveld 408576698