Commit Graph
8 Commits
Author SHA1 Message Date
Malte Ubl 6ff0b7c2df Load the active exception cell once per synchronous body
Every inline pending-exception check in an executable loaded the
runtime's active-cell pointer and then its kind: two dependent loads
after each call that may throw, because LLVM must assume any call can
change the pointer. Fiber switches restore the active cell before control
returns to a synchronous frame (stack switches, eager spawns and
generator resumes all swap back to the caller's cell), so the pointer is
one value for the whole invocation. Synchronous IR function bodies now
load it once in the entry block and each check reads only the kind.

The flag lives on the body's BlockBuilder, so adapters and runtime
helpers keep the per-check load. Async functions, generators and worker
executables (whose checks also fold in the context stop signal) keep the
existing form; libraries still test through scr_exc_pending.
2026-10-09 15:03:13 -07:00
Malte Ubl 1287df6ad6 Keep source-level stack-box tests on tagged unions
The optional element reads these programs pin now lower to nullable pointers for class and string arms. Each program declares a Set of its element union, which keeps that union a tagged box, so the tests continue to exercise the stack-box and borrowed-payload paths.

main's optional class element test from #767 (comparisons, tests and
optional chains through stack tags) gets the same Set, plus a nullable
variant asserting that those reads build no union box at all.
2026-10-09 11:59:24 -05:00
Chris Tate 96ee89412b Keep exception polls inline in worker programs (#785) 2026-10-09 10:01:27 -05:00
Chris Tate 66b773fd7f Read optional elements and captured parameters without boxing (#767) 2026-10-08 12:52:53 -05:00
Chris Tate 0ceb78f886 Reduce ownership traffic and allocation for native collections
- Borrow rooted collection receivers across safe helpers and typed updates.
- Keep small Maps and Sets compact through cloning, growth, and live iteration.
- Preserve ownership at reassignment, exception, and capture boundaries.
2026-10-05 21:50:11 -05:00
Chris Tate c08ab955ae Enforce linting and consistent source formatting
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks.
- Preserve compiler import boundaries and protected fixtures while cleaning up lint findings.
- Standardize source formatting and validate import, fixture, and embedded-source protections.
2026-10-05 17:51:24 -05:00
Chris Tate d31bf3c4f8 Reduce ownership overhead across helpers and collections
- Infer stable heap inputs and local aliases while preserving ownership of escaping values.
- Remove redundant ownership work from collection and byte operations.
- Cover mutation, exceptions, indirect calls, and native bootstrap behavior.
2026-10-05 02:24:35 -05:00
Chris Tate 932ef772f2 Improve input lifetimes and compiler memory use
- Borrow string inputs through proven helpers while preserving owned call boundaries.
- Keep temporary array arguments on the stack with safe snapshots and compact lookups.
- Bound shared LLVM shard growth and cover evaluation order, escaping values, and cleanup.
2026-10-04 16:00:55 -05:00