Commit ee4ce544 authored by jkummerow's avatar jkummerow Committed by Commit bot

Revert of [keys] Don't omit write barrier after std::sort (patchset #2...

Revert of [keys] Don't omit write barrier after std::sort (patchset #2 id:20001 of https://codereview.chromium.org/1991173002/ )

Reason for revert:
This array only contains Smis, see its only store site five lines above:

array->set(array_size++, Smi::FromInt(i));

If you want to improve something here, use a C++ array instead of a FixedArray. There's no reason to have this short-lived list on the V8 heap.

Original issue's description:
> [keys] Don't omit write barrier after std::sort
>
> BUG=
>
> Committed: https://crrev.com/681ac8979e820d147380b5fdb2aae773e22f1302
> Cr-Commit-Position: refs/heads/master@{#36412}

TBR=mlippautz@chromium.org,cbruni@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/1996963002
Cr-Commit-Position: refs/heads/master@{#36414}
parent 767c34df
......@@ -17139,8 +17139,6 @@ void Dictionary<Derived, Shape, Key>::CollectKeysTo(
EnumIndexComparator<Derived> cmp(static_cast<Derived*>(raw_dict));
Smi** start = reinterpret_cast<Smi**>(array->GetFirstElementAddress());
std::sort(start, start + array_size, cmp);
FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(keys->isolate()->heap(), *array, 0,
array->length());
}
for (int i = 0; i < array_size; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment