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

Issue 2995083002: [kernel] Fix bug with redirecting constructors in closure conversion. (Closed)

Created:
3 years, 4 months ago by sjindel
Modified:
3 years, 4 months ago
Reviewers:
Dmitry Stefantsov
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[kernel] Fix bug with redirecting constructors in closure conversion. Previously, the captured variable analysis did not provide sufficient information for the conversion phase regarding variable uses in initalizers: in particular, it did not differentiate the case when a variable is used in an initializer and captured in the body vs. being captured in the body and not used in an initializer. In addition, there were a few bugs stemming from the use of lazy iterables and OR conjunctives with effectful operations. Now, we separate the information about which variables are captured from flags indicating whether variables are used in initializers. The other bugs are fixed in obvious ways. Finally, we reintroduce some code that ensures that redirecting factory constructors listed in "_redirecting#" field (a hack used when writing DILL files) remain with one-expression bodies after closure conversion. Test Plan: Added a test case for the initializers bug, ensured that the patched SDK builds with closure conversion always-on. Reviewers: dmitryas@google.com BUG= R=dmitryas@google.com Committed: https://github.com/dart-lang/sdk/commit/402e6f492df307907b0f72707f60d9edaa1fb735

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -74 lines) Patch
M pkg/kernel/lib/transformations/closure/converter.dart View 15 chunks +52 lines, -21 lines 1 comment Download
M pkg/kernel/lib/transformations/closure/info.dart View 3 chunks +27 lines, -15 lines 0 comments Download
M pkg/kernel/testcases/closures/contexts_in_field_initializers.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect View 1 chunk +15 lines, -0 lines 4 comments Download
M pkg/kernel/testcases/closures/instance_tear_off.dart.expect View 1 chunk +15 lines, -30 lines 0 comments Download
M pkg/kernel/testcases/closures/static_tear_off.dart.expect View 1 chunk +4 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
sjindel
3 years, 4 months ago (2017-08-16 12:49:46 UTC) #2
Dmitry Stefantsov
I have one question about one of the .expect files. https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect File pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect (right): https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect#newcode15 ...
3 years, 4 months ago (2017-08-16 13:15:00 UTC) #3
sjindel
https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect File pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect (right): https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect#newcode15 pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect:15: class B extends core::Object { On 2017/08/16 13:15:00, Dmitry ...
3 years, 4 months ago (2017-08-16 13:28:56 UTC) #4
Dmitry Stefantsov
LGTM with a couple of comments. One small suggestion for the future: it would be ...
3 years, 4 months ago (2017-08-17 12:59:09 UTC) #5
sjindel
https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect File pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect (right): https://codereview.chromium.org/2995083002/diff/1/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect#newcode15 pkg/kernel/testcases/closures/contexts_in_field_initializers.dart.expect:15: class B extends core::Object { On 2017/08/17 12:59:08, Dmitry ...
3 years, 4 months ago (2017-08-17 15:46:04 UTC) #6
sjindel
3 years, 4 months ago (2017-08-17 16:15:51 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
402e6f492df307907b0f72707f60d9edaa1fb735 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698