Commit 8ea702e6 authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

Revert "[array] Change QuickSort to TimSort for Array.p.sort"

This reverts commit 6bb82368.

Reason for revert: breaks "nosnap" tests: CSA_ASSERT failure, array OOB read, see:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/19207

Original change's description:
> [array] Change QuickSort to TimSort for Array.p.sort
> 
> Bug: v8:7382
> Change-Id: I7f125a62867eb586d2720a2c641fb5f4012b284d
> Reviewed-on: https://chromium-review.googlesource.com/1100881
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53838}

TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com

Change-Id: I986ab4c3a65666bd06be086c1503d01b6e9e34b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7382
Reviewed-on: https://chromium-review.googlesource.com/1106717Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53849}
parent e465e7c2
This diff is collapsed.
......@@ -233,9 +233,7 @@ extern operator '!=' macro WordNotEqual(Object, Object): bool;
extern operator '+' macro SmiAdd(Smi, Smi): Smi;
extern operator '-' macro SmiSub(Smi, Smi): Smi;
extern operator '*' macro SmiMul(Smi, Smi): Smi;
extern operator '&' macro SmiAnd(Smi, Smi): Smi;
extern operator '|' macro SmiOr(Smi, Smi): Smi;
extern operator '>>>' macro SmiShr(Smi, constexpr int31): Smi;
extern operator '+' macro IntPtrAdd(intptr, intptr): intptr;
......@@ -660,7 +658,6 @@ extern macro IsJSArray(HeapObject): bool;
extern macro TaggedIsCallable(Object): bool;
extern macro IsDetachedBuffer(JSArrayBuffer): bool;
extern macro IsHeapNumber(HeapObject): bool;
extern macro IsFixedArray(HeapObject): bool;
extern macro IsExtensibleMap(Map): bool;
extern macro IsCustomElementsReceiverInstanceType(int32): bool;
......
......@@ -381,26 +381,6 @@ Node* ArrayBuiltinsAssembler::FindProcessor(Node* k_value, Node* k) {
void ArrayBuiltinsAssembler::NullPostLoopAction() {}
void ArrayBuiltinsAssembler::FillFixedArrayWithZero(TNode<FixedArray> array,
TNode<Smi> smi_length) {
TNode<IntPtrT> length = SmiToIntPtr(smi_length);
TNode<WordT> byte_length = WordShl(length, kPointerSizeLog2);
CSA_ASSERT(this, UintPtrLessThan(length, byte_length));
static const int32_t fa_base_data_offset =
FixedArray::kHeaderSize - kHeapObjectTag;
TNode<IntPtrT> backing_store = IntPtrAdd(
BitcastTaggedToWord(array), IntPtrConstant(fa_base_data_offset));
// Call out to memset to perform initialization.
TNode<ExternalReference> memset =
ExternalConstant(ExternalReference::libc_memset_function());
STATIC_ASSERT(kSizetSize == kIntptrSize);
CallCFunction3(MachineType::Pointer(), MachineType::Pointer(),
MachineType::IntPtr(), MachineType::UintPtr(), memset,
backing_store, IntPtrConstant(0), byte_length);
}
void ArrayBuiltinsAssembler::ReturnFromBuiltin(Node* value) {
if (argc_ == nullptr) {
Return(value);
......
......@@ -77,9 +77,6 @@ class ArrayBuiltinsAssembler : public BaseBuiltinsFromDSLAssembler {
return StoreFixedArrayElement(array, index, value);
}
// Uses memset to effectively initialize the given FixedArray with Smi zeroes.
void FillFixedArrayWithZero(TNode<FixedArray> array, TNode<Smi> smi_length);
protected:
TNode<Context> context() { return context_; }
TNode<Object> receiver() { return receiver_; }
......
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