Title: [272000] trunk/JSTests
Revision
272000
Author
ysuz...@apple.com
Date
2021-01-27 21:21:03 -0800 (Wed, 27 Jan 2021)

Log Message

[JSC] Update test262
https://bugs.webkit.org/show_bug.cgi?id=221078

Reviewed by Alexey Shvayka.

Update test262 to the latest one.

* test262/latest-changes-summary.txt:
* test262/test/built-ins/Array/prototype/sort/precise-comparefn-throws.js: Added.
(set logs):
(set const):
* test262/test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-increases-length.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-prototype-accessors.js: Added.
(set logs):
* test262/test/built-ins/Array/prototype/sort/precise-prototype-element.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-increases-length.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js: Added.
* test262/test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js: Added.
* test262/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js: Renamed from JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js.
* test262/test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js:
(dtf.format):
* test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js:
(assert.sameValue):
* test262/test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js: Added.
(C):
(C.staticFunc):
* test262/test/language/statements/class/elements/super-access-from-arrow-func-on-field.js: Added.
(C.prototype.func):
(C.staticFunc):
(C):
* test262/test/language/statements/for-of/head-lhs-async-dot.js: Added.
* test262/test/language/statements/for-of/head-lhs-async-invalid.js: Added.
* test262/test/language/statements/for/head-init-async-of.js: Added.
(async of):
* test262/test262-Revision.txt:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/JSTests/ChangeLog (271999 => 272000)


--- trunk/JSTests/ChangeLog	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/ChangeLog	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,5 +1,55 @@
 2021-01-27  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [JSC] Update test262
+        https://bugs.webkit.org/show_bug.cgi?id=221078
+
+        Reviewed by Alexey Shvayka.
+
+        Update test262 to the latest one.
+
+        * test262/latest-changes-summary.txt:
+        * test262/test/built-ins/Array/prototype/sort/precise-comparefn-throws.js: Added.
+        (set logs):
+        (set const):
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-increases-length.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-prototype-accessors.js: Added.
+        (set logs):
+        * test262/test/built-ins/Array/prototype/sort/precise-prototype-element.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-increases-length.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js: Added.
+        * test262/test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js: Added.
+        * test262/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js: Renamed from JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js.
+        * test262/test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js:
+        (dtf.format):
+        * test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js:
+        (assert.sameValue):
+        * test262/test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js: Added.
+        (C):
+        (C.staticFunc):
+        * test262/test/language/statements/class/elements/super-access-from-arrow-func-on-field.js: Added.
+        (C.prototype.func):
+        (C.staticFunc):
+        (C):
+        * test262/test/language/statements/for-of/head-lhs-async-dot.js: Added.
+        * test262/test/language/statements/for-of/head-lhs-async-invalid.js: Added.
+        * test262/test/language/statements/for/head-init-async-of.js: Added.
+        (async of):
+        * test262/test262-Revision.txt:
+
+2021-01-27  Yusuke Suzuki  <ysuz...@apple.com>
+
         WebAssembly: add support for stream APIs
         https://bugs.webkit.org/show_bug.cgi?id=173105
 

Modified: trunk/JSTests/test262/latest-changes-summary.txt (271999 => 272000)


--- trunk/JSTests/test262/latest-changes-summary.txt	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/test262/latest-changes-summary.txt	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,27 +1,27 @@
-M harness/testIntl.js
-A test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-false-for-zero.js
-A test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer-during-fromIndex-returns-true-for-undefined.js
-A test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-false-for-zero.js
-A test/built-ins/TypedArray/prototype/includes/detached-buffer-during-fromIndex-returns-true-for-undefined.js
-D test/built-ins/TypedArray/prototype/includes/detached-buffer-tointeger.js
-A test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js
-A test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js
-A test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js
-A test/built-ins/TypedArray/prototype/indexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js
-A test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer-during-fromIndex-returns-single-comma.js
-M test/built-ins/TypedArray/prototype/join/BigInt/detached-buffer.js
-A test/built-ins/TypedArray/prototype/join/detached-buffer-during-fromIndex-returns-single-comma.js
-M test/built-ins/TypedArray/prototype/join/detached-buffer.js
-A test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js
-A test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js
-A test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-undefined.js
-A test/built-ins/TypedArray/prototype/lastIndexOf/detached-buffer-during-fromIndex-returns-minus-one-for-zero.js
-M test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/BigInt/index-prop-desc.js
-M test/built-ins/TypedArrayConstructors/internals/Set/detached-buffer.js
-A test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js
-A test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js
-M test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js
-M test/intl402/Intl/getCanonicalLocales/preferred-grandfathered.js
-M test/intl402/Intl/getCanonicalLocales/preferred-variant.js
-M test/intl402/Locale/extensions-grandfathered.js
-M test/intl402/Locale/likely-subtags-grandfathered.js
\ No newline at end of file
+A test/built-ins/Array/prototype/sort/precise-comparefn-throws.js
+A test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js
+A test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js
+A test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js
+A test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js
+A test/built-ins/Array/prototype/sort/precise-getter-increases-length.js
+A test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js
+A test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js
+A test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js
+A test/built-ins/Array/prototype/sort/precise-prototype-accessors.js
+A test/built-ins/Array/prototype/sort/precise-prototype-element.js
+A test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js
+A test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js
+A test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js
+A test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js
+A test/built-ins/Array/prototype/sort/precise-setter-increases-length.js
+A test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js
+A test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js
+A test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js
+R100 test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js
+M test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js
+M test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js
+A test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js
+A test/language/statements/class/elements/super-access-from-arrow-func-on-field.js
+A test/language/statements/for/head-init-async-of.js
+A test/language/statements/for-of/head-lhs-async-dot.js
+A test/language/statements/for-of/head-lhs-async-invalid.js
\ No newline at end of file

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-comparefn-throws.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-comparefn-throws.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-comparefn-throws.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,52 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const logs = [];
+
+Object.defineProperty(Object.prototype, '2', {
+  get() {
+    logs.push('get');
+    return 4;
+  },
+  set(v) {
+    logs.push(`set with ${v}`);
+  }
+});
+const array = [undefined, 3, /*hole*/, 2, undefined, /*hole*/, 1];
+let count = 0;
+try {
+  array.sort((a, b) => {
+    if (++count === 3) {
+      throw new Error('lolwat');
+    }
+    return b - a;
+  });
+} catch (exception) {
+  logs.push(exception.message);
+}
+
+assert.sameValue(logs[0], 'get');
+assert.sameValue(logs[1], 'lolwat');
+assert.sameValue(logs.length, 2);
+
+assert.sameValue(array[0], undefined);
+assert.sameValue(array[1], 3);
+assert.sameValue('2' in array, true);
+assert.sameValue(array.hasOwnProperty('2'), false);
+assert.sameValue(array[3], 2);
+assert.sameValue(array[4], undefined);
+assert.sameValue('5' in array, false);
+assert.sameValue(array.hasOwnProperty('5'), false);
+assert.sameValue(array[6], 1);
+assert.sameValue(array.length, 7);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-appends-elements.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,49 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array.push('foo');
+    array.push('bar');
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue('2' in array, true);
+assert.sameValue(array.hasOwnProperty('2'), true);
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array[8], 'foo');
+assert.sameValue(array[9], 'bar');
+assert.sameValue(array.length, 10);
+assert.sameValue(array.foo, 'c');
+
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[10], 'foo');
+assert.sameValue(array[11], 'bar');
+assert.sameValue(array.length, 12);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-decreases-length.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array.length = array.length - 2;
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'b');
+assert.sameValue(array[1], 'c');
+assert.sameValue(array[3], undefined);
+assert.sameValue(array[4], undefined);
+assert.sameValue('5' in array, false);
+assert.sameValue(array.hasOwnProperty('5'), false);
+assert.sameValue(array.length, 6);
+assert.sameValue(array.foo, undefined);
+
+assert.sameValue(array[2], undefined);
+assert.sameValue(array.length, 4);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,43 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    delete array[1];
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');
+
+assert.sameValue(array[2], 'c');
+assert.sameValue('1' in array, false);
+assert.sameValue(array.hasOwnProperty(1), false);
+assert.sameValue(array.length, 8);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-deletes-successor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,44 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    delete array[3];
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'c');
+assert.sameValue(array[3], undefined);
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue('6' in array, false);
+assert.sameValue(array.hasOwnProperty('6'), false);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'd');
+
+assert.sameValue(array[2], 'd');
+assert.sameValue('3' in array, false);
+assert.sameValue(array.hasOwnProperty(3), false);
+assert.sameValue(array.length, 8);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-increases-length.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-increases-length.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-increases-length.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,49 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array.length = array.length + 2;
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue('8' in array, false);
+assert.sameValue(array.hasOwnProperty('8'), false);
+assert.sameValue('9' in array, false);
+assert.sameValue(array.hasOwnProperty('9'), false);
+assert.sameValue(array.length, 10);
+assert.sameValue(array.foo, 'c');
+
+assert.sameValue(array[2], 'c');
+assert.sameValue('10' in array, false);
+assert.sameValue(array.hasOwnProperty('10'), false);
+assert.sameValue('11' in array, false);
+assert.sameValue(array.hasOwnProperty('11'), false);
+assert.sameValue(array.length, 12);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-pops-elements.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,40 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array.pop();
+    array.pop();
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'b');
+assert.sameValue(array[1], 'c');
+assert.sameValue(array[3], undefined);
+assert.sameValue(array[4], undefined);
+assert.sameValue('5' in array, false);
+assert.sameValue(array.hasOwnProperty('5'), false);
+assert.sameValue(array.length, 6);
+assert.sameValue(array.foo, undefined);
+
+assert.sameValue(array[2], undefined);
+assert.sameValue(array.length, 4);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,41 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array[1] = 'foobar';
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');
+
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[1], 'foobar');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-getter-sets-successor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,41 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    array[3] = 'foobar';
+    return this.foo;
+  },
+  set(v) {
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'c');
+assert.sameValue(array[3], 'foobar');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'd');
+
+assert.sameValue(array[2], 'd');
+assert.sameValue(array[3], 'foobar');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-accessors.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-accessors.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-accessors.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,42 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const logs = [];
+
+Object.defineProperty(Object.prototype, '2', {
+  get() {
+    logs.push('get');
+    return 4;
+  },
+  set(v) {
+    logs.push(`set with ${v}`);
+  }
+});
+const array = [undefined, 3, /*hole*/, 2, undefined, /*hole*/, 1];
+array.sort();
+
+assert.sameValue(logs[0], 'get');
+assert.sameValue(logs[1], 'set with 3');
+assert.sameValue(logs.length, 2);
+
+assert.sameValue(array[0], 1);
+assert.sameValue(array[1], 2);
+assert.sameValue('2' in array, true);
+assert.sameValue(array.hasOwnProperty('2'), false);
+assert.sameValue(array[3], 4);
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue('6' in array, false);
+assert.sameValue(array.hasOwnProperty('6'), false);
+assert.sameValue(array.length, 7);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-element.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-element.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-prototype-element.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,27 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+Object.prototype[2] = 4;
+const array = [undefined, 3, /*hole*/, 2, undefined, /*hole*/, 1];
+array.sort();
+
+assert.sameValue(array[0], 1);
+assert.sameValue(array[1], 2);
+assert.sameValue(array[2], 3);
+assert.sameValue(array[3], 4);
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue('6' in array, false);
+assert.sameValue(array.hasOwnProperty('6'), false);
+assert.sameValue(array.length, 7);

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-appends-elements.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,42 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array.push('foo');
+    array.push('bar');
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array[8], 'foo');
+assert.sameValue(array[9], 'bar');
+assert.sameValue(array.length, 10);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-decreases-length.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,37 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array.length = array.length - 2;
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue(array.length, 7);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,40 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    delete array[1];
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue('1' in array, false);
+assert.sameValue(array.hasOwnProperty(1), false);
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-deletes-successor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    delete array[3];
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-increases-length.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-increases-length.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-increases-length.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,43 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array.length = array.length + 2;
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue('8' in array, false);
+assert.sameValue(array.hasOwnProperty('8'), false);
+assert.sameValue('9' in array, false);
+assert.sameValue(array.hasOwnProperty('9'), false);
+assert.sameValue(array.length, 10);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-pops-elements.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,38 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array.pop();
+    array.pop();
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue(array.length, 7);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array[1] = 'foobar';
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'foobar');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');

Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/precise-setter-sets-successor.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+  Previously implementation-defined aspects of Array.prototype.sort.
+info: |
+  Historically, many aspects of Array.prototype.sort remained
+  implementation-defined. https://github.com/tc39/ecma262/pull/1585
+  described some behaviors more precisely, reducing the amount of cases
+  that result in an implementation-defined sort order.
+---*/
+
+const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
+
+Object.defineProperty(array, '2', {
+  get() {
+    return this.foo;
+  },
+  set(v) {
+    array[3] = 'foobar';
+    this.foo = v;
+  }
+});
+
+array.sort();
+
+assert.sameValue(array[0], 'a');
+assert.sameValue(array[1], 'b');
+assert.sameValue(array[2], 'c');
+assert.sameValue(array[3], 'd');
+assert.sameValue(array[4], undefined);
+assert.sameValue(array[5], undefined);
+assert.sameValue(array[6], undefined);
+assert.sameValue('7' in array, false);
+assert.sameValue(array.hasOwnProperty('7'), false);
+assert.sameValue(array.length, 8);
+assert.sameValue(array.foo, 'c');

Copied: trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js (from rev 271994, trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js) (0 => 272000)


--- trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 Ecma International.  All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-setintegritylevel
+description: >
+    Object.seal - the [[Configurable]] attribute of own data property
+    of 'O' is set from true to false and other attributes of the
+    property are unaltered
+includes: [propertyHelper.js]
+---*/
+
+var obj = {};
+
+Object.defineProperty(obj, "foo", {
+  value: 10,
+  writable: true,
+  enumerable: true,
+  configurable: true
+});
+var preCheck = Object.isExtensible(obj);
+Object.seal(obj);
+
+if (!preCheck) {
+  $ERROR('Expected preCheck to be true, actually ' + preCheck);
+}
+
+verifyEqualTo(obj, "foo", 10);
+
+verifyWritable(obj, "foo");
+
+verifyEnumerable(obj, "foo");
+
+verifyNotConfigurable(obj, "foo");

Deleted: trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js (271999 => 272000)


--- trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/test262/test/built-ins/Object/seal/object-seal-the-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,34 +0,0 @@
-// Copyright (c) 2012 Ecma International.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-setintegritylevel
-description: >
-    Object.seal - the [[Configurable]] attribute of own data property
-    of 'O' is set from true to false and other attributes of the
-    property are unaltered
-includes: [propertyHelper.js]
----*/
-
-var obj = {};
-
-Object.defineProperty(obj, "foo", {
-  value: 10,
-  writable: true,
-  enumerable: true,
-  configurable: true
-});
-var preCheck = Object.isExtensible(obj);
-Object.seal(obj);
-
-if (!preCheck) {
-  $ERROR('Expected preCheck to be true, actually ' + preCheck);
-}
-
-verifyEqualTo(obj, "foo", 10);
-
-verifyWritable(obj, "foo");
-
-verifyEnumerable(obj, "foo");
-
-verifyNotConfigurable(obj, "foo");

Modified: trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js (271999 => 272000)


--- trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,4 +1,5 @@
 // Copyright 2021 Google Inc. All rights reserved.
+// Copyright 2021 Apple Inc. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 
 /*---
@@ -27,16 +28,34 @@
 locale: [en-US]
 ---*/
 
-const date = new Date(2019, 7, 10,  1, 2, 3, 234);
+{
+  const date = new Date(2019, 7, 10,  1, 2, 3, 234);
 
-let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
-assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with date options");
+  let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
+  assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with date options");
 
-dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
-assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with time options");
+  dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
+  assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with time options");
 
-dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
-assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with date-time options");
+  dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
+  assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with date-time options");
 
-dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
-assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with dateStyle/timeStyle");
+  dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
+  assert.sameValue(dtf.formatRange(date, date), dtf.format(date), "same output with dateStyle/timeStyle");
+}
+{
+  const date1 = new Date(2019, 7, 10,  1, 2, 3, 234);
+  const date2 = new Date(2019, 7, 10,  1, 2, 3, 235);
+
+  let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
+  assert.sameValue(dtf.formatRange(date1, date2), dtf.format(date1), "same output with date options");
+
+  dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
+  assert.sameValue(dtf.formatRange(date1, date2), dtf.format(date1), "same output with time options");
+
+  dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
+  assert.sameValue(dtf.formatRange(date1, date2), dtf.format(date1), "same output with date-time options");
+
+  dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
+  assert.sameValue(dtf.formatRange(date1, date2), dtf.format(date1), "same output with dateStyle/timeStyle");
+}

Modified: trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js (271999 => 272000)


--- trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-same-returns-single-date.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,4 +1,5 @@
 // Copyright 2021 Google Inc. All rights reserved.
+// Copyright 2021 Apple Inc. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 
 /*---
@@ -42,16 +43,34 @@
   }
 }
 
-const date = new Date(2019, 7, 10,  1, 2, 3, 234);
+{
+  const date = new Date(2019, 7, 10,  1, 2, 3, 234);
 
-let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
-compare(dtf.formatRange(date, date), dtf.format(date), "same output with date options");
+  let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
+  compare(dtf.formatRangeToParts(date, date), dtf.formatToParts(date), "same output with date options");
 
-dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
-compare(dtf.formatRange(date, date), dtf.format(date), "same output with time options");
+  dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
+  compare(dtf.formatRangeToParts(date, date), dtf.formatToParts(date), "same output with time options");
 
-dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
-compare(dtf.formatRange(date, date), dtf.format(date), "same output with date-time options");
+  dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
+  compare(dtf.formatRangeToParts(date, date), dtf.formatToParts(date), "same output with date-time options");
 
-dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
-compare(dtf.formatRange(date, date), dtf.format(date), "same output with dateStyle/timeStyle");
+  dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
+  compare(dtf.formatRangeToParts(date, date), dtf.formatToParts(date), "same output with dateStyle/timeStyle");
+}
+{
+  const date1 = new Date(2019, 7, 10,  1, 2, 3, 234);
+  const date2 = new Date(2019, 7, 10,  1, 2, 3, 235);
+
+  let dtf = new Intl.DateTimeFormat("en", { year: "numeric", month: "short", day: "numeric" });
+  compare(dtf.formatRangeToParts(date1, date2), dtf.formatToParts(date1), "same output with date options");
+
+  dtf = new Intl.DateTimeFormat("en", { minute: "numeric", second: "numeric" });
+  compare(dtf.formatRangeToParts(date1, date2), dtf.formatToParts(date1), "same output with time options");
+
+  dtf = new Intl.DateTimeFormat("en", { month: "short", day: "numeric", minute: "numeric" });
+  compare(dtf.formatRangeToParts(date1, date2), dtf.formatToParts(date1), "same output with date-time options");
+
+  dtf = new Intl.DateTimeFormat("en", { dateStyle: "long", timeStyle: "short" });
+  compare(dtf.formatRangeToParts(date1, date2), dtf.formatToParts(date1), "same output with dateStyle/timeStyle");
+}

Added: trunk/JSTests/test262/test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js (0 => 272000)


--- trunk/JSTests/test262/test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/class/elements/super-access-from-arrow-func-on-field.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/super-access-from-arrow-func-on-field.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: super inside arrow functions on field initializer resolves to class' super (field definitions in a class _expression_)
+esid: prod-FieldDefinition
+features: [class-fields-public, class-static-fields-public, class]
+flags: [generated]
+info: |
+    ClassElementName :
+      PropertyName
+      PrivateName
+
+    SuperProperty:
+      super[_expression_]
+      super.IdentifierName
+
+---*/
+
+
+var C = class {
+  func = () => {
+      super.prop = 'test262';
+  }
+
+  static staticFunc = () => {
+      super.staticProp = 'static test262';
+  }
+}
+
+let c = new C();
+c.func();
+assert.sameValue(c.prop, 'test262');
+
+C.staticFunc();
+assert.sameValue(C.staticProp, 'static test262');
+

Added: trunk/JSTests/test262/test/language/statements/class/elements/super-access-from-arrow-func-on-field.js (0 => 272000)


--- trunk/JSTests/test262/test/language/statements/class/elements/super-access-from-arrow-func-on-field.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/statements/class/elements/super-access-from-arrow-func-on-field.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/class-elements/super-access-from-arrow-func-on-field.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: super inside arrow functions on field initializer resolves to class' super (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-public, class-static-fields-public, class]
+flags: [generated]
+info: |
+    ClassElementName :
+      PropertyName
+      PrivateName
+
+    SuperProperty:
+      super[_expression_]
+      super.IdentifierName
+
+---*/
+
+
+class C {
+  func = () => {
+      super.prop = 'test262';
+  }
+
+  static staticFunc = () => {
+      super.staticProp = 'static test262';
+  }
+}
+
+let c = new C();
+c.func();
+assert.sameValue(c.prop, 'test262');
+
+C.staticFunc();
+assert.sameValue(C.staticProp, 'static test262');
+

Added: trunk/JSTests/test262/test/language/statements/for/head-init-async-of.js (0 => 272000)


--- trunk/JSTests/test262/test/language/statements/for/head-init-async-of.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/statements/for/head-init-async-of.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,16 @@
+// Copyright (C) 2021 Kevin Gibbons. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: for statement beginning with `async of`
+info: |
+  `for (async of =>` is the begining of a regular for loop, rather than a for-of
+esid: sec-for-statement
+---*/
+
+var i = 0;
+var counter = 0;
+for (async of => {}; i < 10; ++i) {
+  ++counter;
+}
+assert.sameValue(counter, 10);

Added: trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-dot.js (0 => 272000)


--- trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-dot.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-dot.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,15 @@
+// Copyright (C) 2021 Kevin Gibbons. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: leading `async` token in for-of LHS
+info: |
+  The `async` token is allowed in the LHS if not followed by `of`
+esid: sec-for-in-and-for-of-statements
+---*/
+
+var async = { x: 0 };
+
+for (async.x of [1]) ;
+
+assert.sameValue(async.x, 1);

Added: trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-invalid.js (0 => 272000)


--- trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-invalid.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/statements/for-of/head-lhs-async-invalid.js	2021-01-28 05:21:03 UTC (rev 272000)
@@ -0,0 +1,17 @@
+// Copyright (C) 2021 Kevin Gibbons. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: leading `async` token in for-of LHS
+info: |
+  The `async` token is disallowed in the LHS when followed by `of`
+esid: sec-for-in-and-for-of-statements
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var async;
+for (async of [1]) ;

Modified: trunk/JSTests/test262/test262-Revision.txt (271999 => 272000)


--- trunk/JSTests/test262/test262-Revision.txt	2021-01-28 05:17:43 UTC (rev 271999)
+++ trunk/JSTests/test262/test262-Revision.txt	2021-01-28 05:21:03 UTC (rev 272000)
@@ -1,2 +1,2 @@
 test262 remote url: g...@github.com:tc39/test262.git
-test262 revision: 6cf3433cf8f44c471a7e4f47e5ba36d32ebb7b69
+test262 revision: 79060efc7fedf6d9cf92efd14f4c45d06b800662
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to