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

Issue 1151163004: Implementation of null-aware operators. (Closed)

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

Description

Implementation of null-aware operators. This CL adds the implementation of all null-aware operators to dart2js. In particular: * a?.b: represented as 'isConditional' in the Send ast, and dispatched separately by the semantic visitor using visitIfNotNull* methods. * a ?? b: represented as an operator, and dispatched separately by the semantic visitor using the `visitIfNull` method. * a ??= b: represented as a compound operator. All except 2 tests are passing with the SSA backend (those 2 tests fail for unrelated reasons). I've marked the CPS ir tests as failing for now. BUG= R=johnniwinther@google.com, paulberry@google.com, sra@google.com Committed: https://github.com/dart-lang/sdk/commit/a8db3278e21019a83b606b50525ac38106a3ad27

Patch Set 1 : #

Total comments: 33

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1171 lines, -148 lines) Patch
M pkg/compiler/lib/src/apiimpl.dart View 1 1 chunk +3 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/dart2js.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/elements/elements.dart View 1 3 chunks +5 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_visitor.dart View 4 chunks +29 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 3 chunks +16 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart View 1 2 2 chunks +9 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_nodes.dart View 1 2 2 chunks +10 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 2 4 chunks +32 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/resolution/operators.dart View 7 chunks +15 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/semantic_visitor.dart View 1 2 13 chunks +123 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart View 1 2 23 chunks +271 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/resolution/send_resolver.dart View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/resolution/send_structure.dart View 7 chunks +67 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/resolved_visitor.dart View 2 chunks +19 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/scanner/array_based_scanner.dart View 1 2 chunks +4 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/scanner/listener.dart View 1 2 6 chunks +15 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/scanner/parser.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/scanner/scanner.dart View 1 5 chunks +42 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/scanner/scanner_task.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/scanner/string_scanner.dart View 1 1 chunk +6 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/scanner/token.dart View 1 2 5 chunks +40 lines, -16 lines 0 comments Download
M pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart View 1 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 2 11 chunks +221 lines, -49 lines 0 comments Download
M pkg/compiler/lib/src/tree/nodes.dart View 7 chunks +30 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/tree/unparser.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/typechecker.dart View 1 2 4 chunks +11 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/universe/universe.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/warnings.dart View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/parser_test.dart View 2 chunks +27 lines, -0 lines 0 comments Download
A + tests/compiler/dart2js_extra/conditional_send_test.dart View 1 1 chunk +10 lines, -9 lines 0 comments Download
A tests/compiler/dart2js_extra/if_null_test.dart View 1 1 chunk +51 lines, -0 lines 0 comments Download
M tests/language/conditional_access_helper.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M tests/language/conditional_method_invocation_test.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language.status View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 2 chunks +31 lines, -11 lines 0 comments Download
A tests/language/this_conditional_operator_test.dart View 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Siggi Cherem (dart-lang)
This is mainly for Johnni and Stephen. Paul - I made a small change to ...
5 years, 7 months ago (2015-05-22 03:50:49 UTC) #4
Paul Berry
Test changes LGTM.
5 years, 7 months ago (2015-05-22 12:11:11 UTC) #5
Johnni Winther
LGTM (beautiful code!) - wait for Stephen for full review of the SsaBuilder. https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/dart2js.dart File ...
5 years, 7 months ago (2015-05-22 12:39:49 UTC) #6
Siggi Cherem (dart-lang)
https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/dart2js.dart File pkg/compiler/lib/src/dart2js.dart (right): https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/dart2js.dart#newcode352 pkg/compiler/lib/src/dart2js.dart:352: new OptionHandler('--enable-null-aware-operators', (_) { On 2015/05/22 12:39:48, Johnni Winther ...
5 years, 7 months ago (2015-05-22 19:49:54 UTC) #7
sra1
I'm concerned about breaking subexpression subgraph structure. Otherwise lgtm. https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart File pkg/compiler/lib/src/inferrer/inferrer_visitor.dart (right): https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart#newcode449 pkg/compiler/lib/src/inferrer/inferrer_visitor.dart:449: ...
5 years, 7 months ago (2015-05-22 21:17:28 UTC) #8
Siggi Cherem (dart-lang)
Thanks everyone! https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart File pkg/compiler/lib/src/inferrer/inferrer_visitor.dart (right): https://codereview.chromium.org/1151163004/diff/40001/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart#newcode449 pkg/compiler/lib/src/inferrer/inferrer_visitor.dart:449: SendSet send = node != null ? ...
5 years, 7 months ago (2015-05-22 22:36:09 UTC) #9
Siggi Cherem (dart-lang)
5 years, 7 months ago (2015-05-22 22:44:47 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:80001) manually as
a8db3278e21019a83b606b50525ac38106a3ad27 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698