ReviewOS

zig-utils/zig-js

Compiler: admit program-mode member references via activation scratch

#721
Closed chris opened this 9 days ago ·
9 days ago

Parents: #465, #496 Depends on: #706 Related: #705, #708

Problem

#705 and #708 lowered member logical assignments and updates across function activations but kept direct top-level forms causally rejected because program chunks have no frame or private activation Environment to hold a resolved Reference. Once #706 supplies bounded activation-local scratch with load/store/release semantics, the existing one-Reference compiler helpers can be admitted at top level without synthesized global names.

Scope

  • Route program-mode activation temps for member references through the #706 scratch contract instead of rejecting in `compileMemberRef`.
  • Admit named/computed `&&=`, `||=`, `??=`, and compound/update forms at top level across all three operators' short-circuit classes.
  • Preserve single base evaluation, single observable ToPropertyKey, RequireObjectCoercible ordering, getter/setter/proxy behavior, recursion isolation, nested/indirect eval isolation, moving-GC rooting of scratch values, and no-G
9 days ago

Landed with #706 in be928fbd: named/computed `&&=`, `||=`, `??=`, compound assignments, and prefix/postfix updates now admit at top level through activation-local scratch, with optional-chain targets keeping their explicit unsupported admission and super targets deferred to #720. Differential, rooting, isolation, and full-unit evidence recorded on #706.

Sign in to comment on this issue.