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

Issue 11346002: Support argument definition test in constructors. (Closed)

Created:
8 years, 1 month ago by ngeoffray
Modified:
8 years, 1 month ago
Reviewers:
erikcorry, floitsch, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support argument definition test in constructors. Committed: https://code.google.com/p/dart/source/detail?r=14251

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -58 lines) Patch
M lib/compiler/implementation/ssa/builder.dart View 1 2 3 4 6 chunks +80 lines, -39 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 3 chunks +45 lines, -19 lines 0 comments Download
A tests/language/argument_definition3_test.dart View 1 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ngeoffray
Fixes issue 6225.
8 years, 1 month ago (2012-10-28 18:14:31 UTC) #1
floitsch
LGTM. This is better than before, but as discussed, it's not yet completely right. For ...
8 years, 1 month ago (2012-10-29 10:32:30 UTC) #2
ngeoffray
PTAL, I am now passing the parameter checks as extra parameters, like Florian and I ...
8 years, 1 month ago (2012-10-29 17:35:10 UTC) #3
floitsch
LGTM. https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementation/ssa/builder.dart#newcode1377 lib/compiler/implementation/ssa/builder.dart:1377: // If parameters are checked, we pass what ...
8 years, 1 month ago (2012-10-29 21:45:45 UTC) #4
ngeoffray
8 years, 1 month ago (2012-10-30 09:34:46 UTC) #5
Thanks Florian

https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/builder.dart:1377: // If parameters are checked,
we pass what we already computed
On 2012/10/29 21:45:45, floitsch wrote:
> If parameters are checked, we pass the already computed boolean to the
> constructor body.

Done.

https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/builder.dart:1412: HInstruction check;
On 2012/10/29 21:45:45, floitsch wrote:
> Keep the declaration at the use-point. No need to move it outside the if's. It
> actually makes the method one line longer...

The variable is used outside the if/else (line 1462), so I'm keeping the
declaration here.

https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/builder.dart:1417: // parameter was passed in
extra parameters.
On 2012/10/29 21:45:45, floitsch wrote:
> A generative constructor body receives extra parameters that indicate if a
> parameter was passed to the factory.

Done.

https://codereview.chromium.org/11346002/diff/8001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/builder.dart:1420: } else {
On 2012/10/29 21:45:45, floitsch wrote:
> You could avoid the else (and the indentation) by just returning in the
special
> case. But I'm fine the way it is.

No, there's a shared updateLocal call line 1462.

Powered by Google App Engine
This is Rietveld 408576698