| primitive-prototype-with-object.js |
---
es6id: 12.9.3
description: >
Throws a TypeError if `prototype` property is not an Object.
info: |
12.9.3 Runtime Semantics: Evaluation
RelationalExpression : RelationalExpression instanceof ShiftExpression
...
7. Return InstanceofOperator(lval, rval).
12.9.4 Runtime Semantics: InstanceofOperator(O, C)
...
6. Return OrdinaryHasInstance(C, O).
7.3.19 OrdinaryHasInstance
...
3. If Type(O) is not Object, return false.
4. Let P be Get(C, "prototype").
5. ReturnIfAbrupt(P).
6. If Type(P) is not Object, throw a TypeError exception.
...
--- |
923 |
- |
| primitive-prototype-with-primitive.js |
---
es6id: 12.9.3
description: >
Does not throw a TypeError if left-hand side expression and `prototype` property are both primitive values.
info: |
12.9.3 Runtime Semantics: Evaluation
RelationalExpression : RelationalExpression instanceof ShiftExpression
...
7. Return InstanceofOperator(lval, rval).
12.9.4 Runtime Semantics: InstanceofOperator(O, C)
...
6. Return OrdinaryHasInstance(C, O).
7.3.19 OrdinaryHasInstance
...
3. If Type(O) is not Object, return false.
...
--- |
849 |
- |
| prototype-getter-with-object-throws.js |
---
es6id: 12.9.3
description: >
"prototype" property is retrieved when left-hand side expression in `instanceof` is object.
info: |
12.9.3 Runtime Semantics: Evaluation
RelationalExpression : RelationalExpression instanceof ShiftExpression
...
7. Return InstanceofOperator(lval, rval).
12.9.4 Runtime Semantics: InstanceofOperator(O, C)
...
6. Return OrdinaryHasInstance(C, O).
7.3.19 OrdinaryHasInstance
...
3. If Type(O) is not Object, return false.
4. Let P be Get(C, "prototype").
5. ReturnIfAbrupt(P).
...
--- |
1222 |
- |
| prototype-getter-with-object.js |
---
es6id: 12.9.3
description: >
"prototype" property is retrieved when left-hand side expression in `instanceof` is object.
info: |
12.9.3 Runtime Semantics: Evaluation
RelationalExpression : RelationalExpression instanceof ShiftExpression
...
7. Return InstanceofOperator(lval, rval).
12.9.4 Runtime Semantics: InstanceofOperator(O, C)
...
6. Return OrdinaryHasInstance(C, O).
7.3.19 OrdinaryHasInstance
...
3. If Type(O) is not Object, return false.
4. Let P be Get(C, "prototype").
5. ReturnIfAbrupt(P).
6. If Type(P) is not Object, throw a TypeError exception.
7. Repeat
a. Let O be O.[[GetPrototypeOf]]().
b. ReturnIfAbrupt(O).
c. If O is null, return false.
d. If SameValue(P, O) is true, return true.
...
--- |
1511 |
- |
| prototype-getter-with-primitive.js |
---
es6id: 12.9.3
description: >
"prototype" property is not retrieved when left-hand side expression in `instanceof` is primitive.
info: |
12.9.3 Runtime Semantics: Evaluation
RelationalExpression : RelationalExpression instanceof ShiftExpression
...
7. Return InstanceofOperator(lval, rval).
12.9.4 Runtime Semantics: InstanceofOperator(O, C)
...
6. Return OrdinaryHasInstance(C, O).
7.3.19 OrdinaryHasInstance
...
3. If Type(O) is not Object, return false.
...
--- |
1028 |
- |
| S11.8.6_A1.js |
---
info: |
White Space and Line Terminator between RelationalExpression and
"instanceof" and between "instanceof" and ShiftExpression are allowed
es5id: 11.8.6_A1
description: Checking by using eval
--- |
1873 |
- |
| S11.8.6_A2.1_T1.js |
---
info: Operator "instanceof" uses GetValue
es5id: 11.8.6_A2.1_T1
description: Either Expression is not Reference or GetBase is not null
--- |
844 |
- |
| S11.8.6_A2.1_T2.js |
---
info: Operator "instanceof" uses GetValue
es5id: 11.8.6_A2.1_T2
description: If GetBase(RelationalExpression) is null, throw ReferenceError
--- |
589 |
- |
| S11.8.6_A2.1_T3.js |
---
info: Operator "instanceof" uses GetValue
es5id: 11.8.6_A2.1_T3
description: If GetBase(ShiftExpression) is null, throw ReferenceError
--- |
576 |
- |
| S11.8.6_A2.4_T1.js |
---
info: First expression is evaluated first, and then second expression
es5id: 11.8.6_A2.4_T1
description: Checking with "="
--- |
605 |
- |
| S11.8.6_A2.4_T2.js |
---
info: First expression is evaluated first, and then second expression
es5id: 11.8.6_A2.4_T2
description: Checking with "throw"
--- |
847 |
- |
| S11.8.6_A2.4_T3.js |
---
info: First expression is evaluated first, and then second expression
es5id: 11.8.6_A2.4_T3
description: Checking with undeclarated variables
--- |
651 |
- |
| S11.8.6_A2.4_T4.js |
---
info: First expression is evaluated first, and then second expression
es5id: 11.8.6_A2.4_T4
description: Checking with undeclarated variables
flags: [noStrict]
--- |
440 |
- |
| S11.8.6_A3.js |
---
info: If ShiftExpression is not an object, throw TypeError
es5id: 11.8.6_A3
description: Checking all the types of primitives
--- |
1387 |
- |
| S11.8.6_A4_T1.js |
---
info: Only constructor call (with "new" keyword) makes instance
es5id: 11.8.6_A4_T1
description: Checking Boolean case
--- |
575 |
- |
| S11.8.6_A4_T2.js |
---
info: Only constructor call (with "new" keyword) makes instance
es5id: 11.8.6_A4_T2
description: Checking Number case
--- |
548 |
- |
| S11.8.6_A4_T3.js |
---
info: Only constructor call (with "new" keyword) makes instance
es5id: 11.8.6_A4_T3
description: Checking String case
--- |
552 |
- |
| S11.8.6_A5_T1.js |
---
info: TypeError is subclass of Error from instanceof operator point of view
es5id: 11.8.6_A5_T1
description: Checking Error case
--- |
1502 |
- |
| S11.8.6_A5_T2.js |
---
info: TypeError is subclass of Error from instanceof operator point of view
es5id: 11.8.6_A5_T2
description: Checking TypeError case
--- |
973 |
- |
| S11.8.6_A6_T1.js |
---
info: |
Only Function objects implement [[HasInstance]] and can be proper
ShiftExpression for the "instanceof" operator consequently
es5id: 11.8.6_A6_T1
description: Checking "this" case
--- |
719 |
- |
| S11.8.6_A6_T2.js |
---
info: |
Only Function objects implement [[HasInstance]] and can be proper
ShiftExpression for the "instanceof" operator consequently
es5id: 11.8.6_A6_T2
description: Checking Math case
--- |
540 |
- |
| S11.8.6_A6_T3.js |
---
info: |
Only Function objects implement [[HasInstance]] and can be proper
ShiftExpression for the "instanceof" operator consequently
es5id: 11.8.6_A6_T3
description: Checking if RelationalExpression is function
--- |
795 |
- |
| S11.8.6_A6_T4.js |
---
info: |
Only Function objects implement [[HasInstance]] and can be proper
ShiftExpression for the "instanceof" operator consequently
es5id: 11.8.6_A6_T4
description: Checking if RelationalExpression is object
--- |
1386 |
- |
| S11.8.6_A7_T1.js |
---
info: |
When "instanceof" returns true it means that
GetValue(RelationalExpression) is constructed with ShiftExpression
es5id: 11.8.6_A7_T1
description: Checking Object object
--- |
672 |
- |
| S11.8.6_A7_T2.js |
---
info: |
When "instanceof" returns true it means that
GetValue(RelationalExpression) is constructed with ShiftExpression
es5id: 11.8.6_A7_T2
description: Checking Array object
--- |
669 |
- |
| S11.8.6_A7_T3.js |
---
info: |
When "instanceof" returns true it means that
GetValue(RelationalExpression) is constructed with ShiftExpression
es5id: 11.8.6_A7_T3
description: Checking Function object
--- |
693 |
- |
| S15.3.5.3_A1_T1.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T1
description: V is number
--- |
665 |
- |
| S15.3.5.3_A1_T2.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T2
description: V is string
--- |
667 |
- |
| S15.3.5.3_A1_T3.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T3
description: V is boolean true
--- |
674 |
- |
| S15.3.5.3_A1_T4.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T4
description: V is boolean false
--- |
676 |
- |
| S15.3.5.3_A1_T5.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T5
description: V is void 0
--- |
670 |
- |
| S15.3.5.3_A1_T6.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T6
description: V is null
--- |
666 |
- |
| S15.3.5.3_A1_T7.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T7
description: V is undefined
--- |
676 |
- |
| S15.3.5.3_A1_T8.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is
called with value V, the following steps are taken: i) If V is not an
object, return false
es5id: 15.3.5.3_A1_T8
description: V is undefined variable
--- |
685 |
- |
| S15.3.5.3_A2_T2.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken:
i) Call the [[Get]] method of F with property name "prototype".
ii) Let O be Result(i).
iii) O is not an object, throw a TypeError exception
es5id: 15.3.5.3_A2_T2
description: F.prototype is undefined, and V is empty object
--- |
855 |
- |
| S15.3.5.3_A2_T5.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of
F is called with value V and V is an object, the following steps
are taken: i) Call the [[Get]] method of F with property name
"prototype". ii) Let O be Result(i). iii) O is not an object,
throw a TypeError exception
es5id: 15.3.5.3_A2_T5
description: F.prototype is void 0, and V is new F
--- |
1057 |
- |
| S15.3.5.3_A2_T6.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of
F is called with value V and V is an object, the following steps
are taken: i) Call the [[Get]] method of F with property name
"prototype". ii) Let O be Result(i). iii) O is not an object,
throw a TypeError exception
es5id: 15.3.5.3_A2_T6
description: F.prototype is string, and V is function
--- |
849 |
- |
| S15.3.5.3_A3_T1.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken:
i) Call the [[Get]] method of F with property name "prototype".
ii) Let O be Result(i) and O is an object.
iii) Let V be the value of the [[Prototype]] property of V.
iv) If V is null, return false.
v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true.
vi) Go to step iii)
es5id: 15.3.5.3_A3_T1
description: F.prototype.type is 1, and V is new F
--- |
1024 |
- |
| S15.3.5.3_A3_T2.js |
---
info: |
Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken:
i) Call the [[Get]] method of F with property name "prototype".
ii) Let O be Result(i) and O is an object.
iii) Let V be the value of the [[Prototype]] property of V.
iv) If V is null, return false.
v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true.
vi) Go to step iii)
es5id: 15.3.5.3_A3_T2
description: F.prototype is Object.prototype, and V is empty object
--- |
1230 |
- |
| symbol-hasinstance-get-err.js |
---
es6id: 12.9.4
description: Error thrown when accessing constructor's @@hasInstance property
info: |
1. If Type(C) is not Object, throw a TypeError exception.
2. Let instOfHandler be GetMethod(C,@@hasInstance).
3. ReturnIfAbrupt(instOfHandler).
features: [Symbol.hasInstance]
--- |
621 |
- |
| symbol-hasinstance-invocation.js |
---
es6id: 12.9.4
description: >
Arguments and 'this' value when invoking constructor's @@hasInstance property
info: |
1. If Type(C) is not Object, throw a TypeError exception.
2. Let instOfHandler be GetMethod(C,@@hasInstance).
3. ReturnIfAbrupt(instOfHandler).
4. If instOfHandler is not undefined, then
a. Return ToBoolean(Call(instOfHandler, C, «O»)).
features: [Symbol.hasInstance]
--- |
861 |
- |
| symbol-hasinstance-not-callable.js |
---
es6id: 12.9.4
description: >
Error thrown when constructor's @@hasInstance property is defined but not callable
info: |
1. If Type(C) is not Object, throw a TypeError exception.
2. Let instOfHandler be GetMethod(C,@@hasInstance).
3. ReturnIfAbrupt(instOfHandler).
4. If instOfHandler is not undefined, then
a. Return ToBoolean(Call(instOfHandler, C, «O»)).
5. If IsCallable(C) is false, throw a TypeError exception.
features: [Symbol.hasInstance]
--- |
736 |
- |
| symbol-hasinstance-to-boolean.js |
---
es6id: 12.9.4
description: >
Type coercion of value returned by constructor's @@hasInstance property
info: |
1. If Type(C) is not Object, throw a TypeError exception.
2. Let instOfHandler be GetMethod(C,@@hasInstance).
3. ReturnIfAbrupt(instOfHandler).
4. If instOfHandler is not undefined, then
a. Return ToBoolean(Call(instOfHandler, C, «O»)).
features: [Symbol, Symbol.hasInstance]
--- |
1433 |
- |