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

Issue 1160833003: Add support for null-aware operators to the CPS-IR. (Closed)

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

Description

Patch Set 1 : #

Total comments: 20

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -141 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 1 4 chunks +50 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 6 chunks +64 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/resolution/operators.dart View 2 chunks +11 lines, -1 line 0 comments Download
M tests/compiler/dart2js_extra/dart2js_extra.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 1 3 chunks +45 lines, -131 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
Siggi Cherem (dart-lang)
https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/resolution/operators.dart File pkg/compiler/lib/src/resolution/operators.dart (right): https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/resolution/operators.dart#newcode225 pkg/compiler/lib/src/resolution/operators.dart:225: class _IfNullOperator extends BinaryOperator { technically this cleanup is ...
5 years, 7 months ago (2015-05-28 02:15:35 UTC) #4
Siggi Cherem (dart-lang)
I forgot to include some context. Here is the CL where I implemented the rest ...
5 years, 6 months ago (2015-05-28 14:52:37 UTC) #5
Siggi Cherem (dart-lang)
also, forgot to mention that the tests in the repo are a really good way ...
5 years, 6 months ago (2015-05-28 15:31:23 UTC) #6
Johnni Winther
lgtm https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart File pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart (right): https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart#newcode2331 pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart:2331: ir.Primitive buildCheckNull(ir.Primitive value) { Move the implementation to ...
5 years, 6 months ago (2015-05-29 10:23:24 UTC) #7
Kevin Millikin (Google)
LGTM, though I think we should probably move more of the translation logic into the ...
5 years, 6 months ago (2015-05-29 11:02:03 UTC) #8
Siggi Cherem (dart-lang)
Thanks for all the comments! It's much cleaner after moving the logic to the builder. ...
5 years, 6 months ago (2015-05-29 18:14:05 UTC) #12
Siggi Cherem (dart-lang)
Committed patchset #2 (id:120001) manually as 013897fe299f50fa180e06e9a038c26c0d7038c9 (presubmit successful).
5 years, 6 months ago (2015-05-29 19:01:48 UTC) #13
Siggi Cherem (dart-lang)
5 years, 6 months ago (2015-05-29 19:02:02 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/cp...
File pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart (right):

https://codereview.chromium.org/1160833003/diff/40001/pkg/compiler/lib/src/cp...
pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart:2333: return addPrimitive(new
ir.Identical(value, buildNullConstant()));
On 2015/05/29 18:14:05, Siggi Cherem (dart-lang) wrote:
> On 2015/05/29 11:02:03, Kevin Millikin (Google) wrote:
> > Identical is a 'JS specific' IR primitive, which means that it probably
> doesn't
> > work for dart2dart.  Either something will be unimplemented or we will hit
an
> > assertion failure.
> > 
> > In dart2dart we would want to support .? and ?? in the output anyway, which
> > would either require supporting them directly in the CPS IR or desugaring
them
> > and then recognizing them later.  Both of those choices are a lot of work.
> > 
> > Instead, just giveup in dart mode by throwing an informative string.
> 
> 
> Great points - I moved most of the implementation to the JsIrBuilder and made
> the dart version throw.

Just synced and noticed that DartIrBuilder is gone, nice!... I've kept the
implementation in the JsIrBuilder subclass for now though.

Powered by Google App Engine
This is Rietveld 408576698