Skip to content

Commit

Permalink
Update test262 test suite and fix TypedArray.set issues (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Aug 7, 2024
1 parent 38ee8d0 commit e2b5c3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
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

0 comments on commit e2b5c3b

Please sign in to comment.