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

Issue 2956153002: Fix order of visitChildren in Constructors. (Closed)

Created:
3 years, 5 months ago by Emily Fortuna
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M pkg/kernel/lib/ast.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Emily Fortuna
It's very possible I'm missing something, but this seems like an ordering error. I believe ...
3 years, 5 months ago (2017-06-27 22:59:48 UTC) #2
ahe
lgtm I think the reason why nobody has noticed this, is that they might not ...
3 years, 5 months ago (2017-06-28 07:31:57 UTC) #3
Kevin Millikin (Google)
LGTM if you change transformChildren as well. It's OK to change it, but we don't ...
3 years, 5 months ago (2017-06-28 08:41:55 UTC) #4
Emily Fortuna
Committed patchset #2 (id:20001) manually as 4250923832db68504cdafaebbb6128e0ec8fffd8 (presubmit successful).
3 years, 5 months ago (2017-06-29 01:12:51 UTC) #6
Dmitry Stefantsov
3 years, 5 months ago (2017-06-29 14:37:48 UTC) #7
Message was sent while issue was closed.
Hi Emily, Peter, and Kevin,

I found a place that relies on the order of visiting children of constructors. 
It's the information gathering pass of closure conversion.  Apparently, it
wanted to visit declarations of constructor parameters (that are children of the
function associated with the constructor) before it encounters usages of these
variables in initializers.  So, it may be the reason behind the original
visiting order: to visit variable declarations before they are used.

As Kevin wrote, the code should define the visiting order explicitly if it needs
one.  So, I'll update this pass of closure conversion accordingly.

But thanks for this finding!  Without this change it was hard to see that the
code had an implicit requirement.

Powered by Google App Engine
This is Rietveld 408576698