SIGN IN SIGN UP
oven-sh / bun UNCLAIMED

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

0 0 150 Rust

ast: delete unused Boundering, RefDump, Names, and dead Loader/allocator helpers (#31546)

Dead-code sweep of `bun_ast`. None referenced outside their own
definitions in the Rust tree.

`cargo check --workspace` and `bun bd` pass.

## Why this code exists

| Item | Zig original | Zig callers | Status |
|---|---|---|---|
| `Boundering` enum | `src/ast/use_directive.zig:9-12` | 0 external
(only `boundering()`'s return type) | **dead in Zig too** |
| `UseDirective::boundering` | `use_directive.zig:25` | 0 | **dead in
Zig too** — server-components boundary detection that was never hooked
up |
| `UseDirective::is_boundary` | `use_directive.zig:18` (`isBoundary`) |
0 | **dead in Zig too** |
| `Ref::dump` + `RefDump` | `src/ast/base.zig:144,151,152`
(`dump`/`DumpImplData`/`dumpImpl`) | 0 — the `.dump()` calls at
`renamer.zig:537` and `ptr/ref_count.zig` are unrelated
`symbols.dump()`/`count.debug.dump()` | **dead in Zig too** — debug-only
`std.fmt.Alt` formatter for ad-hoc printing |
| `Names` + `ACTIVATE_FUNCTION` | `src/js_parser/runtime.zig:345-347` |
0 real — `parser.zig:1224` re-exports as `RuntimeNames` but
`RuntimeNames` itself has 0 callers | **dead in Zig too** — vestige of
an HMR/react-refresh `"activate"` lookup |
| `Imports::ALT_NAME` | `src/js_parser/runtime.zig:436` (`alt_name`) | 1
— `src/jsc/VirtualMachine.zig:1732` | The Rust port
(`src/jsc/VirtualMachine.rs:4083-4086`) inlines the literal
`b"bun:wrap"` with a note that `Name`/`alt_name` are identical |
| `Loader::disable_html` | `src/bundler/options.zig:618` (`disableHTML`)
| 0 | **dead in Zig too** |
| `Loader::is_sqlite` | `src/bundler/options.zig:625` (`isSQLite`) | 0 |
**dead in Zig too** — callers inline-match instead |
| `Loader::supports_client_entry_point` | `src/bundler/options.zig:792`
| 0 — only reference (`transpiler.zig:1359`) is inside `if (comptime
wrap_entry_point)`; all 8 callers pass `false`
(`transpiler.zig:1307-1324`) | **dead in Zig too** (comptime branch
never instantiated) |
| `Loader::is_java_script_like_or_json` | none — Zig has only one
spelling (`isJavaScriptLikeOrJSON` at `options.zig:866`) | n/a |
**Rust-port artifact** — Rust emitted two snake_case spellings of the
same Zig name; the kept `is_javascript_like_or_json` is the one with
callers |
| `new_without_stack` / `init_without_stack` |
`src/ast/ast_memory_allocator.zig:79` (`initWithoutStack`) | 1 —
`src/runtime/bake/bake.zig:712` | Rust port uses
`ASTMemoryAllocator::borrowing(arena)` instead
(`src/runtime/bake/mod.rs:230`, `bake_body.rs:1202`,
`DevServer.rs:3283`) |
| `bump_allocator` | `ast_memory_allocator.zig:4` (a *field*, not a
method) | 0 external — only read/written inside
`ast_memory_allocator.zig` (`:15,56,73,85`) | **Rust-port artifact** —
Rust-only alias method for callers that addressed the Zig field by name;
never adopted |
D
Dylan Conway committed
f3ccf766dfd343f8aacada1a84510c059a514d89
Parent: 677fe1c
Committed by GitHub <noreply@github.com> on 5/29/2026, 2:42:57 AM