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

Issue 2954123002: Remove special casing of == null (Closed)

Created:
3 years, 6 months ago by Johnni Winther
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Remove special casing of == null This avoid reversing the operands for `null == x` - and make Hello World! fully equivalent. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/ecb5767bbadac644b5d64cfdc56b71df627ba697

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebased #

Patch Set 3 : Updated cf. comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -31 lines) Patch
M pkg/compiler/lib/src/ssa/builder_kernel.dart View 1 3 chunks +0 lines, -30 lines 0 comments Download
M pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M tests/compiler/dart2js/kernel/compile_from_dill_test.dart View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Johnni Winther
3 years, 6 months ago (2017-06-23 14:12:18 UTC) #2
Siggi Cherem (dart-lang)
lgtm with comments https://codereview.chromium.org/2954123002/diff/1/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart File pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart (right): https://codereview.chromium.org/2954123002/diff/1/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart#newcode585 pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart:585: return closedWorld.commonMasks.dynamicType; should we list here ...
3 years, 6 months ago (2017-06-23 20:43:37 UTC) #3
Johnni Winther
Committed patchset #3 (id:40001) manually as ecb5767bbadac644b5d64cfdc56b71df627ba697 (presubmit successful).
3 years, 5 months ago (2017-06-26 10:47:28 UTC) #5
Johnni Winther
3 years, 5 months ago (2017-06-26 10:47:40 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/2954123002/diff/1/pkg/compiler/lib/src/ssa/ke...
File pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart (right):

https://codereview.chromium.org/2954123002/diff/1/pkg/compiler/lib/src/ssa/ke...
pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart:585: return
closedWorld.commonMasks.dynamicType;
On 2017/06/23 20:43:37, Siggi Cherem (dart-lang) wrote:
> should we list here what kind of `send` we expect here. For example, I imagine
> we only want to include null-aware sends?

Asserted that `send.name.name == 'null'`.

https://codereview.chromium.org/2954123002/diff/1/tests/compiler/dart2js/kern...
File tests/compiler/dart2js/kernel/compile_from_dill_test.dart (right):

https://codereview.chromium.org/2954123002/diff/1/tests/compiler/dart2js/kern...
tests/compiler/dart2js/kernel/compile_from_dill_test.dart:55: var w = x == null
? null : x.toString();
On 2017/06/23 20:43:37, Siggi Cherem (dart-lang) wrote:
> with your change, is `x ?? y` and `x ??= y` handled as well?

Yes. Tests added.

Powered by Google App Engine
This is Rietveld 408576698