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

Issue 2939043002: Remove unnecessary contexts in closure conversion (Closed)

Created:
3 years, 6 months ago by Dmitry Stefantsov
Modified:
3 years, 6 months ago
Reviewers:
ahe, karlklose
CC:
reviews_dartlang.org, Kevin Millikin (Google)
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 : Add tests that detect unnecessary contexts #

Patch Set 2 : Don't treat constructor parameters in initializers as captured #

Total comments: 2

Patch Set 3 : Add helper function, add example to the comment #

Total comments: 9

Patch Set 4 : Edit the comment with the explanation of the change #

Patch Set 5 : Merge in latest changes in master (778feb0504) #

Patch Set 6 : Small comment edit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -8 lines) Patch
M pkg/kernel/lib/transformations/closure/converter.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/lib/transformations/closure/info.dart View 1 2 3 4 5 4 chunks +42 lines, -5 lines 0 comments Download
M pkg/kernel/testcases/closures/closure_in_constructor.dart.expect View 1 2 chunks +2 lines, -2 lines 0 comments Download
A pkg/kernel/testcases/closures/contexts_in_field_initializers.dart View 1 chunk +19 lines, -0 lines 0 comments Download
A pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect View 1 1 chunk +17 lines, -0 lines 0 comments Download
A pkg/kernel/testcases/closures/contexts_in_super_initializers.dart View 1 chunk +26 lines, -0 lines 0 comments Download
A pkg/kernel/testcases/closures/contexts_in_super_initializers.dart.expect View 1 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Dmitry Stefantsov
This CL removes some unnecessary contexts that sometimes are introduced by closure conversion. The reason ...
3 years, 6 months ago (2017-06-15 12:44:18 UTC) #2
karlklose
https://codereview.chromium.org/2939043002/diff/20001/pkg/kernel/lib/transformations/closure/info.dart File pkg/kernel/lib/transformations/closure/info.dart (right): https://codereview.chromium.org/2939043002/diff/20001/pkg/kernel/lib/transformations/closure/info.dart#newcode217 pkg/kernel/lib/transformations/closure/info.dart:217: visitFieldInitializer(FieldInitializer node) { Consider adding a helper and move ...
3 years, 6 months ago (2017-06-16 07:54:43 UTC) #3
Dmitry Stefantsov
Thanks for the review, Karl! I implemented the suggested changes. PTAL. https://codereview.chromium.org/2939043002/diff/20001/pkg/kernel/lib/transformations/closure/info.dart File pkg/kernel/lib/transformations/closure/info.dart (right): ...
3 years, 6 months ago (2017-06-16 08:30:00 UTC) #4
Dmitry Stefantsov
https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart File pkg/kernel/lib/transformations/closure/info.dart (right): https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart#newcode114 pkg/kernel/lib/transformations/closure/info.dart:114: // A(int x) /* "x" is visible in initializers ...
3 years, 6 months ago (2017-06-16 08:36:28 UTC) #5
karlklose
LGTM https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart File pkg/kernel/lib/transformations/closure/info.dart (right): https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart#newcode114 pkg/kernel/lib/transformations/closure/info.dart:114: // A(int x) /* "x" is visible in ...
3 years, 6 months ago (2017-06-16 08:43:41 UTC) #6
Dmitry Stefantsov
Thanks for the suggestions, Karl! https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart File pkg/kernel/lib/transformations/closure/info.dart (right): https://codereview.chromium.org/2939043002/diff/40001/pkg/kernel/lib/transformations/closure/info.dart#newcode114 pkg/kernel/lib/transformations/closure/info.dart:114: // A(int x) /* ...
3 years, 6 months ago (2017-06-16 08:55:28 UTC) #7
Dmitry Stefantsov
3 years, 6 months ago (2017-06-16 09:01:19 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
6ebe771a71a485fdeb6bf4f52adf350ace33cb91 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698