Selaa lähdekoodia

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

Marko Lahma 1 vuosi sitten
vanhempi
commit
e2b5c3bbce

+ 3 - 1
Jint.Tests.Test262/Test262Harness.settings.json

@@ -1,5 +1,5 @@
 {
-  "SuiteGitSha": "242f6f98f0f86c0a3276929b4a450438526057cb",
+  "SuiteGitSha": "5dc04b733275cf64e3022867359e27bc99d9262c",
   //"SuiteDirectory": "//mnt/c/work/test262",
   "TargetPath": "./Generated",
   "Namespace": "Jint.Tests.Test262",
@@ -9,6 +9,7 @@
     "async-iteration",
     "Atomics",
     "decorators",
+    "explicit-resource-management",
     "import-assertions",
     "iterator-helpers",
     "Math.sumPrecise",
@@ -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",

+ 7 - 1
Jint/Native/TypedArray/IntrinsicTypedArrayPrototype.cs

@@ -1125,7 +1125,13 @@ internal sealed class IntrinsicTypedArrayPrototype : Prototype
         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();
 

+ 1 - 0
README.md

@@ -61,6 +61,7 @@ and many more.
 ####  ECMAScript 2017
 
 - ✔ `Object.values`, `Object.entries` and `Object.getOwnPropertyDescriptors`
+- ❌ Shared memory and atomics
 
 #### ECMAScript 2018