dart-sdk/runtime
Alexander Markov 5117c45770 [vm/compiler] Combine argument type with static and inferred parameter types during inlining
Previously, when preparing a Parameter stub during inlining, compiler
unconditionally used argument type (from the caller). This type
could be less accurate than static or inferred parameter type of
the callee. For example, the argument could originate from inlined generic ListIterator.current:

  v24 <- LoadField(v23 . _current@9040228) T{X0??}

and static type could be 'int'.

This change combines argument type from callee with a parameter type
from caller during inlining. In order to get parameter type for
optional parameters, ParameterInstr is extended to hold real parameter
index and ParameterIndex::ComputeType is extended to work on
parameters which are not passed directly.

Also, this change fixes the incorrect non-nullable receiver type for
Object and Null methods.

TEST=runtime/tests/vm/dart/regress_51790_il_test.dart
Fixes https://github.com/dart-lang/sdk/issues/51790

Change-Id: I19fff19833a6148ed36a16895626e4e1d8ae62d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290602
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-26 03:42:30 +00:00
..
bin Reland "[ Observatory ] Disable serving Observatory by default" 2023-03-24 13:25:30 +00:00
docs [vm] Timeline docs. 2023-03-06 21:33:24 +00:00
include [ VM ] Re-work heap sampling profiler APIs to make use of WeakTable 2023-03-24 14:00:09 +00:00
lib [vm/regexp] Name generated Regexp function with actual expression. 2023-03-09 03:49:58 +00:00
observatory [analyzer] Move 3 more HintCodes to be WarningCodes, UNNECESSARY_* 2023-03-23 22:52:36 +00:00
observatory_2 [ Service ] Add new InstanceKind "UserTag" 2023-03-23 17:51:03 +00:00
platform [vm] Make VM strict about min required Mac OS X version. 2023-03-08 09:08:39 +00:00
tests [vm/compiler] Combine argument type with static and inferred parameter types during inlining 2023-03-26 03:42:30 +00:00
third_party Spelling pkg analyzer lib 2023-01-25 14:08:27 +00:00
tools Update dartfuzz code to remove generation of old super-mixins 2023-03-23 22:44:33 +00:00
vm [vm/compiler] Combine argument type with static and inferred parameter types during inlining 2023-03-26 03:42:30 +00:00
.clang-tidy
.gitignore
BUILD.gn [ VM ] Add support for samping heap profiler in PRODUCT mode 2023-03-24 14:02:14 +00:00
codereview.settings
configs.gni [vm/ffi] FfiNative process lookup 2022-10-25 10:57:07 +00:00
CPPLINT.cfg [cpplint] Disable runtime/references lint 2023-01-23 18:21:48 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
PRESUBMIT.py Revert "[VM] Begin supporting Perfetto file recorder" 2023-02-28 12:41:00 +00:00
runtime_args.gni [ VM ] Add support for samping heap profiler in PRODUCT mode 2023-03-24 14:02:14 +00:00