mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 16:00:45 +00:00
[vm/test] Make sure argument is unboxed both with and without sound null safety
Without sound null safety result of int.parse is inferred as nullable,
making the IL test vm/dart/records_allocation_sinking_il_test dependent on
the sound null safety mode.
The test is changed so the argument 'x' of 'test' is always non-nullable
and always unboxed.
Follow-up to the unboxing fix
85d1a7752e
TEST=vm/dart/records_allocation_sinking_il_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I9c532a644d03e0fdb7b70875c323fcbbb5238948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284382
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
parent
19ac93da32
commit
967f583e41
|
@ -35,7 +35,8 @@ void matchIL$test(FlowGraph graph) {
|
|||
'bar' << match.Parameter(index: 3),
|
||||
'baz' << match.Parameter(index: 4),
|
||||
match.CheckStackOverflow(),
|
||||
match.MoveArgument('x'),
|
||||
'x_boxed' << match.BoxInt64('x'),
|
||||
match.MoveArgument('x_boxed'),
|
||||
match.StaticCall(),
|
||||
match.MoveArgument('y'),
|
||||
match.StaticCall(),
|
||||
|
@ -49,7 +50,7 @@ void matchIL$test(FlowGraph graph) {
|
|||
]);
|
||||
}
|
||||
|
||||
void main() {
|
||||
void main(List<String> args) {
|
||||
// Make sure all parameters are non-constant.
|
||||
test(int.parse('5'), int.parse('3') == 3, 'foo' + 3.toString(), int.parse('3') == 4, int.parse('7')!);
|
||||
test(args.length + 5, int.parse('3') == 3, 'foo' + 3.toString(), int.parse('3') == 4, args.length + 7);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue