Skip to content

Test262 TODO: TypedArray.prototype.sort #704

@rogeralsing

Description

@rogeralsing

Context: Fix Test262 failures for TypedArray.prototype.sort (including stability, -0 ordering, and comparefn exceptions).\n\nChanges:\n- Implement stable merge sort for TypedArray.prototype.sort to avoid List.Sort exception wrapping and preserve order when comparefn returns 0.\n- Keep original indices for stable ordering; add signed-zero ordering so -0 sorts before +0 for float typed arrays.\n- Avoid mid-sort out-of-bounds throws; write back only up to current length.\n\nTests:\n- dotnet test tests/Asynkron.JsEngine.Tests.Test262 -c Release --settings tests/Asynkron.JsEngine.Tests.Test262/BuiltInsTests.runsettings --filter "Name=TypedArray_prototype_sort"\n- dotnet test tests/Asynkron.JsEngine.Tests.Test262 -c Release --settings tests/Asynkron.JsEngine.Tests.Test262/BuiltInsTests.runsettings --filter "Name=TypedArray_prototype_sort_BigInt"\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions