Files
mattgodbolt-molty ae5926ea62 Tighten the predicate name + invalid-value check + quote-strip docs
Per adversarial review:

- Renamed `isHostArchInstructionSet` → `hasTargetStringMapping`. The
  predicate just checks membership in `TARGET_SUBSTRINGS`; the old name
  implied a "real CPU vs VM/IR/bytecode" distinction the implementation
  doesn't make. Tightened the docstring: explicitly notes that real CPU
  archs (`6502`, `mos6502`, `mrisc32`, `wdc65c816`) currently return
  false because no production config exposes them via `-target=`, and
  that the table needs extending if you add such a config. Pinned all
  four with explicit assertions.

- Added `should have only valid InstructionSet values configured` test
  in `properties-validation-tests.ts`. Catches typos like
  `instructionSet=mos6052` that would silently slip through both
  `findCompilersWithoutInstructionSet` (only checks presence) and the
  consistency check (skips unknown values via the predicate).

- Documented the quote-stripping limitations in `extractTargetTokens`
  with a `length >= 2` guard (avoids a bare `"` shrinking to `''`) and
  three negative-case tests pinning down what actually happens for
  leading-only quote, trailing-only quote, whitespace-inside-quotes,
  and bare `"`. The behaviour is partly graceful (trailing quote ends
  up in the extracted value, which is dirty but visible).

- Tightened the `lib/instructionsets.ts` predicate docstring to
  "VM/bytecode" instead of "VM/IR" (LLVM IR is target-dependent so
  classifying `llvm` as IR-style was overclaiming).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 13:24:08 -05:00
..
2025-07-28 10:34:46 -05:00
2025-07-28 10:34:46 -05:00