Part of #1785. Design: #1772. Depends on #1786.
(4) new / instanceof / typeof on a class-object value
Scope
Make the instance-side operations work when the class is a class-object value (POINTER) rather than INT32(class_id):
new (classObjectValue)(args) → read class_id from the class object, instantiate via the existing class_id machinery.
x instanceof classObjectValue → resolve the class_id from the value and walk the class chain.
typeof classObjectValue === "function" (classes are callable in JS).
extends: js_register_class_parent_dynamic already reads class_id from a POINTER — confirm it stays correct with the class-object representation.
Acceptance criteria
const C = make(x); const c = new C(); c instanceof C === true.
typeof make(x) === "function".
- effect's
class X extends make(...) instances (where used) behave correctly.
- No regression to
new/instanceof on top-level class declarations.
Blocks
(6).
Part of #1785. Design: #1772. Depends on #1786.
(4)
new/instanceof/typeofon a class-object valueScope
Make the instance-side operations work when the class is a class-object value (POINTER) rather than
INT32(class_id):new (classObjectValue)(args)→ readclass_idfrom the class object, instantiate via the existing class_id machinery.x instanceof classObjectValue→ resolve the class_id from the value and walk the class chain.typeof classObjectValue === "function"(classes are callable in JS).extends:js_register_class_parent_dynamicalready readsclass_idfrom a POINTER — confirm it stays correct with the class-object representation.Acceptance criteria
const C = make(x); const c = new C(); c instanceof C === true.typeof make(x) === "function".class X extends make(...)instances (where used) behave correctly.new/instanceofon top-level class declarations.Blocks
(6).