Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test262 test suite and fix TypedArray.set issues #1934

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Jint.Tests.Test262/Test262Harness.settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SuiteGitSha": "242f6f98f0f86c0a3276929b4a450438526057cb",
"SuiteGitSha": "5dc04b733275cf64e3022867359e27bc99d9262c",
//"SuiteDirectory": "//mnt/c/work/test262",
"TargetPath": "./Generated",
"Namespace": "Jint.Tests.Test262",
Expand All @@ -9,6 +9,7 @@
"async-iteration",
"Atomics",
"decorators",
"explicit-resource-management",
"import-assertions",
"iterator-helpers",
"Math.sumPrecise",
Expand Down Expand Up @@ -43,6 +44,7 @@
"language/literals/regexp/named-groups/forward-reference.js",

// RegExp handling problems
"built-ins/RegExp/nullable-quantifier.js",
"built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js",
"language/literals/regexp/u-case-mapping.js",
"built-ins/RegExp/lookahead-quantifier-match-groups.js",
Expand Down
8 changes: 7 additions & 1 deletion Jint/Native/TypedArray/IntrinsicTypedArrayPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,13 @@ private void SetTypedArrayFromArrayLike(JsTypedArray target, int targetOffset, J
var targetBuffer = target._viewedArrayBuffer;
targetBuffer.AssertNotDetached();

var targetLength = target._arrayLength;
var targetRecord = MakeTypedArrayWithBufferWitnessRecord(target, ArrayBufferOrder.SeqCst);
if (targetRecord.IsTypedArrayOutOfBounds)
{
ExceptionHelper.ThrowTypeError(_realm);
}

var targetLength = targetRecord.TypedArrayLength;
var src = ArrayOperations.For(_realm, source, forWrite: false);
var srcLength = src.GetLength();

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ and many more.
#### ECMAScript 2017

- ✔ `Object.values`, `Object.entries` and `Object.getOwnPropertyDescriptors`
- ❌ Shared memory and atomics

#### ECMAScript 2018

Expand Down