Diff
Modified: trunk/JSTests/ChangeLog (275597 => 275598)
--- trunk/JSTests/ChangeLog 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/ChangeLog 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,3 +1,23 @@
+2021-04-07 Yusuke Suzuki <[email protected]>
+
+ [JSC] Update test262
+ https://bugs.webkit.org/show_bug.cgi?id=224272
+
+ Reviewed by Ross Kirsling.
+
+ * test262/latest-changes-summary.txt:
+ * test262/test/intl402/DisplayNames/options-getoptionsobject.js: Added.
+ * test262/test/intl402/ListFormat/constructor/constructor/options-getoptionsobject.js: Renamed from JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject.js.
+ * test262/test/intl402/ListFormat/constructor/constructor/options-toobject-prototype.js: Removed.
+ * test262/test/intl402/Segmenter/constructor/constructor/options-getoptionsobject.js: Added.
+ * test262/test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js: Removed.
+ * test262/test/intl402/Segmenter/constructor/constructor/options-toobject.js: Removed.
+ * test262/test/language/expressions/in/rhs-yield-absent-non-strict.js: Added.
+ * test262/test/language/expressions/in/rhs-yield-absent-strict.js: Added.
+ * test262/test/language/expressions/in/rhs-yield-present.js: Added.
+ (isNameIn):
+ * test262/test262-Revision.txt:
+
2021-04-06 Yusuke Suzuki <[email protected]>
[JSC] WasmMemory caging should care about nullptr
Modified: trunk/JSTests/test262/latest-changes-summary.txt (275597 => 275598)
--- trunk/JSTests/test262/latest-changes-summary.txt 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/latest-changes-summary.txt 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,9 +1,9 @@
-A test/built-ins/Array/prototype/sort/call-with-primitive.js
-M test/built-ins/Function/internals/Call/class-ctor-realm.js
-A test/language/expressions/object/dstr/object-rest-proxy-get-not-called-on-dontenum-keys.js
-A test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js
-A test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js
-A test/language/expressions/object/object-spread-proxy-no-excluded-keys.js
-M test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js
-D test/language/statements/class/constructor-inferred-observable-iteration.js
-M test/language/statements/class/subclass/default-constructor-spread-override.js
\ No newline at end of file
+A test/intl402/DisplayNames/options-getoptionsobject.js
+R051 test/intl402/ListFormat/constructor/constructor/options-toobject.js test/intl402/ListFormat/constructor/constructor/options-getoptionsobject.js
+D test/intl402/ListFormat/constructor/constructor/options-toobject-prototype.js
+A test/intl402/Segmenter/constructor/constructor/options-getoptionsobject.js
+D test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js
+D test/intl402/Segmenter/constructor/constructor/options-toobject.js
+A test/language/expressions/in/rhs-yield-absent-non-strict.js
+A test/language/expressions/in/rhs-yield-absent-strict.js
+A test/language/expressions/in/rhs-yield-present.js
\ No newline at end of file
Added: trunk/JSTests/test262/test/intl402/DisplayNames/options-getoptionsobject.js (0 => 275598)
--- trunk/JSTests/test262/test/intl402/DisplayNames/options-getoptionsobject.js (rev 0)
+++ trunk/JSTests/test262/test/intl402/DisplayNames/options-getoptionsobject.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,24 @@
+// Copyright 2021 Google Inc. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DisplayNames
+description: Checks handling of non-object option arguments to the DisplayNames constructor.
+info: |
+ Intl.DisplayNames ( locales, options )
+features: [Intl.DisplayNames,BigInt]
+---*/
+
+const optionsArguments = [
+ null,
+ true,
+ false,
+ "test",
+ 7,
+ Symbol(),
+ 123456789n,
+];
+
+for (const options of optionsArguments) {
+ assert.throws(TypeError, function() { new Intl.DisplayNames([], options) })
+}
Copied: trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-getoptionsobject.js (from rev 275597, trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject.js) (0 => 275598)
--- trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-getoptionsobject.js (rev 0)
+++ trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-getoptionsobject.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,24 @@
+// Copyright 2018 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.ListFormat
+description: Checks handling of non-object option arguments to the ListFormat constructor.
+info: |
+ InitializeListFormat (listFormat, locales, options)
+features: [Intl.ListFormat,BigInt]
+---*/
+
+const optionsArguments = [
+ null,
+ true,
+ false,
+ "test",
+ 7,
+ Symbol(),
+ 123456789n,
+];
+
+for (const options of optionsArguments) {
+ assert.throws(TypeError, function() { new Intl.ListFormat([], options) })
+}
Deleted: trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject-prototype.js (275597 => 275598)
--- trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject-prototype.js 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject-prototype.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,35 +0,0 @@
-// Copyright 2018 Igalia, S.L. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-Intl.ListFormat
-description: Checks handling of non-object option arguments to the ListFormat constructor.
-info: |
- InitializeListFormat (listFormat, locales, options)
-features: [Intl.ListFormat]
----*/
-
-Object.defineProperties(Object.prototype, {
- "type": {
- value: "unit",
- },
- "style": {
- value: "short",
- },
-})
-
-const optionsArguments = [
- true,
- "test",
- 7,
- Symbol(),
-];
-
-for (const options of optionsArguments) {
- const lf = new Intl.ListFormat([], options);
- const resolvedOptions = lf.resolvedOptions();
- assert.sameValue(resolvedOptions.type, "unit",
- `options argument ${String(options)} should yield the correct value for "type"`);
- assert.sameValue(resolvedOptions.style, "short",
- `options argument ${String(options)} should yield the correct value for "style"`);
-}
Deleted: trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject.js (275597 => 275598)
--- trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject.js 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/test/intl402/ListFormat/constructor/constructor/options-toobject.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,26 +0,0 @@
-// Copyright 2018 Igalia, S.L. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-Intl.ListFormat
-description: Checks handling of non-object option arguments to the ListFormat constructor.
-info: |
- InitializeListFormat (listFormat, locales, options)
-features: [Intl.ListFormat]
----*/
-
-const optionsArguments = [
- true,
- "test",
- 7,
- Symbol(),
-];
-
-for (const options of optionsArguments) {
- const lf = new Intl.ListFormat([], options);
- const resolvedOptions = lf.resolvedOptions();
- assert.sameValue(resolvedOptions.type, "conjunction",
- `options argument ${String(options)} should yield the correct value for "type"`);
- assert.sameValue(resolvedOptions.style, "long",
- `options argument ${String(options)} should yield the correct value for "style"`);
-}
Added: trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-getoptionsobject.js (0 => 275598)
--- trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-getoptionsobject.js (rev 0)
+++ trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-getoptionsobject.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,25 @@
+// Copyright 2018 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.Segmenter
+description: Checks handling of non-object option arguments to the Segmenter constructor.
+info: |
+ Intl.Segmenter ([ locales [ , options ]])
+
+features: [Intl.Segmenter,BigInt]
+---*/
+
+const optionsArguments = [
+ null,
+ true,
+ false,
+ "test",
+ 7,
+ Symbol(),
+ 123456789n,
+];
+
+for (const options of optionsArguments) {
+ assert.throws(TypeError, function() { new Intl.Segment([], options) })
+}
Deleted: trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js (275597 => 275598)
--- trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,34 +0,0 @@
-// Copyright 2018 Igalia, S.L. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-Intl.Segmenter
-description: Checks handling of non-object option arguments to the Segmenter constructor.
-info: |
- Intl.Segmenter ([ locales [ , options ]])
-
- 5. Else
- a. Let options be ? ToObject(options).
-features: [Intl.Segmenter]
----*/
-
-Object.defineProperties(Object.prototype, {
- "granularity": {
- value: "word",
- },
-})
-
-const optionsArguments = [
- true,
- "test",
- 7,
- Symbol(),
- {},
-];
-
-for (const options of optionsArguments) {
- const segmenter = new Intl.Segmenter([], options);
- const resolvedOptions = segmenter.resolvedOptions();
- assert.sameValue(resolvedOptions.granularity, "word",
- `options argument ${String(options)} should yield the correct value for "granularity"`);
-}
Deleted: trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject.js (275597 => 275598)
--- trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject.js 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/test/intl402/Segmenter/constructor/constructor/options-toobject.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,30 +0,0 @@
-// Copyright 2018 Igalia, S.L. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-Intl.Segmenter
-description: Checks handling of non-object option arguments to the Segmenter constructor.
-info: |
- Intl.Segmenter ([ locales [ , options ]])
-
- 5. Else
- a. Let options be ? ToObject(options).
-features: [Intl.Segmenter]
----*/
-
-const optionsArguments = [
- true,
- "test",
- 7,
- Symbol(),
- {},
-];
-
-for (const options of optionsArguments) {
- const segmenter = new Intl.Segmenter([], options);
- const resolvedOptions = segmenter.resolvedOptions();
- assert.sameValue(resolvedOptions.granularity, "grapheme",
- `options argument ${String(options)} should yield the correct value for "granularity"`);
- assert.sameValue(resolvedOptions.lineBreakStyle, undefined,
- `options argument ${String(options)} should yield the correct value for "lineBreakStyle"`);
-}
Added: trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-non-strict.js (0 => 275598)
--- trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-non-strict.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-non-strict.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,30 @@
+// Copyright 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Parsing observes the `Yield` production parameter when absent (without strict mode)
+info: |
+ Syntax
+ RelationalExpression[In, Yield, Await]:
+ [...]
+ [+In] RelationalExpression[+In, ?Yield, ?Await] in ShiftExpression[?Yield, ?Await]
+
+ [...]
+
+ 1. Let lref be the result of evaluating RelationalExpression.
+ 2. Let lval be ? GetValue(lref).
+ 3. Let rref be the result of evaluating ShiftExpression.
+ 4. Let rval be ? GetValue(rref).
+ 5. If Type(rval) is not Object, throw a TypeError exception.
+ 6. Return ? HasProperty(rval, ? ToPropertyKey(lval)).
+esid: sec-relational-operators
+flags: [noStrict]
+---*/
+
+var yield;
+
+yield = {'': 0};
+assert.sameValue('' in (yield), true);
+
+yield = {};
+assert.sameValue('' in (yield), false);
Added: trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-strict.js (0 => 275598)
--- trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-strict.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/in/rhs-yield-absent-strict.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,20 @@
+// Copyright 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Parsing observes the `Yield` production parameter when absent (within strict mode)
+info: |
+ Syntax
+ RelationalExpression[In, Yield, Await]:
+ [...]
+ [+In] RelationalExpression[+In, ?Yield, ?Await] in ShiftExpression[?Yield, ?Await]
+esid: sec-relational-operators
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [onlyStrict]
+---*/
+
+$DONOTEVALUATE();
+
+'' in (yield);
Added: trunk/JSTests/test262/test/language/expressions/in/rhs-yield-present.js (0 => 275598)
--- trunk/JSTests/test262/test/language/expressions/in/rhs-yield-present.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/in/rhs-yield-present.js 2021-04-07 09:30:51 UTC (rev 275598)
@@ -0,0 +1,33 @@
+// Copyright 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: Parsing observes the `Yield` production parameter when present
+info: |
+ Syntax
+ RelationalExpression[In, Yield, Await]:
+ [...]
+ [+In] RelationalExpression[+In, ?Yield, ?Await] in ShiftExpression[?Yield, ?Await]
+
+ [...]
+
+ 1. Let lref be the result of evaluating RelationalExpression.
+ 2. Let lval be ? GetValue(lref).
+ 3. Let rref be the result of evaluating ShiftExpression.
+ 4. Let rval be ? GetValue(rref).
+ 5. If Type(rval) is not Object, throw a TypeError exception.
+ 6. Return ? HasProperty(rval, ? ToPropertyKey(lval)).
+esid: sec-relational-operators-runtime-semantics-evaluation
+---*/
+
+function * isNameIn() {
+ return '' in (yield);
+}
+
+let iter1 = isNameIn();
+iter1.next();
+assert.sameValue(iter1.next({'': 0}).value, true);
+
+let iter2 = isNameIn();
+iter2.next();
+assert.sameValue(iter2.next({}).value, false);
Modified: trunk/JSTests/test262/test262-Revision.txt (275597 => 275598)
--- trunk/JSTests/test262/test262-Revision.txt 2021-04-07 09:28:49 UTC (rev 275597)
+++ trunk/JSTests/test262/test262-Revision.txt 2021-04-07 09:30:51 UTC (rev 275598)
@@ -1,2 +1,2 @@
test262 remote url: [email protected]:tc39/test262.git
-test262 revision: c00087e12970388e7f9892da88d3c082b31c0431
+test262 revision: 31126581e7290f9233c29cefd93f66c6ac78f1c9