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

Issue 1671073002: dart2js cps: Pull SetFields into field initializer arguments. (Closed)

Created:
4 years, 10 months ago by asgerf
Modified:
4 years, 10 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js cps: Pull SetFields into field initializer arguments. For example: foo = new D.Foo(null, null); foo.x = 'a'; foo.y = 'b'; becomes: foo = new D.Foo('a', 'b'); BUG= R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/86f286a3eb9f4e8a5a0041e1521d4f83db855aaa

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add unit test #

Patch Set 3 : Handle fields that are not set at creation time #

Patch Set 4 : Fix accidental lifting of LetConts instead of sinking #

Total comments: 2

Patch Set 5 : Disable tracing of LetCont #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -9 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 chunk +8 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/optimizers.dart View 1 chunk +1 line, -0 lines 0 comments Download
A pkg/compiler/lib/src/cps_ir/use_field_initializers.dart View 1 2 3 1 chunk +212 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + tests/compiler/dart2js/cps_ir/constructor_15_test.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A tests/compiler/dart2js/cps_ir/expected/constructor_15.js View 1 1 chunk +19 lines, -0 lines 0 comments Download
A tests/compiler/dart2js/cps_ir/input/constructor_15.dart View 1 1 chunk +14 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/cps_ir/update_all.dart View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
asgerf
4 years, 10 months ago (2016-02-05 16:38:48 UTC) #2
Siggi Cherem (dart-lang)
lgtm - maybe add a unittest that validates the transformation? https://codereview.chromium.org/1671073002/diff/1/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart File pkg/compiler/lib/src/cps_ir/use_field_initializers.dart (right): https://codereview.chromium.org/1671073002/diff/1/pkg/compiler/lib/src/cps_ir/use_field_initializers.dart#newcode121 ...
4 years, 10 months ago (2016-02-05 18:46:39 UTC) #3
asgerf
PTAL. There was a bug with fields on native classes, and with LetConts getting lifted ...
4 years, 10 months ago (2016-02-08 18:46:46 UTC) #4
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/1671073002/diff/60001/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart File pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart (right): https://codereview.chromium.org/1671073002/diff/60001/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart#newcode14 pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart:14: const bool IR_TRACE_LET_CONT = true; was this supposed ...
4 years, 10 months ago (2016-02-08 19:26:44 UTC) #5
asgerf
https://codereview.chromium.org/1671073002/diff/60001/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart File pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart (right): https://codereview.chromium.org/1671073002/diff/60001/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart#newcode14 pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart:14: const bool IR_TRACE_LET_CONT = true; On 2016/02/08 19:26:44, Siggi ...
4 years, 10 months ago (2016-02-09 09:29:07 UTC) #6
asgerf
4 years, 10 months ago (2016-02-09 11:33:24 UTC) #8
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
86f286a3eb9f4e8a5a0041e1521d4f83db855aaa (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698