Features: Proxy, Reflect (See pull/1643) (#1646)

Follow up to https://github.com/tc39/test262/pull/1643
This commit is contained in:
Rick Waldron 2018-07-20 18:42:39 -04:00 committed by Leo Balter
parent d817076ddb
commit 2d27462e70
374 changed files with 374 additions and 91 deletions

View File

@ -9,6 +9,7 @@ info: |
[[Call]] (thisArgument, argumentsList)
9. Return Call(trap, handler, «target, thisArgument, argArray»).
features: [Proxy]
---*/
var _target, _args, _handler, _context;

View File

@ -8,6 +8,7 @@ info: |
[[Call]] (thisArgument, argumentsList)
9. Return Call(trap, handler, «target, thisArgument, argArray»).
features: [Proxy]
---*/
var target = function(a, b) {

View File

@ -6,6 +6,7 @@ description: >
[[Call]] (thisArgument, argumentsList)
2. If handler is null, throw a TypeError exception.
features: [Proxy]
---*/

View File

@ -4,6 +4,7 @@
es6id: 9.5.13
description: >
Return is an abrupt completion
features: [Proxy]
---*/
var target = function(a, b) {

View File

@ -6,7 +6,7 @@ es6id: 9.5.13
description: >
Throws if trap is not callable (honoring the Realm of the current execution
context)
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -4,6 +4,7 @@
es6id: 9.5.13
description: >
Throws if trap is not callable.
features: [Proxy]
---*/
var p = new Proxy(function() {}, {

View File

@ -20,6 +20,7 @@ info: |
...
3. If func is either undefined or null, return undefined.
...
features: [Proxy]
---*/
var calls = 0;

View File

@ -20,6 +20,7 @@ info: |
...
3. If func is either undefined or null, return undefined.
...
features: [Proxy]
---*/
var calls = 0;

View File

@ -20,6 +20,7 @@ info: |
...
3. If func is either undefined or null, return undefined.
...
features: [Proxy]
---*/
var calls = 0;

View File

@ -11,7 +11,7 @@ info: |
[[Construct]] (argumentsList, newTarget)
9. Let newObj be Call(trap, handler, «target, argArray, newTarget»).
features: [Reflect.construct]
features: [Proxy, Reflect, Reflect.construct]
---*/
function Target() {}

View File

@ -10,6 +10,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
9. Let newObj be Call(trap, handler, «target, argArray, newTarget »).
features: [Proxy]
---*/
var _target, _handler, _args, _P;

View File

@ -8,6 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
12. Return newObj
features: [Proxy]
---*/
function Target(a, b) {

View File

@ -6,6 +6,7 @@ description: >
[[Construct]] ( argumentsList, newTarget)
2. If handler is null, throw a TypeError exception.
features: [Proxy]
---*/

View File

@ -9,6 +9,7 @@ info: |
9. Let newObj be Call(trap, handler, «target, argArray, newTarget »).
10. ReturnIfAbrupt(newObj).
features: [Proxy]
---*/
function Target() {}

View File

@ -8,6 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
11. If Type(newObj) is not Object, throw a TypeError exception.
features: [Proxy]
---*/
function Target() {

View File

@ -8,6 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
11. If Type(newObj) is not Object, throw a TypeError exception.
features: [Proxy]
---*/
function Target() {

View File

@ -8,6 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
11. If Type(newObj) is not Object, throw a TypeError exception.
features: [Proxy]
---*/
function Target() {

View File

@ -8,7 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
11. If Type(newObj) is not Object, throw a TypeError exception.
features: [Symbol]
features: [Proxy, Symbol]
---*/
function Target() {

View File

@ -8,6 +8,7 @@ info: |
[[Construct]] ( argumentsList, newTarget)
11. If Type(newObj) is not Object, throw a TypeError exception.
features: [Proxy]
---*/
function Target() {

View File

@ -6,7 +6,7 @@ es6id: 9.5.14
description: >
Throws if trap is not callable (honoring the Realm of the current execution
context)
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -4,6 +4,7 @@
es6id: 9.5.14
description: >
Throws if trap is not callable.
features: [Proxy]
---*/
function Target() {}

View File

@ -21,7 +21,7 @@ info: |
...
3. If func is either undefined or null, return undefined.
...
features: [Reflect.construct]
features: [Proxy, Reflect, Reflect.construct]
---*/
var calls = 0;

View File

@ -10,7 +10,7 @@ info: |
7. If trap is undefined, then
b. Return Construct(target, argumentsList, newTarget).
features: [Reflect.construct]
features: [Proxy, Reflect, Reflect.construct]
---*/
var calls = 0;

View File

@ -20,7 +20,7 @@ info: |
a. Let realm be ? GetFunctionRealm(constructor).
b. Let proto be realm's intrinsic object named intrinsicDefaultProto.
[...]
features: [cross-realm, Reflect.construct]
features: [cross-realm, Proxy, Reflect, Reflect.construct]
---*/
var other = $262.createRealm().global;

View File

@ -21,7 +21,7 @@ info: |
...
3. If func is either undefined or null, return undefined.
...
features: [Reflect.construct]
features: [Proxy, Reflect, Reflect.construct]
---*/
var calls = 0;

View File

@ -5,6 +5,7 @@ es6id: 26.2.1
description: >
The Proxy constructor is the %Proxy% intrinsic object and the
initial value of the Proxy property of the global object.
features: [Proxy]
---*/
assert.sameValue(typeof Proxy, "function", "`typeof Proxy` is `'function'`");

View File

@ -9,6 +9,7 @@ description: >
[[ProxyHandler]] internal slot of handler is null, throw a
TypeError exception.
...
features: [Proxy]
---*/
var revocable = Proxy.revocable({}, {});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,6 +16,7 @@ info: |
tailPosition )
4. If IsCallable(func) is false, throw a TypeError exception.
features: [Proxy]
---*/
var p = new Proxy({}, {});

View File

@ -17,6 +17,7 @@ info: |
12.3.3.1.1 Runtime Semantics: EvaluateNew(constructProduction, arguments)
8. If IsConstructor (constructor) is false, throw a TypeError exception.
features: [Proxy]
---*/
var p = new Proxy(eval, {});

View File

@ -9,6 +9,7 @@ description: >
[[ProxyHandler]] internal slot of target is null, throw a
TypeError exception.
...
features: [Proxy]
---*/
var revocable = Proxy.revocable({}, {});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,7 @@ info: |
10. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P,
descObj»)).
...
features: [Proxy]
---*/
var _handler, _target, _prop, _desc;

View File

@ -21,7 +21,7 @@ info: |
2. Let obj be ObjectCreate(%ObjectPrototype%).
...
11. Return obj.
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -10,7 +10,7 @@ info: |
1. Assert: IsPropertyKey(P) is true.
2. Let handler be O.[[ProxyHandler]].
3. If handler is null, throw a TypeError exception.
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -4,6 +4,7 @@
es6id: 9.5.6
description: >
Throws a TypeError exception if handler is null.
features: [Proxy]
---*/
var p = Proxy.revocable({}, {});

View File

@ -6,7 +6,7 @@ description: >
If a property has a corresponding target object property then applying the
Property Descriptor of the property to the target object using
[[DefineOwnProperty]] will not throw an exception.
features: [Reflect]
features: [Proxy, Reflect]
includes: [propertyHelper.js]
---*/

View File

@ -12,6 +12,7 @@ info: |
descObj»)).
11. ReturnIfAbrupt(booleanTrapResult).
...
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -15,7 +15,7 @@ info: |
b. If settingConfigFalse is true and targetDesc.[[Configurable]] is
true, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
b. If settingConfigFalse is true and targetDesc.[[Configurable]] is
true, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -14,7 +14,7 @@ info: |
a. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc ,
targetDesc) is false, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
a. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc ,
targetDesc) is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -15,7 +15,7 @@ info: |
a. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc ,
targetDesc) is false, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
a. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc ,
targetDesc) is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -15,7 +15,7 @@ info: |
...
b. If settingConfigFalse is true, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
...
b. If settingConfigFalse is true, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -14,7 +14,7 @@ info: |
19. If targetDesc is undefined, then
a. If extensibleTarget is false, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -12,6 +12,7 @@ info: |
19. If targetDesc is undefined, then
a. If extensibleTarget is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -17,7 +17,7 @@ info: |
2. Let func be GetV(O, P).
5. If IsCallable(func) is false, throw a TypeError exception.
...
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -15,6 +15,7 @@ info: |
2. Let func be GetV(O, P).
5. If IsCallable(func) is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -12,6 +12,7 @@ info: |
a. Return target.[[DefineOwnProperty]](P, Desc).
...
includes: [propertyHelper.js]
features: [Proxy]
---*/
var target = {};

View File

@ -10,7 +10,7 @@ info: |
...
12. If booleanTrapResult is false, return false.
...
features: [Reflect]
features: [Proxy, Reflect]
---*/
var target = {};

View File

@ -6,7 +6,7 @@ description: >
[[Delete]] (P)
The result is a Boolean value.
features: [Reflect]
features: [Proxy, Reflect]
---*/
var target = {};

View File

@ -6,7 +6,7 @@ description: >
[[Delete]] (P)
The result is a Boolean value.
features: [Reflect]
features: [Proxy, Reflect]
---*/
var p = new Proxy({}, {

View File

@ -10,6 +10,7 @@ info: |
6.1.7.2 Object Internal Methods and Internal Slots
(...) Receiver is used as the this value when evaluating the code
features: [Proxy]
---*/
var _handler, _target, _prop;

View File

@ -6,6 +6,7 @@ description: >
[[Delete]] (P)
3. If handler is null, throw a TypeError exception.
features: [Proxy]
---*/
var p = Proxy.revocable({

View File

@ -7,6 +7,7 @@ description: >
11. If booleanTrapResult is false, return false.
flags: [noStrict]
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -7,7 +7,7 @@ description: >
11. If booleanTrapResult is false, return false.
flags: [onlyStrict]
features: [Reflect]
features: [Proxy, Reflect]
---*/
var p = new Proxy({}, {

View File

@ -7,6 +7,7 @@ description: >
info: |
9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)).
10. ReturnIfAbrupt(booleanTrapResult).
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -9,6 +9,7 @@ description: >
own property of the target object.
info: |
14. If targetDesc.[[Configurable]] is false, throw a TypeError exception.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Delete]] (P)
14. If targetDesc is undefined, return true.
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -15,7 +15,7 @@ info: |
7.3.9 GetMethod (O, P)
5. If IsCallable(func) is false, throw a TypeError exception.
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
7.3.9 GetMethod (O, P)
5. If IsCallable(func) is false, throw a TypeError exception.
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -7,6 +7,7 @@ description: >
8. If trap is undefined, then Return target.[[Delete]](P).
flags: [noStrict]
features: [Proxy]
---*/
var target = {

View File

@ -7,7 +7,7 @@ description: >
8. If trap is undefined, then Return target.[[Delete]](P).
flags: [onlyStrict]
features: [Reflect]
features: [Proxy, Reflect]
---*/
var target = {

View File

@ -5,7 +5,7 @@ esid: sec-proxy-object-internal-methods-and-internal-slots
description: >
Enumerate trap was removed and it should not be triggered anymore.
includes: [compareArray.js]
features: [Symbol.iterator]
features: [Proxy, Symbol, Symbol.iterator]
---*/
var x;

View File

@ -5,6 +5,7 @@ es6id: 26.2.2
description: >
The value of the [[Prototype]] internal slot of the Proxy
constructor is the intrinsic object %FunctionPrototype% (19.2.3).
features: [Proxy]
---*/
assert.sameValue(

View File

@ -16,7 +16,7 @@ info: |
throw a TypeError exception.
b. Let proxyTarget be the value of obj's [[ProxyTarget]] internal slot.
c. Return ? GetFunctionRealm(proxyTarget).
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var other = $262.createRealm().global;

View File

@ -13,6 +13,7 @@ info: |
is false and targetDesc.[[Get]] is undefined, then
i. If trapResult is not undefined, throw a TypeError exception.
features: [Proxy]
---*/
var target = {};

View File

@ -10,6 +10,7 @@ info: |
6.1.7.2 Object Internal Methods and Internal Slots
(...) Receiver is used as the this value when evaluating the code
features: [Proxy]
---*/
var _target, _handler, _prop, _receiver;

View File

@ -13,6 +13,7 @@ info: |
false and targetDesc.[[Writable]] is false, then
i. If SameValue(trapResult, targetDesc.[[Value]]) is false, throw a
TypeError exception.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
2. If handler is null, throw a TypeError exception.
features: [Proxy]
---*/
var p = Proxy.revocable({}, {});

View File

@ -9,6 +9,7 @@ info: |
9. Let trapResult be Call(trap, handler, «target, P, Receiver»).
10. ReturnIfAbrupt(trapResult).
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
14. Return trapResult.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
14. Return trapResult.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
14. Return trapResult.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
14. Return trapResult.
features: [Proxy]
---*/
var target = {};

View File

@ -15,6 +15,7 @@ info: |
TypeError exception.
...
14. Return trapResult.
features: [Proxy]
---*/
var target = {};

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
14. Return trapResult.
features: [Proxy]
---*/
var target = {

View File

@ -15,7 +15,7 @@ info: |
7.3.9 GetMethod (O, P)
5. If IsCallable(func) is false, throw a TypeError exception.
features: [cross-realm]
features: [cross-realm, Proxy]
---*/
var OProxy = $262.createRealm().global.Proxy;

View File

@ -13,6 +13,7 @@ info: |
7.3.9 GetMethod (O, P)
5. If IsCallable(func) is false, throw a TypeError exception.
features: [Proxy]
---*/
var p = new Proxy({}, {

View File

@ -6,6 +6,7 @@ description: >
[[Get]] (P, Receiver)
8. If trap is undefined, then return target.[[Get]](P, Receiver).
features: [Proxy]
---*/
var target = {

View File

@ -10,6 +10,7 @@ info: |
7. If trap is undefined, then
a. Return ? target.[[Get]](P, Receiver).
features: [Proxy]
---*/
var target = {

View File

@ -7,6 +7,7 @@ description: >
8. If trap is undefined, then return target.[[Get]](P, Receiver).
features: [Proxy]
---*/
var target = {

View File

@ -10,6 +10,7 @@ info: |
...
9. Let trapResultObj be Call(trap, handler, «target, P»).
...
features: [Proxy]
---*/
var _target, _handler, _prop;

View File

@ -4,6 +4,7 @@
es6id: 9.5.5
description: >
Throws a TypeError exception if handler is null.
features: [Proxy]
---*/
var p = Proxy.revocable({}, {});

View File

@ -13,6 +13,7 @@ info: |
...
e. If ToBoolean(extensibleTarget) is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {

View File

@ -13,6 +13,7 @@ info: |
...
b. If targetDesc.[[Configurable]] is false, throw a TypeError exception.
...
features: [Proxy]
---*/
var target = {};

View File

@ -12,6 +12,7 @@ info: |
14. If trapResultObj is undefined, then
a. If targetDesc is undefined, return undefined.
...
features: [Proxy]
---*/
var t = {};

View File

@ -13,6 +13,7 @@ info: |
...
f. Return undefined.
...
features: [Proxy]
---*/
var target = {

Some files were not shown because too many files have changed in this diff Show More