Diff
Modified: trunk/JSTests/ChangeLog (273873 => 273874)
--- trunk/JSTests/ChangeLog 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/ChangeLog 2021-03-04 06:13:44 UTC (rev 273874)
@@ -1,3 +1,35 @@
+2021-03-03 Yusuke Suzuki <ysuz...@apple.com>
+
+ [JSC] Update test262
+ https://bugs.webkit.org/show_bug.cgi?id=222710
+
+ Reviewed by Ross Kirsling.
+
+ Update test262. New failure is due to the spec change, tracked in https://bugs.webkit.org/show_bug.cgi?id=222526.
+
+ * test262/expectations.yaml:
+ * test262/latest-changes-summary.txt:
+ * test262/test/built-ins/Array/prototype/sort/call-with-primitive.js: Added.
+ * test262/test/built-ins/Function/internals/Call/class-ctor-realm.js:
+ * test262/test/language/expressions/object/dstr/object-rest-proxy-get-not-called-on-dontenum-keys.js: Added.
+ (getOwnPropertyDescriptor):
+ (ownKeys):
+ * test262/test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js: Added.
+ (getOwnPropertyDescriptor):
+ (ownKeys):
+ * test262/test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js: Added.
+ (getOwnPropertyDescriptor):
+ (ownKeys):
+ * test262/test/language/expressions/object/object-spread-proxy-no-excluded-keys.js: Copied from JSTests/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js.
+ (getOwnPropertyDescriptor):
+ (ownKeys):
+ * test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js:
+ * test262/test/language/statements/class/constructor-inferred-observable-iteration.js: Removed.
+ * test262/test/language/statements/class/subclass/default-constructor-spread-override.js:
+ (Array.prototype.Symbol.iterator):
+ (Base):
+ * test262/test262-Revision.txt:
+
2021-03-03 Caio Lima <ticaiol...@gmail.com>
[ESNext] Private methods can't be named as '#constructor'
Modified: trunk/JSTests/test262/expectations.yaml (273873 => 273874)
--- trunk/JSTests/test262/expectations.yaml 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/expectations.yaml 2021-03-04 06:13:44 UTC (rev 273874)
@@ -606,9 +606,6 @@
test/built-ins/Date/UTC/fp-evaluation-order.js:
default: 'Test262Error: order of operations / precision in MakeTime Expected SameValue(«NaN», «29312») to be true'
strict mode: 'Test262Error: order of operations / precision in MakeTime Expected SameValue(«NaN», «29312») to be true'
-test/built-ins/Function/internals/Call/class-ctor-realm.js:
- default: 'Test262Error: Expected a TypeError but got a TypeError'
- strict mode: 'Test262Error: Expected a TypeError but got a TypeError'
test/built-ins/Function/internals/Construct/derived-return-val-realm.js:
default: 'Test262Error: Expected a TypeError but got a TypeError'
strict mode: 'Test262Error: Expected a TypeError but got a TypeError'
@@ -1724,6 +1721,9 @@
test/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js:
default: 'Test262Error: Expected a SyntaxError but got a ReferenceError'
strict mode: 'Test262Error: Expected a SyntaxError but got a ReferenceError'
+test/language/statements/class/subclass/default-constructor-spread-override.js:
+ default: 'RangeError: Maximum call stack size exceeded.'
+ strict mode: 'RangeError: Maximum call stack size exceeded.'
test/language/statements/const/dstr/ary-init-iter-get-err-array-prototype.js:
default: 'TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function'
strict mode: 'TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function'
Modified: trunk/JSTests/test262/latest-changes-summary.txt (273873 => 273874)
--- trunk/JSTests/test262/latest-changes-summary.txt 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/latest-changes-summary.txt 2021-03-04 06:13:44 UTC (rev 273874)
@@ -1,18 +1,9 @@
-A test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js
-A test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js
-A test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js
-A test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js
-A test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js
-A test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js
-A test/built-ins/Object/assign/target-is-sealed-existing-data-property.js
-A test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js
-A test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js
-A test/built-ins/Object/seal/proxy-with-defineProperty-handler.js
-M test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js
-M test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js
-A test/intl402/DateTimeFormat/constructor-no-instanceof.js
-A test/intl402/DateTimeFormat/prototype/format/no-instanceof.js
-A test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js
-A test/intl402/NumberFormat/constructor-no-instanceof.js
-A test/intl402/NumberFormat/prototype/format/no-instanceof.js
-A test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js
\ No newline at end of file
+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
Added: trunk/JSTests/test262/test/built-ins/Array/prototype/sort/call-with-primitive.js (0 => 273874)
--- trunk/JSTests/test262/test/built-ins/Array/prototype/sort/call-with-primitive.js (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Array/prototype/sort/call-with-primitive.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -0,0 +1,30 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-array.prototype.sort
+description: >
+ This value is coerced to an object.
+info: |
+ Array.prototype.sort ( comparefn )
+
+ [...]
+ 2. Let obj be ? ToObject(this value).
+ [...]
+ 12. Return obj.
+features: [Symbol, BigInt]
+---*/
+
+assert.throws(TypeError, function() {
+ [].sort.call(undefined);
+}, "undefined");
+
+assert.throws(TypeError, function() {
+ [].sort.call(null);
+}, "null");
+
+assert([].sort.call(false) instanceof Boolean, "boolean");
+assert([].sort.call(0) instanceof Number, "number");
+assert([].sort.call("") instanceof String, "string");
+assert([].sort.call(Symbol()) instanceof Symbol, "symbol");
+assert([].sort.call(0n) instanceof BigInt, "bigint");
Modified: trunk/JSTests/test262/test/built-ins/Function/internals/Call/class-ctor-realm.js (273873 => 273874)
--- trunk/JSTests/test262/test/built-ins/Function/internals/Call/class-ctor-realm.js 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/test/built-ins/Function/internals/Call/class-ctor-realm.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -3,17 +3,15 @@
/*---
esid: sec-ecmascript-function-objects-call-thisargument-argumentslist
description: >
- Error when invoking a class constructor (honoring the Realm of the current
- execution context)
-info: |
- [...]
- 2. If F's [[FunctionKind]] internal slot is "classConstructor", throw a
- TypeError exception.
+ Error when invoking a default class constructor, honoring the Realm
+ that the class was defined in.
features: [cross-realm, class]
---*/
-var C = $262.createRealm().global.eval('0, class {}');
+const realm = $262.createRealm();
+const C = realm.global.eval('(class {})');
+const TE = realm.global.eval('TypeError');
-assert.throws(TypeError, function() {
+assert.throws(TE, function() {
C();
});
Added: trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-get-not-called-on-dontenum-keys.js (0 => 273874)
--- trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-get-not-called-on-dontenum-keys.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-get-not-called-on-dontenum-keys.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -0,0 +1,69 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization
+description: >
+ Proxy's "get" trap is not invoked for non-enumerable keys.
+info: |
+ BindingRestProperty : ... BindingIdentifier
+
+ [...]
+ 3. Perform ? CopyDataProperties(restObj, value, excludedNames).
+
+ CopyDataProperties ( target, source, excludedItems )
+
+ [...]
+ 5. Let keys be ? from.[[OwnPropertyKeys]]().
+ 6. For each element nextKey of keys in List order, do
+ [...]
+ c. If excluded is false, then
+ i. Let desc be ? from.[[GetOwnProperty]](nextKey).
+ ii. If desc is not undefined and desc.[[Enumerable]] is true, then
+ 1. Let propValue be ? Get(from, nextKey).
+ 2. Perform ! CreateDataPropertyOrThrow(target, nextKey, propValue).
+
+ [[OwnPropertyKeys]] ( )
+
+ [...]
+ 7. Let trapResultArray be ? Call(trap, handler, « target »).
+ 8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String, Symbol »).
+ [...]
+ 23. Return trapResult.
+features: [object-rest, destructuring-binding, Proxy, Symbol]
+includes: [compareArray.js, propertyHelper.js]
+---*/
+
+var VALUE_GOPD = "VALUE_GOPD";
+var VALUE_GET = "VALUE_GET";
+
+var dontEnumSymbol = Symbol("dont_enum_symbol");
+var enumerableSymbol = Symbol("enumerable_symbol");
+
+var dontEnumKeys = [dontEnumSymbol, "dontEnumString", "0"];
+var enumerableKeys = [enumerableSymbol, "enumerableString", "1"];
+var ownKeysResult = [...dontEnumKeys, ...enumerableKeys];
+
+var getOwnKeys = [];
+var getKeys = [];
+var proxy = new Proxy({}, {
+ getOwnPropertyDescriptor: function(_target, key) {
+ getOwnKeys.push(key);
+ var isEnumerable = enumerableKeys.indexOf(key) !== -1;
+ return {value: VALUE_GOPD, writable: false, enumerable: isEnumerable, configurable: true};
+ },
+ get: function(_target, key) {
+ getKeys.push(key);
+ return VALUE_GET;
+ },
+ ownKeys: function() {
+ return ownKeysResult;
+ },
+});
+
+var {...rest} = proxy;
+assert.compareArray(getOwnKeys, ownKeysResult);
+assert.compareArray(getKeys, enumerableKeys);
+
+verifyProperty(rest, enumerableSymbol, {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
+verifyProperty(rest, "enumerableString", {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
+verifyProperty(rest, "1", {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
Added: trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js (0 => 273874)
--- trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -0,0 +1,53 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization
+description: >
+ Proxy's "getOwnPropertyDescriptor" trap is not invoked for excluded keys.
+info: |
+ BindingRestProperty : ... BindingIdentifier
+
+ [...]
+ 3. Perform ? CopyDataProperties(restObj, value, excludedNames).
+
+ CopyDataProperties ( target, source, excludedItems )
+
+ [...]
+ 5. Let keys be ? from.[[OwnPropertyKeys]]().
+ 6. For each element nextKey of keys in List order, do
+ b. For each element e of excludedItems, do
+ i. If SameValue(e, nextKey) is true, then
+ 1. Set excluded to true.
+ c. If excluded is false, then
+ i. Let desc be ? from.[[GetOwnProperty]](nextKey).
+
+ [[OwnPropertyKeys]] ( )
+
+ [...]
+ 7. Let trapResultArray be ? Call(trap, handler, « target »).
+ 8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String, Symbol »).
+ [...]
+ 23. Return trapResult.
+features: [object-rest, destructuring-binding, Proxy, Symbol]
+includes: [compareArray.js]
+---*/
+
+var excludedSymbol = Symbol("excluded_symbol");
+var includedSymbol = Symbol("included_symbol");
+
+var excludedKeys = [excludedSymbol, "excludedString", "0"];
+var includedKeys = [includedSymbol, "includedString", "1"];
+var ownKeysResult = [...excludedKeys, ...includedKeys];
+
+var getOwnKeys = [];
+var proxy = new Proxy({}, {
+ getOwnPropertyDescriptor: function(_target, key) {
+ getOwnKeys.push(key);
+ },
+ ownKeys: function() {
+ return ownKeysResult;
+ },
+});
+
+var {[excludedSymbol]: _, excludedString, 0: excludedIndex, ...rest} = proxy;
+assert.compareArray(getOwnKeys, includedKeys);
Added: trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js (0 => 273874)
--- trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -0,0 +1,71 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-object-initializer-runtime-semantics-propertydefinitionevaluation
+description: >
+ Proxy's "get" trap is not invoked for non-enumerable keys.
+info: |
+ PropertyDefinition : ... AssignmentExpression
+
+ [...]
+ 3. Let excludedNames be a new empty List.
+ 4. Return ? CopyDataProperties(object, fromValue, excludedNames).
+
+ CopyDataProperties ( target, source, excludedItems )
+
+ [...]
+ 5. Let keys be ? from.[[OwnPropertyKeys]]().
+ 6. For each element nextKey of keys in List order, do
+ [...]
+ c. If excluded is false, then
+ i. Let desc be ? from.[[GetOwnProperty]](nextKey).
+ ii. If desc is not undefined and desc.[[Enumerable]] is true, then
+ 1. Let propValue be ? Get(from, nextKey).
+ 2. Perform ! CreateDataPropertyOrThrow(target, nextKey, propValue).
+
+ [[OwnPropertyKeys]] ( )
+
+ [...]
+ 7. Let trapResultArray be ? Call(trap, handler, « target »).
+ 8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String, Symbol »).
+ [...]
+ 23. Return trapResult.
+features: [object-spread, Proxy, Symbol]
+includes: [compareArray.js, propertyHelper.js]
+---*/
+
+var VALUE_LITERAL = "VALUE_LITERAL";
+var VALUE_GOPD = "VALUE_GOPD";
+var VALUE_GET = "VALUE_GET";
+
+var dontEnumSymbol = Symbol("dont_enum_symbol");
+var enumerableSymbol = Symbol("enumerable_symbol");
+
+var dontEnumKeys = [dontEnumSymbol, "dontEnumString", "0"];
+var enumerableKeys = [enumerableSymbol, "enumerableString", "1"];
+var ownKeysResult = [...dontEnumKeys, ...enumerableKeys];
+
+var getOwnKeys = [];
+var getKeys = [];
+var proxy = new Proxy({}, {
+ getOwnPropertyDescriptor: function(_target, key) {
+ getOwnKeys.push(key);
+ var isEnumerable = enumerableKeys.indexOf(key) !== -1;
+ return {value: VALUE_GOPD, writable: false, enumerable: isEnumerable, configurable: true};
+ },
+ get: function(_target, key) {
+ getKeys.push(key);
+ return VALUE_GET;
+ },
+ ownKeys: function() {
+ return ownKeysResult;
+ },
+});
+
+var result = {[enumerableSymbol]: VALUE_LITERAL, enumerableString: VALUE_LITERAL, [1]: VALUE_LITERAL, ...proxy};
+assert.compareArray(getOwnKeys, ownKeysResult);
+assert.compareArray(getKeys, enumerableKeys);
+
+verifyProperty(result, enumerableSymbol, {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
+verifyProperty(result, "enumerableString", {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
+verifyProperty(result, "1", {value: VALUE_GET, writable: true, enumerable: true, configurable: true});
Copied: trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-no-excluded-keys.js (from rev 273870, trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js) (0 => 273874)
--- trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-no-excluded-keys.js (rev 0)
+++ trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-no-excluded-keys.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-object-initializer-runtime-semantics-propertydefinitionevaluation
+description: >
+ Proxy's "getOwnPropertyDescriptor" trap is invoked for all keys.
+info: |
+ PropertyDefinition : ... AssignmentExpression
+
+ [...]
+ 3. Let excludedNames be a new empty List.
+ 4. Return ? CopyDataProperties(object, fromValue, excludedNames).
+
+ CopyDataProperties ( target, source, excludedItems )
+
+ [...]
+ 5. Let keys be ? from.[[OwnPropertyKeys]]().
+ 6. For each element nextKey of keys in List order, do
+ [...]
+ c. If excluded is false, then
+ i. Let desc be ? from.[[GetOwnProperty]](nextKey).
+
+ [[OwnPropertyKeys]] ( )
+
+ [...]
+ 7. Let trapResultArray be ? Call(trap, handler, « target »).
+ 8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String, Symbol »).
+ [...]
+ 23. Return trapResult.
+features: [object-spread, Proxy, Symbol]
+includes: [compareArray.js]
+---*/
+
+var sym = Symbol();
+var getOwnKeys = [];
+var ownKeysResult = [sym, "foo", "0"];
+var proxy = new Proxy({}, {
+ getOwnPropertyDescriptor: function(_target, key) {
+ getOwnKeys.push(key);
+ },
+ ownKeys: function() {
+ return ownKeysResult;
+ },
+});
+
+({[sym]: 0, foo: 0, [0]: 0, ...proxy});
+assert.compareArray(getOwnKeys, ownKeysResult);
Modified: trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js (273873 => 273874)
--- trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -8,6 +8,7 @@
PropertyDefinition : ... AssignmentExpression
[...]
+ 3. Let excludedNames be a new empty List.
4. Return ? CopyDataProperties(object, fromValue, excludedNames).
CopyDataProperties ( target, source, excludedItems )
Deleted: trunk/JSTests/test262/test/language/statements/class/constructor-inferred-observable-iteration.js (273873 => 273874)
--- trunk/JSTests/test262/test/language/statements/class/constructor-inferred-observable-iteration.js 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/test/language/statements/class/constructor-inferred-observable-iteration.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -1,47 +0,0 @@
-// Copyright (C) 2016 the V8 project authors. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-esid: sec-runtime-semantics-classdefinitionevaluation
-es6id: 14.5.14
-description: >
- Observable iteration of arguments during execution of "inferred" constructor
-info: |
- [...]
- 10. If constructor is empty, then
- a. If ClassHeritageopt is present and superclass is not null, then
- i. Let constructor be the result of parsing the source text
-
- constructor(... args){ super (...args);}
-
- using the syntactic grammar with the goal symbol MethodDefinition[~Yield].
-features: [Symbol.iterator]
----*/
-
-var otherIterator = ['fifth', 'sixth', 'seventh'][Symbol.iterator]();
-var spread, parentArgs;
-function Parent() {
- parentArgs = arguments;
-}
-class C extends Parent {}
-
-Array.prototype[Symbol.iterator] = function() {
- spread = this;
- return otherIterator;
-};
-
-new C('first', 'second', 'third', 'fourth');
-
-assert.sameValue(Object.getPrototypeOf(spread), Array.prototype);
-assert.sameValue(spread.length, 4);
-assert.sameValue(spread[0], 'first');
-assert.sameValue(spread[1], 'second');
-assert.sameValue(spread[2], 'third');
-assert.sameValue(spread[3], 'fourth');
-
-assert.sameValue(
- typeof parentArgs, 'object', 'parent arguments object'
-);
-assert.sameValue(parentArgs.length, 3);
-assert.sameValue(parentArgs[0], 'fifth');
-assert.sameValue(parentArgs[1], 'sixth');
-assert.sameValue(parentArgs[2], 'seventh');
Modified: trunk/JSTests/test262/test/language/statements/class/subclass/default-constructor-spread-override.js (273873 => 273874)
--- trunk/JSTests/test262/test/language/statements/class/subclass/default-constructor-spread-override.js 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/test/language/statements/class/subclass/default-constructor-spread-override.js 2021-03-04 06:13:44 UTC (rev 273874)
@@ -4,52 +4,22 @@
/*---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
- Default class constructor uses standard iterator spread semantics.
-info: |
- 14.5.14 Runtime Semantics: ClassDefinitionEvaluation
- ...
- 10. If constructor is empty, then
- a. If ClassHeritageopt is present, then
- i Let constructor be the result of parsing the source text
- constructor(...args){ super(...args); }
- using the syntactic grammar with the goal symbol MethodDefinition.
- ...
-
- 14.1.19 Runtime Semantics: IteratorBindingInitialization
- `FunctionRestParameter : BindingRestElement`
- 1. Let result be IteratorBindingInitialization of BindingRestElement with arguments iteratorRecord and environment.
-
- 13.3.3.6 Runtime Semantics: IteratorBindingInitialization
- `BindingRestElement : ...BindingIdentifier`
- ...
- 2. Let A be ArrayCreate(0).
- ...
-
- 12.3.6.1 Runtime Semantics: ArgumentListEvaluation
- `ArgumentList : ArgumentList , ...AssignmentExpression`
- ...
- 3. Let iterator be ? GetIterator(? GetValue(spreadRef)).
- ...
+ Default class constructor does not use argument evaluation.
features: [Symbol.iterator]
---*/
-var arrayIterator = Array.prototype[Symbol.iterator];
-
-// Redefine Array iterator to change the result of spreading `args` in `super(...args)`.
Array.prototype[Symbol.iterator] = function() {
- return arrayIterator.call(["spread-value"]);
+ $ERROR('@@iterator invoked');
};
-var receivedValue;
-
class Base {
constructor(value) {
- receivedValue = value;
+ this.value = value;
}
}
class Derived extends Base {}
-new Derived();
+const instance = new Derived(5);
-assert.sameValue(receivedValue, "spread-value");
+assert.sameValue(instance.value, 5);
Modified: trunk/JSTests/test262/test262-Revision.txt (273873 => 273874)
--- trunk/JSTests/test262/test262-Revision.txt 2021-03-04 05:59:26 UTC (rev 273873)
+++ trunk/JSTests/test262/test262-Revision.txt 2021-03-04 06:13:44 UTC (rev 273874)
@@ -1,2 +1,2 @@
test262 remote url: g...@github.com:tc39/test262.git
-test262 revision: f6034ebe9fb92d4d3dea644b9225bdc18b44a7ab
+test262 revision: c00087e12970388e7f9892da88d3c082b31c0431