[vm/shared] Ensure immutable list is used as backing store for const map.

This is the follow-up to https://dart-review.googlesource.com/q/commit:e9229a05859252211ebbdc99a3ea8de6edb40f1b with fixes for broken standalone/io tests.

TEST=standalone/io on vm-eager-optimization bots

Bug: https://github.com/dart-lang/sdk/issues/62801
Change-Id: Iffd0068ea71f13e91198ea239dac9e498a39061c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484780
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
Alexander Aprelev
2026-03-02 13:19:49 -08:00
committed by Commit Queue
parent 2e6153cdb6
commit 6d4a7f41d9
+1 -1
View File
@@ -93,7 +93,7 @@ DEFINE_NATIVE_ENTRY(createConstMapFromMapOfDeeplyImmutables, 0, 1) {
intptr_t used_data = map.Length() << 1;
const_map.set_used_data(used_data);
const auto& data = Array::Handle(zone, map.data());
const auto& new_data = Array::Handle(zone, Array::New(used_data));
const auto& new_data = Array::Handle(zone, ImmutableArray::New(used_data));
const_map.set_data(new_data);
const_map.set_deleted_keys(0);
const_map.ComputeAndSetHashMask();