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

Issue 802813004: Avoid boxing loop variables that are only mutated in initializer or update (Closed)

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

Description

Avoid boxing loop variables that are only mutated in initializer or update For example: for (int i=0; i<10; i++) { getFoo(i).then((x) { x.doBar(i); }); } BUG= R=floitsch@google.com, karlklose@google.com Committed: https://code.google.com/p/dart/source/detail?r=42809

Patch Set 1 #

Total comments: 1

Patch Set 2 : Linebreaking #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -11 lines) Patch
M pkg/compiler/lib/src/closure.dart View 1 chunk +24 lines, -1 line 0 comments Download
A tests/compiler/dart2js/forloop_box_test.dart View 1 1 chunk +39 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart View 1 chunk +4 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
asgerf
5 years, 11 months ago (2015-01-13 13:16:22 UTC) #2
karlklose
LGTM. https://codereview.chromium.org/802813004/diff/1/tests/compiler/dart2js/forloop_box_test.dart File tests/compiler/dart2js/forloop_box_test.dart (right): https://codereview.chromium.org/802813004/diff/1/tests/compiler/dart2js/forloop_box_test.dart#newcode32 tests/compiler/dart2js/forloop_box_test.dart:32: Expect.isTrue(generated.contains('main_closure(i)'), 'for-loop variable was boxed'); Break these strings ...
5 years, 11 months ago (2015-01-13 13:22:47 UTC) #4
floitsch
LGTM.
5 years, 11 months ago (2015-01-13 14:05:57 UTC) #5
asgerf
5 years, 11 months ago (2015-01-13 14:11:18 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as 42809 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698