|
|
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
Total comments: 33
|
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
|
Total messages: 10 (3 generated)
|