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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Address comments and fix duplicated library names. Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future;
8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 7 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 8
11 import '../common.dart'; 9 import '../common.dart';
12 import '../common/backend_api.dart' 10 import '../common/backend_api.dart'
13 show BackendClasses, ForeignResolver, NativeRegistry, ImpactTransformer; 11 show BackendClasses, ForeignResolver, NativeRegistry, ImpactTransformer;
14 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; 12 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem;
15 import '../common/names.dart' show Uris; 13 import '../common/names.dart' show Uris;
16 import '../common/resolution.dart' 14 import '../common/resolution.dart'
17 show Frontend, Resolution, ResolutionImpact, Target; 15 show Frontend, Resolution, ResolutionImpact, Target;
18 import '../common/tasks.dart' show CompilerTask; 16 import '../common/tasks.dart' show CompilerTask;
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 var kind = element.kind; 977 var kind = element.kind;
980 if (kind == ElementKind.TYPEDEF) { 978 if (kind == ElementKind.TYPEDEF) {
981 return const WorldImpact(); 979 return const WorldImpact();
982 } 980 }
983 if (element.isConstructor && 981 if (element.isConstructor &&
984 element.enclosingClass == helpers.jsNullClass) { 982 element.enclosingClass == helpers.jsNullClass) {
985 // Work around a problem compiling JSNull's constructor. 983 // Work around a problem compiling JSNull's constructor.
986 return const CodegenImpact(); 984 return const CodegenImpact();
987 } 985 }
988 if (kind.category == ElementCategory.VARIABLE) { 986 if (kind.category == ElementCategory.VARIABLE) {
987 // ignore: INVALID_ASSIGNMENT
989 VariableElement variableElement = element; 988 VariableElement variableElement = element;
990 ConstantExpression constant = variableElement.constant; 989 ConstantExpression constant = variableElement.constant;
991 if (constant != null) { 990 if (constant != null) {
992 ConstantValue initialValue = constants.getConstantValue(constant); 991 ConstantValue initialValue = constants.getConstantValue(constant);
993 if (initialValue != null) { 992 if (initialValue != null) {
994 work.registry.worldImpact 993 work.registry.worldImpact
995 .registerConstantUse(new ConstantUse.init(initialValue)); 994 .registerConstantUse(new ConstantUse.init(initialValue));
996 // We don't need to generate code for static or top-level 995 // We don't need to generate code for static or top-level
997 // variables. For instance variables, we may need to generate 996 // variables. For instance variables, we may need to generate
998 // the checked setter. 997 // the checked setter.
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 1607
1609 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { 1608 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) {
1610 return !selector.isGetter; 1609 return !selector.isGetter;
1611 } 1610 }
1612 1611
1613 /// Returns `true` if [member] is called from a subclass via `super`. 1612 /// Returns `true` if [member] is called from a subclass via `super`.
1614 bool isAliasedSuperMember(MemberEntity member) { 1613 bool isAliasedSuperMember(MemberEntity member) {
1615 return _aliasedSuperMembers.contains(member); 1614 return _aliasedSuperMembers.contains(member);
1616 } 1615 }
1617 } 1616 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/io/position_information.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698