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

Issue 1129693006: Fix field initialization order for forwarding constructors. (Closed)

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

Description

Fix evaluation field initialization order for forwarding constructors. Intestingly, the VM, dart2js/SSA and dart2js/CPS all fail the new test in three different ways. This CL fixed the SSA and CPS backends, and leaves a status line for the VM. When a constructor A redirects to B, it is B that should evaluate declaration-site initializers (unless B also redirects). Thus, this should happen after the arguments to B have been computed. In SSA: Fields were initialized at A instead of B (i.e. before redirect). In CPS: Fields were initialized at both places, just horrible. In VM: There seems to be a problem with redirecting constructors called using super(). VM bug report: https://code.google.com/p/dart/issues/detail?id=23488 BUG= R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/036f50d6aa4d19d422be49780eb60c6fb9c4f676

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add bug number in status file #

Patch Set 3 : Bugfix: use correct scope when evaluating constructor argument #

Patch Set 4 : Status #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -22 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 3 chunks +23 lines, -13 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 2 3 4 chunks +10 lines, -7 lines 0 comments Download
M tests/language/language.status View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
A tests/language/redirecting_constructor_initializer_test.dart View 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
asgerf
5 years, 7 months ago (2015-05-19 14:49:05 UTC) #2
floitsch
LGTM! https://codereview.chromium.org/1129693006/diff/1/tests/language/language.status File tests/language/language.status (right): https://codereview.chromium.org/1129693006/diff/1/tests/language/language.status#newcode32 tests/language/language.status:32: redirecting_constructor_initializer_test: RuntimeError Add bug-number.
5 years, 7 months ago (2015-05-19 15:27:54 UTC) #3
asgerf
https://codereview.chromium.org/1129693006/diff/1/tests/language/language.status File tests/language/language.status (right): https://codereview.chromium.org/1129693006/diff/1/tests/language/language.status#newcode32 tests/language/language.status:32: redirecting_constructor_initializer_test: RuntimeError On 2015/05/19 15:27:54, floitsch wrote: > Add ...
5 years, 7 months ago (2015-05-19 15:32:29 UTC) #4
asgerf
PTAL the test case revealed another bug in the builder
5 years, 7 months ago (2015-05-19 15:53:00 UTC) #5
floitsch
Still LGTM.
5 years, 7 months ago (2015-05-19 15:57:27 UTC) #6
asgerf
5 years, 7 months ago (2015-05-20 08:05:59 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
036f50d6aa4d19d422be49780eb60c6fb9c4f676 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698