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

Issue 2995353002: Test the CapturedScope for local functions (Closed)

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

Description

Test the CapturedScope for local functions Test changes landed through https://codereview.chromium.org/3003963002

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -98 lines) Patch
M pkg/compiler/lib/src/closure.dart View 8 chunks +27 lines, -15 lines 2 comments Download
M pkg/compiler/lib/src/js_model/closure.dart View 9 chunks +162 lines, -21 lines 3 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder_kernel.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/ssa/locals_handler.dart View 4 chunks +9 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/closure/closure_test.dart View 9 chunks +38 lines, -25 lines 3 comments Download
M tests/compiler/dart2js/closure/data/captured_variable.dart View 2 chunks +12 lines, -12 lines 0 comments Download
M tests/compiler/dart2js/closure/data/nested_closures.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/equivalence/id_equivalence_helper.dart View 3 chunks +11 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/serialization/model_test_helper.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (2 generated)
Johnni Winther
3 years, 4 months ago (2017-08-21 12:48:44 UTC) #2
Emily Fortuna
lgtm https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/closure.dart File pkg/compiler/lib/src/closure.dart (right): https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/closure.dart#newcode118 pkg/compiler/lib/src/closure.dart:118: bool get hasBox => false; this naming of ...
3 years, 3 months ago (2017-08-22 23:47:37 UTC) #3
Johnni Winther
3 years, 3 months ago (2017-08-23 07:47:18 UTC) #4
https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/closur...
File pkg/compiler/lib/src/closure.dart (right):

https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/closur...
pkg/compiler/lib/src/closure.dart:118: bool get hasBox => false;
On 2017/08/22 23:47:36, Emily Fortuna wrote:
> this naming of "context" was suggested by Siggi to distinguish between the
> "context" boxes here and the boxing that happens wrapping specific variables.
> 
> I'd prefer to keep it. why change it?

[context] _is_ the box, i.e. the JS object that holds the boxed variables (at
least in my CLs).

https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/js_mod...
File pkg/compiler/lib/src/js_model/closure.dart (right):

https://codereview.chromium.org/2995353002/diff/1/pkg/compiler/lib/src/js_mod...
pkg/compiler/lib/src/js_model/closure.dart:270: final ir.TreeNode node;
On 2017/08/22 23:47:36, Emily Fortuna wrote:
> why not just delete it then?

It's good for debugging and it seemed that I might need it to correct the
free-variables issue solve in a later CL.

https://codereview.chromium.org/2995353002/diff/1/tests/compiler/dart2js/clos...
File tests/compiler/dart2js/closure/closure_test.dart (right):

https://codereview.chromium.org/2995353002/diff/1/tests/compiler/dart2js/clos...
tests/compiler/dart2js/closure/closure_test.dart:263: // TODO(johnniwinther):
This can't happen!
On 2017/08/22 23:47:37, Emily Fortuna wrote:
> but this is happening? 
> if not... throw?

I'm still in the process of making this accurate. I left it in to remember that
we cannot test the box value this way.

Powered by Google App Engine
This is Rietveld 408576698