dart-sdk/runtime
Daco Harkes 438c1ed2ba [vm] Only call .hashCode once when adding to Map and Set
The methods to add to hash maps and hash sets are recursive: if the
index needs to be rehashed then the same method is called again after
rehashing.

This CL nests the actual implementation in a private method that takes
the full hashCode as an extra argument.

No significant code size or run time changes are reported on our
benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)

Note that hashCode can be called again later if rehashing of the index
is required on adding subsequent elements.

Bug: https://github.com/dart-lang/sdk/issues/48948
Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-05-05 11:48:35 +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] New async/await implementation in the VM, part 2 - vm 2022-04-29 01:03:50 +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] Only call .hashCode once when adding to Map and Set 2022-05-05 11:48:35 +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] Introduce FUNCTION_REG constant 2022-05-04 22:59:24 +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
CPPLINT.cfg
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
PRESUBMIT.py
runtime_args.gni [VM] error: ‘mallinfo mallinfo()’ is deprecated 2021-12-08 00:25:10 +00:00