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

Issue 18181009: Make closures in constructor initializers read type variables directly. (Closed)

Created:
7 years, 5 months ago by karlklose
Modified:
7 years, 5 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make closures in constructor initializers read type variables directly. BUG=dartbug.com/11540 R=johnniwinther@google.com Committed: https://code.google.com/p/dart/source/detail?r=24674

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : Always use direct local in constructors. #

Patch Set 4 : Add VM crash and modify test. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -13 lines) Patch
M sdk/lib/_internal/compiler/implementation/closure.dart View 1 2 3 4 chunks +13 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 4 chunks +13 lines, -6 lines 3 comments Download
M tests/language/closure_in_constructor_test.dart View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A tests/language/closures_initializer_test.dart View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
karlklose
7 years, 5 months ago (2013-07-01 13:47:15 UTC) #1
Johnni Winther
lgtm
7 years, 5 months ago (2013-07-01 18:56:00 UTC) #2
karlklose
PTAL, I removed the check for initializers.
7 years, 5 months ago (2013-07-02 07:05:53 UTC) #3
Johnni Winther
SLGTM Do we have a test where type variables are access from a closure within ...
7 years, 5 months ago (2013-07-02 07:10:09 UTC) #4
karlklose
Thanks, Johnni! On 2013/07/02 07:10:09, Johnni Winther wrote: > Do we have a test where ...
7 years, 5 months ago (2013-07-02 07:21:40 UTC) #5
karlklose
Committed patchset #4 manually as r24674 (presubmit successful).
7 years, 5 months ago (2013-07-02 08:56:13 UTC) #6
ngeoffray
DBC https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode3280 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3280: // not stored on a type annotation in ...
7 years, 5 months ago (2013-07-12 12:09:25 UTC) #7
karlklose
https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode3280 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3280: // not stored on a type annotation in the ...
7 years, 5 months ago (2013-07-12 12:22:54 UTC) #8
ngeoffray
https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode3280 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3280: // not stored on a type annotation in the ...
7 years, 5 months ago (2013-07-12 12:27:39 UTC) #9
karlklose
7 years, 5 months ago (2013-07-12 12:34:16 UTC) #10
Message was sent while issue was closed.
On 2013/07/12 12:27:39, ngeoffray wrote:
>
https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compile...
> File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right):
> 
>
https://codereview.chromium.org/18181009/diff/29001/sdk/lib/_internal/compile...
> sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3280: // not stored
> on a type annotation in the closure translator. Remove when
> On 2013/07/12 12:22:54, karlklose wrote:
> > The wording isn't the best, I agree. With storing a type on an annotation i
> mean
> > having an entry in the types map in the tree elements. I did not mean to say
> > that the closure translator stores a type but that it finds an annotation
for
> > which no types has been stored (in the resolver).
> 
> So that's a bug in the resolver?

More in the enqueuer, when a type annotation is resolved while its enclosing
element is not in the queue, the tree elements mapping is not stored. I debugged
this a while ago, and if I remember correctly, it was the backend triggering
resolution of signatures for helpers that are added before resolution.

Powered by Google App Engine
This is Rietveld 408576698