[array] Skip write barrier when sorting packed Smis

R=jgruber@chromium.org

Bug: chromium:873555
Change-Id: I6268bedf47a89194875d1179e603bcfe972c9d68
Reviewed-on: https://chromium-review.googlesource.com/1172282
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55077}
This commit is contained in:
Simon Zünd 2018-08-13 10:43:56 +02:00 committed by Commit Bot
parent 1408e12772
commit ef3d93edf4
2 changed files with 8 additions and 1 deletions

View File

@ -63,6 +63,7 @@ type ExtractFixedArrayFlags generates
type ParameterMode generates 'TNode<Int32T>' constexpr 'ParameterMode';
type RootListIndex generates 'TNode<Int32T>' constexpr 'Heap::RootListIndex';
type AllocationFlags generates 'TNode<Int32T>' constexpr 'AllocationFlags';
type WriteBarrierMode generates 'TNode<Int32T>' constexpr 'WriteBarrierMode';
type MessageTemplate constexpr 'MessageTemplate::Template';
@ -166,6 +167,9 @@ const INTPTR_PARAMETERS: constexpr ParameterMode generates 'INTPTR_PARAMETERS';
const kAllowLargeObjectAllocation: constexpr AllocationFlags
generates 'kAllowLargeObjectAllocation';
const SKIP_WRITE_BARRIER: constexpr WriteBarrierMode
generates 'SKIP_WRITE_BARRIER';
extern macro Is64(): constexpr bool;
extern macro SelectBooleanConstant(bool): Boolean;
@ -642,6 +646,9 @@ extern operator
extern operator
'[]=' macro StoreFixedArrayElementSmi(FixedArray, Smi, Object): void;
extern macro StoreFixedArrayElementSmi(FixedArray, Smi, Object,
constexpr WriteBarrierMode): void;
extern operator '.instance_type' macro LoadMapInstanceType(Map): int32;
extern macro LoadFixedDoubleArrayElement(FixedDoubleArray, Smi): float64;

View File

@ -213,7 +213,7 @@ module array {
context: Context, sortState: FixedArray, elements: HeapObject, index: Smi,
value: Object): Smi {
const elems: FixedArray = unsafe_cast<FixedArray>(elements);
elems[index] = value;
StoreFixedArrayElementSmi(elems, index, value, SKIP_WRITE_BARRIER);
return kSuccess;
}