Skip to content
Back to skills

Gen Interp Tables

ASecurity

Regenerate the interpreter's flat dispatch tables from the disassembler lookup tables — use after adding/renaming an interpreter handler, changing the disassembler table layout, or when the interpreter table drifts from the jit decode.

  • 516 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
developmentpython

Security analysis

A100/100

Scanned August 31, 2026

npx -y skills add Grarak/DSVita --skill gen-interp-tables --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gen Interp Tables?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gen Interp Tables
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/grarak-gen-interp-tables/badge)](https://www.skillsdirectory.com/skills/grarak-gen-interp-tables)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gen-interp-tables
description: Regenerate the interpreter's flat dispatch tables from the disassembler lookup tables — use after adding/renaming an interpreter handler, changing the disassembler table layout, or when the interpreter table drifts from the jit decode.
---

# Regenerate interpreter dispatch tables

The interpreter's tables are GENERATED from the disassembler's lookup tables so
interpreter-decode can never disagree with jit-decode. Never edit the generated files by
hand.

| table | source of truth | generator |
|---|---|---|
| `src/jit/interpreter/thumb_table.rs` (`[ThumbInterpFn; 1024]`, indexed `op >> 6`) | `src/jit/disassembler/thumb/lookup_table_thumb.rs` | `tools/gen_thumb_table.py` |
| `src/jit/interpreter/arm_table.rs` (`[ArmInterpFn; 4096]`, indexed `((op>>16)&0xFF0)\|((op>>4)&0xF)`) | `src/jit/disassembler/lookup_table.rs` | same approach: parse the table paren-depth-aware, map each slot's disassembler fn name to the interpreter handler, unknown → `inst_fallback` |

Workflow:

1. Add the specialized handler(s) in `src/jit/interpreter/` (const generics + `paste`,
   mirroring `disassembler/delegations.rs` — no matching on the execution path; see
   DEVELOPMENT.md §2 for the design rules).
2. If the handler stays unimplemented in the interpreter, keep its name in the generator's
   FALLBACK set so the slot maps to `inst_fallback`/`inst_fallback_t` (fallback = the block
   compiles instead; correctness holds at any coverage).
3. Run the generator from the repo root: `python3 tools/gen_thumb_table.py`.
4. Build; the table references handlers by bare name, so a missing/renamed handler fails
   loudly at compile time.
5. Verify semantics against the jit with an A/B trace (inst-trace skill) if the change is
   more than mechanical.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.