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

Issue 1009053005: Do not use the namer for naming closure elements. (Closed)

Created:
5 years, 9 months ago by herhut
Modified:
5 years, 9 months ago
Reviewers:
floitsch, sra1
CC:
reviews_dartlang.org, sra1
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Better naming for closure/box fields. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -73 lines) Patch
M pkg/compiler/lib/src/closure.dart View 1 6 chunks +32 lines, -23 lines 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 2 chunks +1 line, -4 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/minify_namer.dart View 1 chunk +0 lines, -9 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/namer.dart View 1 3 chunks +15 lines, -19 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart View 1 3 chunks +18 lines, -18 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
herhut
5 years, 9 months ago (2015-03-19 16:44:26 UTC) #2
floitsch
LGTM.
5 years, 9 months ago (2015-03-19 16:49:41 UTC) #3
herhut
Committed patchset #1 (id:1) manually as 44594 (presubmit successful).
5 years, 9 months ago (2015-03-20 08:41:50 UTC) #4
herhut
PTAL I had to change the naming scheme for boxfields as we generated illegal names ...
5 years, 9 months ago (2015-03-23 10:14:17 UTC) #6
floitsch
Still LGTM.
5 years, 9 months ago (2015-03-23 16:07:43 UTC) #7
herhut
Committed patchset #2 (id:40001) manually as 44656 (presubmit successful).
5 years, 9 months ago (2015-03-24 09:40:10 UTC) #8
sra1
5 years, 9 months ago (2015-03-24 17:16:37 UTC) #10
Message was sent while issue was closed.
I'd like to understand the problem being solved here.
The unminified code is less readable and larger than before, which is a step in
the wrong direction.

We used to have:

  box_0.x_0 = 122;

now we have:

  _box_0._captured_x_0 = 122;

we should seek to generate something that looks a lot simpler, e.g.

  box.x = 122;

If the issue is interference with other selectors for .x, then we can have
private selectors that map to simply named fields.

Does the change rely on the program not already containing a field called
'_captured_x_0' somewhere else?

Powered by Google App Engine
This is Rietveld 408576698