we (web engine): Experimental web browser project to understand the limits of Claude

JS Object model: prototype chain, typeof, instanceof #264

Open pierrelf.com
targeting main
Open opened by and assigned to pierrelf.com
targeting main

Implements issue 3mhn3lv4bx72x — JS Object model: prototype chain, typeof, instanceof.

Summary #

  • Property descriptors: Property struct with writable/enumerable/configurable flags replaces plain Value in object property map
  • instanceof: Walks prototype chain checking against constructor.prototype (was stubbed to always false)
  • delete: Respects configurable flag; compiler now emits Delete bytecode for member expressions (delete obj.prop, delete obj[expr])
  • for-in loops: Fully implemented with new ForInInit/ForInNext bytecode ops; collects enumerable keys (own + inherited), integer indices sorted first
  • Prototype support: FunctionData gains prototype_obj field; CreateClosure creates .prototype with constructor back-ref; SetPrototype/GetPrototype ops added
  • Non-enumerable properties: Array length properly marked non-enumerable, excluded from for-in

Tests #

15 new tests: property descriptors, prototype chain, typeof (all types), instanceof, in operator, delete (member/computed/non-configurable), for-in (basic/keys/empty/enumerable), reference semantics, enumeration order. All 241 JS tests pass (was 226).

This pull request has no versions submitted yet.