镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

JIT: execute guarded dense-index effects in loop regions #448

Closed

Description

@chrisbbreuer

Parent: #133
Roadmap: #146, #134
Related: #132, #433

The optimizer IR already models get_index/set_index and deterministic AArch64 paths can call their canonical runtime operations, but reducible loop-region lowering previously rejected both. This issue adds a guarded isolated packed-dense path so numeric array loops remain native while every observable or shared case exits or calls canonical VM semantics.

Acceptance

  • Lower get_index and set_index through loop-region SSA with exact two/three-input staging and precise stack maps.
  • Direct AArch64 reads guard isolated mode, object/Array brand, ordinary dense storage, absent cold/hole/accessor/attribute state, exact uint32 array index, bounds, and numeric result when required.
  • Direct existing-index writes preserve assignment result and call the non-allocating GC barrier before mutation; growth and every guard miss use canonical fallback.
  • Shared realms, arguments/typed/sparse arrays, proxies, restricted receivers, prototype/indexed hooks, holes, invalid keys, OOB, and concurrent mutation never use the unlocked direct path.
  • Native-on/off differentials cover reads, writes, bounds, holes, observable fallback, GC relocation/checkpoints, invalidation, and exact bytecode steps.
  • Focused normal and TSan gates pass; update JIT: lower verified packed-array regions into the native tier #133/JIT: build the optimizing tier with deoptimization and precise GC #146 docs without claiming append/growth completion.

Landed

  • a1307097 — loop SSA lowering, AArch64 packed-index guards, write barrier, canonical fallback, direct/callback counters, hot-loop, invalidation, and moving-GC differential witnesses.
  • 7b706ea2 — concise README and optimizing-tier documentation.
  • zig build test -Dtest-filter='optimizer packed index': 5/5 passed.
  • zig build test -Dtsan=true -Dtest-filter='optimizer packed index': 5/5 passed, zero leaks.

Append, growth/reallocation specialization, profiling, and broad release gates remain in #133.

Activity

  1. chrisbbreuer commented on Jul 22, 2026

    @chrisbbreuer
    MemberAuthor

    Completed on main in a130709 and documented in 7b706ea. The focused normal and TSan packed-index gates both pass 5/5; broader packed-array specialization remains tracked by #133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions