dart-sdk/runtime
Vyacheslav Egorov bd950da0a8 [vm] Avoid duplicate entries in invocation dispatcher cache.
We would add function itself to the invocation dispatcher cache
if the function itself can handle dynamic invocation.

However GetInvocationDispatcher will never be able to find this
entry because it looks specifically for functions with
kDynamicInvocationForwarder kind.

This lead us to add many duplicated entries to the cache.

The logic in the resolver does not actually need the cache to contain
the function because it falls through to lookup using unmangled name.

For a large Flutter application: before this change invocation dispatcher caches were contributing 129244 bytes to the snapshot, after this change they contribute 7764 bytes.

Fixes https://github.com/dart-lang/sdk/issues/48914

TEST=ci

Change-Id: I639d268e75fd43d2f4f0b1ea5a7873ba169f9d66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242862
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-04-28 21:43:10 +00:00
..
bin [format] Remove multiline comment that gcc errors on. 2022-04-21 22:30:59 +00:00
docs [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
include [dart:io] Publish implementations of the VM file callbacks. 2022-04-19 23:27:17 +00:00
lib [vm] Finalizer / NativeFinalizer fixes 2022-04-07 07:05:27 +00:00
observatory [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
observatory_2 [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
platform Revert "[build] Fix Android build for ARM64 Mac." 2022-04-20 23:13:29 +00:00
tests [vm] Fix assertion failure during class finalization 2022-04-27 19:19:54 +00:00
third_party [vm] More pieces of Windows ARM support. 2022-04-07 23:15:48 +00:00
tools move runtime/tools/wiki/xref_extractor to package:lints 2022-04-19 15:39:57 +00:00
vm [vm] Avoid duplicate entries in invocation dispatcher cache. 2022-04-28 21:43:10 +00:00
.clang-tidy
.gitignore
BUILD.gn [build] -fno-strict-vtable-pointers is a Clang-only flag. 2022-03-30 17:34:20 +00:00
codereview.settings
configs.gni Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" 2020-06-17 16:12:26 +00:00
CPPLINT.cfg
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
PRESUBMIT.py [python3] Migrate PRESUBMIT.py files 2021-08-16 08:29:54 +00:00
runtime_args.gni [VM] error: ‘mallinfo mallinfo()’ is deprecated 2021-12-08 00:25:10 +00:00