Add missing Symbol features flags

This commit is contained in:
Leo Balter 2017-09-07 15:06:13 -04:00 committed by Rick Waldron
parent be420f34f0
commit c41faf1aca
100 changed files with 100 additions and 16 deletions

View File

@ -12,7 +12,7 @@ info: |
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
features: [object-spread]
features: [object-spread, Symbol]
flags: [noStrict, async]
---*/

View File

@ -6,7 +6,7 @@ desc: >
RestBindingInitialization creates a new object if lhs is a Symbol
template: default
esid: pending
features: [object-rest]
features: [object-rest, Symbol]
---*/
//- setup

View File

@ -7,6 +7,7 @@ desc: >
iterable values and throws for Symbol values.
template: error
es6id: 12.14.5.2
features: [Symbol]
---*/
//- setup

View File

@ -6,7 +6,7 @@ desc: >
RestBindingInitialization creates a new object if lhs is a Symbol
template: default
esid: pending
features: [object-rest]
features: [Symbol, object-rest]
---*/
//- setup

View File

@ -12,7 +12,7 @@ info: |
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
features: [object-spread]
features: [Symbol, object-spread]
flags: [noStrict]
---*/

View File

@ -15,7 +15,7 @@ info: |
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
features: [object-spread]
features: [Symbol, object-spread]
---*/
//- setup

View File

@ -14,7 +14,7 @@ info: |
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
features: [object-spread]
features: [Symbol, object-spread]
---*/
//- setup

View File

@ -14,7 +14,7 @@ info: |
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
features: [object-spread]
features: [Symbol, object-spread]
---*/
//- setup

View File

@ -12,6 +12,7 @@ info: >
...
1. If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception.
...
features: [Symbol]
---*/
var sample = [1, 2, 3];

View File

@ -21,6 +21,7 @@ info: >
4. If C is undefined, return defaultConstructor.
5. If Type(C) is not Object, throw a TypeError exception.
...
features: [Symbol]
---*/
var arrayBuffer = new ArrayBuffer(8);

View File

@ -5,6 +5,7 @@ esid: sec-toboolean
es6id: 7.1.2
description: >
Boolean coercion operations on Symbols
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -19,7 +19,7 @@ info: |
...
4. Let numberIndex be ? ToNumber(requestIndex).
...
features: [SharedArrayBuffer]
features: [SharedArrayBuffer, Symbol]
---*/
var buffer = new SharedArrayBuffer(1);

View File

@ -27,7 +27,7 @@ info: |
...
8. If isLittleEndian is false, reverse the order of the elements of rawValue.
...
features: [SharedArrayBuffer]
features: [SharedArrayBuffer, Symbol]
---*/
var buffer = new SharedArrayBuffer(4);

View File

@ -16,7 +16,7 @@ info: |
11. Else,
a. Let viewByteLength be ? ToLength(byteLength).
...
features: [SharedArrayBuffer]
features: [SharedArrayBuffer, Symbol]
---*/
var buffer = new SharedArrayBuffer(8);

View File

@ -13,7 +13,7 @@ info: |
...
4. Let numberOffset be ? ToNumber(byteOffset).
...
features: [SharedArrayBuffer]
features: [SharedArrayBuffer, Symbol]
---*/
var s = Symbol("1");

View File

@ -11,6 +11,7 @@ info: >
14. If Type(targetName) is not String, let targetName be the empty string.
15. Perform SetFunctionName(F, targetName, "bound").
includes: [propertyHelper.js]
features: [Symbol]
---*/
var target;

View File

@ -14,6 +14,7 @@ info: >
...
includes: [propertyHelper.js]
features: [Symbol]
---*/
var descriptor = Object.getOwnPropertyDescriptor(Map.prototype, 'size');

View File

@ -5,6 +5,7 @@
description: Number,Boolean,Symbol cannot have own enumerable properties,
So cannot be Assigned.Here result should be original object.
es6id: 19.1.2.1.5.c
features: [Symbol]
---*/
var target = new Object();

View File

@ -5,6 +5,7 @@
description: Test the first argument(target) of Object.Assign(target,...sources),
if target is Symbol,the return value should be a new Symbol object whose [[SymbolData]] value is target.
es6id: 19.1.2.1.1
features: [Symbol]
---*/
var target = Symbol('foo');

View File

@ -4,6 +4,7 @@
es6id: 19.1.2.4
description: >
Symbol used as property for configurable data property definition
features: [Symbol]
---*/
var sym = Symbol();
var obj = {};

View File

@ -5,6 +5,7 @@ es6id: 19.1.2.4
description: >
Symbol used as property for property definition
flags: [noStrict]
features: [Symbol]
---*/
var sym = Symbol();
var obj = {};

View File

@ -5,6 +5,7 @@ es6id: 19.1.2.4
description: >
Symbol used as property for default data property definition
flags: [onlyStrict]
features: [Symbol]
---*/
var sym = Symbol();
var obj = {};

View File

@ -4,6 +4,7 @@
es6id: 19.1.2.4
description: >
Symbol used as property for writable data property definition
features: [Symbol]
---*/
var sym = Symbol();
var obj = {};

View File

@ -5,6 +5,7 @@ es6id: 19.1.2.5
description: >
Frozen object contains symbol properties.
flags: [noStrict]
features: [Symbol]
---*/
var sym = Symbol();
var obj = {};

View File

@ -5,6 +5,7 @@ es6id: 19.1.2.5
description: >
Frozen object contains symbol properties.
flags: [onlyStrict]
features: [Symbol]
---*/
var sym = Symbol("66");
var obj = {};

View File

@ -4,6 +4,7 @@
es6id: 19.1.2.8
description: >
Object.getOwnPropertySymbols returns all symbol properties that have descriptions
features: [Symbol]
---*/
var sym = Symbol("description");

View File

@ -4,6 +4,7 @@
es6id: 19.1.2.8
description: >
Object.getOwnPropertySymbols returns all symbol properties that do not have descriptions
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -10,6 +10,7 @@ description: >
a. If x and y are both the same Symbol value,
return true; otherwise, return false.
...
features: [Symbol]
---*/
assert.sameValue(

View File

@ -10,6 +10,7 @@ description: >
a. If x and y are both the same Symbol value,
return true; otherwise, return false.
...
features: [Symbol]
---*/
var a = Symbol();

View File

@ -4,6 +4,7 @@
es6id: 7.2.
description: >
Object.is/SameValue: Symbol
features: [Symbol]
---*/
var symA = Symbol('66');
var symB = Symbol('66');

View File

@ -21,6 +21,7 @@ info: |
a. If Type(key) is String, then
i. Let desc be ? O.[[GetOwnProperty]](key).
...
features: [Symbol]
---*/
let log = [];

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Object.preventExtensions(obj) where obj contains symbol properties.
flags: [noStrict]
features: [Symbol]
---*/
var symA = Symbol("A");
var symB = Symbol("B");

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Object.preventExtensions(obj) where obj contains symbol properties.
flags: [onlyStrict]
features: [Symbol]
---*/
var symA = Symbol("A");
var symB = Symbol("B");

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.2
features: [Symbol]
---*/
var obj = {};

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.2
features: [Symbol]
---*/
var obj = {};

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.2
features: [Symbol]
---*/
var obj = {};

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.4
features: [Symbol]
---*/
var obj = {};

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.4
features: [Symbol]
---*/
var obj = {};

View File

@ -10,6 +10,7 @@ info: >
2. ReturnIfAbrupt(P).
...
es6id: 19.1.3.4
features: [Symbol]
---*/
var obj = {};

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Object.seal(obj) where obj contains symbol properties.
flags: [noStrict]
features: [Symbol]
---*/
var symA = Symbol("A");
var symB = Symbol("B");

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Object.seal(obj) where obj contains symbol properties.
flags: [onlyStrict]
features: [Symbol]
---*/
var symA = Symbol("A");
var symB = Symbol("B");

View File

@ -4,6 +4,7 @@
es6id: 19.1.1.1_S3
description: >
Object(sym) returns a fresh Symbol object
features: [Symbol]
---*/
var symA = Symbol('A');
var symB = Symbol();

View File

@ -9,6 +9,7 @@ info: >
...
9. If trapResult contains any duplicate entries, throw a TypeError exception.
features: [Symbol]
---*/
var s = Symbol();

View File

@ -8,6 +8,7 @@ description: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -8,6 +8,7 @@ description: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -8,6 +8,7 @@ description: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -13,6 +13,7 @@ description: >
1. If Type(set) is not Object, throw a TypeError exception.
...
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -11,6 +11,7 @@ description: >
Passing `symbol` as callback
features: [Symbol]
---*/
var s = new Set([1]);

View File

@ -8,6 +8,7 @@ description: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -8,6 +8,7 @@ description: >
...
6. Return false.
features: [Symbol]
---*/
var s = new Set();

View File

@ -10,6 +10,7 @@ description: >
a. If e is not empty and SameValueZero(e, value) is true, return true.
...
features: [Symbol]
---*/
var s = new Set();

View File

@ -8,6 +8,7 @@ description: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -9,6 +9,7 @@ description: >
6. For each e that is an element of entries
a. If e is not empty, set count to count+1.
features: [Symbol]
---*/
var s = new Set();

View File

@ -9,6 +9,7 @@ description: >
6. For each e that is an element of entries
a. If e is not empty, set count to count+1.
features: [Symbol]
---*/
var s = new Set([0, undefined, false, NaN, null, "", Symbol()]);

View File

@ -13,6 +13,7 @@ description: >
1. If Type(set) is not Object, throw a TypeError exception.
...
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -4,7 +4,7 @@
es6id: 19.4
description: >
Symbol as Set entry
features: [Set]
features: [Symbol, Set]
---*/
var set = new Set();
var sym = Symbol();

View File

@ -18,7 +18,7 @@ info: >
1. Let obj be ? OrdinaryCreateFromConstructor(constructor, "%SharedArrayBufferPrototype%",
«[[ArrayBufferData]], [[ArrayBufferByteLength]]» ).
...
features: [Reflect.construct]
features: [Symbol, Reflect.construct]
---*/
function newTarget() { }

View File

@ -3,6 +3,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Throws a TypeError exception when `this` is not Object
features: [Symbol]
---*/
var getter = Object.getOwnPropertyDescriptor(

View File

@ -7,6 +7,7 @@ description: >
Throws a TypeError if `this` is not an Object.
info: >
SharedArrayBuffer.prototype.slice ( start, end )
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -8,6 +8,7 @@ description: >
info: >
SharedArrayBuffer.prototype.slice ( start, end )
features: [Symbol]
---*/
var arrayBuffer = new SharedArrayBuffer(8);

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Symbol ToObject auto-boxing
flags: [noStrict]
features: [Symbol]
---*/
var sym = Symbol('66');

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Symbol ToObject auto-boxing
flags: [onlyStrict]
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -4,6 +4,7 @@
es6id: 19.4.3.1
description: >
Symbol constructor
features: [Symbol]
---*/
assert.sameValue(
Object.getPrototypeOf(Symbol('66')).constructor,

View File

@ -10,6 +10,7 @@ info: |
2. Else, let descString be ? ToString(description).
3. Return a new unique Symbol value whose [[Description]] value is
descString.
features: [Symbol]
---*/
var s = Symbol('1');

View File

@ -10,6 +10,7 @@ info: |
2. Else, let descString be ? ToString(description).
3. Return a new unique Symbol value whose [[Description]] value is
descString.
features: [Symbol]
---*/
var calls, val;

View File

@ -15,6 +15,7 @@ info: >
5. Append the Record { [[Key]]: stringKey, [[Symbol]]: newSymbol } to the
GlobalSymbolRegistry List.
6. Return newSymbol.
features: [Symbol]
---*/
var canonical = Symbol.for('s');

View File

@ -6,6 +6,7 @@ es6id: 19.4.2.1
description: Error resulting from string coercion of first argument
info: >
1. Let stringKey be ? ToString(key).
features: [Symbol]
---*/
var subject = {

View File

@ -6,6 +6,7 @@ es6id: 19.4.1
description: The Symbol constructor may not be invoked with `new`
info: |
1. If NewTarget is not undefined, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -6,6 +6,7 @@ es6id: 19.4.2.5
description: Called with a non-symbol argument
info: >
1. If Type(sym) is not Symbol, throw a TypeError exception.
features: [Symbol]
---*/
assert.sameValue(typeof Symbol.keyFor, 'function');

View File

@ -12,6 +12,7 @@ info: >
3. Assert: GlobalSymbolRegistry does not currently contain an entry for
sym.
4. Return undefined.
features: [Symbol]
---*/
var constructed = Symbol('Symbol.iterator');

View File

@ -4,6 +4,7 @@
es6id: 19.4.3
description: >
Symbol prototype
features: [Symbol]
---*/
assert.sameValue(
Object.getPrototypeOf(Symbol('66')),

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Symbol property get and set, non-strict
flags: [noStrict]
features: [Symbol]
---*/
var sym = Symbol('66');

View File

@ -5,6 +5,7 @@ es6id: 19.4
description: >
Symbol property get and set, strict
flags: [onlyStrict]
features: [Symbol]
---*/
var sym = Symbol("66");

View File

@ -4,6 +4,7 @@
es6id: 19.4.3.2
description: >
toString operations on Symbols
features: [Symbol]
---*/
assert.sameValue(
String(Symbol('66')),

View File

@ -18,6 +18,7 @@ info: |
3. If desc is undefined, let desc be the empty string.
4. Assert: Type(desc) is String.
5. Return the result of concatenating the strings "Symbol(", desc, and ")".
features: [Symbol]
---*/
assert.sameValue(Symbol().toString(), 'Symbol()', 'implicit value');

View File

@ -10,6 +10,7 @@ info: |
3. If Type(s) is not Object, throw a TypeError exception.
4. If s does not have a [[SymbolData]] internal slot, throw a TypeError exception.
5. Return the value of s's [[SymbolData]] internal slot.
features: [Symbol]
---*/
var valueOf = Symbol.prototype.valueOf;

View File

@ -7,6 +7,7 @@ description: Called on a Symbol value
info: |
1. Let s be the this value.
2. If Type(s) is Symbol, return s.
features: [Symbol]
---*/
var valueOf = Symbol.prototype.valueOf;

View File

@ -10,6 +10,7 @@ info: |
2. Else, let descString be ? ToString(description).
3. Return a new unique Symbol value whose [[Description]] value is
descString.
features: [Symbol]
---*/
assert.notSameValue(Symbol(''), Symbol(''), 'empty string');

View File

@ -16,7 +16,7 @@ info: >
7. Let offset be ? ToInteger(byteOffset).
...
includes: [testTypedArray.js]
features: [SharedArrayBuffer]
features: [Symbol, SharedArrayBuffer]
---*/
var byteOffset = Symbol("1");

View File

@ -17,7 +17,7 @@ info: >
a. Let newLength be ? ToLength(length).
...
includes: [testTypedArray.js]
features: [SharedArrayBuffer]
features: [Symbol, SharedArrayBuffer]
---*/
var buffer = new SharedArrayBuffer(8);

View File

@ -13,6 +13,7 @@ info: >
slot.
5. If Type(key) is not Object, return undefined.
...
features: [Symbol]
---*/
var map = new WeakMap();

View File

@ -9,6 +9,7 @@ info: >
1. Let S be the this value.
2. If Type(S) is not Object, throw a TypeError exception.
features: [Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -5,7 +5,7 @@ es6id: 23.4.3.1_S2
esid: sec-weakset.prototype.add
description: >
Symbol may not be used as a WeakSet entry
features: [WeakSet]
features: [Symbol, WeakSet]
---*/
var weakset = new WeakSet();
var sym = Symbol();

View File

@ -5,6 +5,7 @@
description: >
The desc argument should be an object or undefined
includes: [propertyHelper.js,sta.js]
features: [Symbol]
---*/
var sample = { foo: 42 };

View File

@ -5,6 +5,7 @@
description: >
verifyProperty allows restoring the original accessor descriptor
includes: [propertyHelper.js]
features: [Symbol]
---*/
var obj;

View File

@ -5,6 +5,7 @@
description: >
verifyProperty allows restoring the original descriptor
includes: [propertyHelper.js]
features: [Symbol]
---*/
var obj;

View File

@ -5,6 +5,7 @@
description: >
Verify symbol named property descriptor
includes: [propertyHelper.js]
features: [Symbol]
---*/
var obj;

View File

@ -5,6 +5,7 @@ es6id: 12.2.5
description: >
computed property names can be a symbol
includes: [compareArray.js]
features: [Symbol]
---*/
function ID(x) {

View File

@ -5,6 +5,7 @@ es6id: 12.2.5
description: >
computed property class method names can be a symbol
includes: [compareArray.js]
features: [Symbol]
---*/
function ID(x) {

View File

@ -5,6 +5,7 @@ es6id: 12.2.5
description: >
In a class, static computed property method names can be a symbol
includes: [compareArray.js]
features: [Symbol]
---*/
var sym1 = Symbol();
var sym2 = Symbol();

View File

@ -5,6 +5,7 @@ es6id: 12.2.5
description: >
computed property method names can be a symbol
includes: [compareArray.js]
features: [Symbol]
---*/
function ID(x) {

View File

@ -4,6 +4,7 @@
es6id: 12.12.3
description: >
Conditional Symbol evaluation
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -4,6 +4,7 @@
es6id: 7.2.12
description: >
Abstract Equality Comparison: Symbol
features: [Symbol]
---*/
var symA = Symbol('66');
var symB = Symbol('66');

View File

@ -4,6 +4,7 @@
es6id: 7.2.13
description: >
Strict Equality Comparison: Symbol
features: [Symbol]
---*/
var symA = Symbol('66');
var symB = Symbol('66');

View File

@ -4,6 +4,7 @@
es6id: 12.12.3
description: >
"Logical AND" Symbol evaluation
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -4,6 +4,7 @@
es6id: 12.5.12.1
description: >
"Logical Not" coercion operation on Symbols
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -4,6 +4,7 @@
es6id: 12.12.3
description: >
"Logical OR" Symbol evaluation
features: [Symbol]
---*/
var sym = Symbol();

View File

@ -25,6 +25,7 @@ info: |
a. If Type(propValue) is either Object or Null, then
i. Return object.[[SetPrototypeOf]](propValue).
b. Return NormalCompletion(empty).
features: [Symbol]
---*/
var obj;

View File

@ -5,6 +5,7 @@ es6id: 12.5.6.1
description: >
typeof Symbol() returns 'symbol'.
typeof Object(Symbol()) returns 'object'.
features: [Symbol]
---*/
assert.sameValue(typeof Symbol('A'), 'symbol', "`typeof Symbol('A')` is `'symbol'`");
assert.sameValue(typeof Symbol(), 'symbol', "`typeof Symbol()` is `'symbol'`");

View File

@ -13,6 +13,7 @@ description: >
`return Symbol();`
features: [Symbol]
---*/
class Base {
constructor() {}