FAILURE MAP
← Case archive

FA-90282 / Bytecode virtual machines / Member archive

Wordcode prefixes: only the last EXTENDED_ARG counts · case 02

Arguments needing two or more prefixes lose their high bytes.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Two-byte wordcode (opcode, arg). EXTENDED_ARG (144) prefixes build wider arguments: each prefix ORs its byte into an accumulator that is then shifted left 8; the real instruction ORs its own byte in and resets the accumulator. Each decoded instruction reports [start of its first prefix, own offset, name, full arg, jump target in bytes]: JUMP_FORWARD (110) targets the next instruction plus 2*arg, JUMP_ABSOLUTE (113) targets 2*arg. A prefix at the end reports ["dangling-extended-arg", start]. A trailing odd byte is ignored.

Why this case matters

Instruction prefixes change argument width and jump targets in wordcode interpreters.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
two prefixes accumulate[[0, 4, "LOAD_CONST", 1027, null]][[0, 4, "LOAD_CONST", 66563, null]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗