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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart

Issue 2938823002: Starting making dart2js strong mode clean. (Closed)
Patch Set: Address some comments. Created 3 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_emitter/program_builder/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index 4c79ead24c7170e79a900e15a9c5a978f36a6673..b0c45192364d39dd7a544826fd1c1e64a6c99429 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -343,7 +343,7 @@ class ProgramBuilder {
// For every known class, see if it was allocated in the profile. If yes,
// collect its dependencies (supers and mixins) and mark them as
// not-soft-deferrable.
- collector.outputClassLists.forEach((_, List<ClassElement> elements) {
+ collector.outputClassLists.forEach((_, List<ClassEntity> elements) {
for (ClassElement element in elements) {
// TODO(29574): share the encoding of the element with the code
// that emits the profile-run.
@@ -525,7 +525,8 @@ class ProgramBuilder {
if (_nativeData.isJsInteropClass(cls)) {
// TODO(johnniwinther): Handle class entities.
ClassElement e = cls;
- e.declaration.forEachMember((_, MemberElement member) {
+ e.declaration.forEachMember((_, _member) {
+ MemberElement member = _member;
var jsName = _nativeData.computeUnescapedJSInteropName(member.name);
if (!member.isInstanceMember) return;
if (member.isGetter || member.isField || member.isFunction) {
@@ -867,14 +868,16 @@ class ProgramBuilder {
var /* Map | List */ optionalParameterDefaultValues;
if (signature.optionalParametersAreNamed) {
optionalParameterDefaultValues = new Map<String, ConstantValue>();
- signature.forEachOptionalParameter((ParameterElement parameter) {
+ signature.forEachOptionalParameter((_parameter) {
+ ParameterElement parameter = _parameter;
ConstantValue def =
_constantHandler.getConstantValue(parameter.constant);
optionalParameterDefaultValues[parameter.name] = def;
});
} else {
optionalParameterDefaultValues = <ConstantValue>[];
- signature.forEachOptionalParameter((ParameterElement parameter) {
+ signature.forEachOptionalParameter((_parameter) {
+ ParameterElement parameter = _parameter;
ConstantValue def =
_constantHandler.getConstantValue(parameter.constant);
optionalParameterDefaultValues.add(def);
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/collector.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698