wire __runtime_instanceof to 'instanceof' on upcasts

also adds runtime.instanceOf that can be exported for use by the host
This commit is contained in:
dcode
2019-04-02 23:58:58 +02:00
parent b62927f5e5
commit b58683aff4
12 changed files with 2569 additions and 141 deletions

View File

@ -15,7 +15,7 @@ assert(!(I instanceof A));
assert(!(f instanceof A));
assert(!(F instanceof A));
assert(!(a instanceof B));
// assert(!(a instanceof B)); // dynamic upcast, checked in runtime/instanceof
assert( b instanceof B );
assert(!(i instanceof B));
assert(!(I instanceof B));