Skip to content

nightly-20260628

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Jun 06:32
beeb35c

Added

  • back-emitter: lower function-pointer delegates to pb35 via a BYREF-result thunk + CALL DWORD - 30/32 decompilation examples now round-trip with identical output (was 27). A function called through a code pointer has no pb35 expression form, but it can be wrapped: a typed proc pointer / named delegate becomes a DWORD; an inline lambda or CODEPTR32(func) emits CODEPTR32(thunk), where the thunk is a generated SUB taking the arguments plus a trailing BYREF result (Sresult = target(args)); and the call site is hoisted to materialize the args into BYREF temps and a result temp, then CALL DWORD (ptr)(args, result) - the same struct-return trick the compiler uses internally * TypeText/TypeNameText/FormatVarDecl render ProcPtrType (and a named-delegate-typed variable) as DWORD; LambdaExpr -> CODEPTR32(thunk) via LambdaProcs; CODEPTR32(userFunction) -> CODEPTR32(thunk); the hoist pass now handles ProcPtrCalls alongside ternaries * the only two non-round-tripping examples left are 08 (rotate operators - no pb35 equivalent) and 09 (far-pointer offset arithmetic); the decompilation marks them as diverging, honestly + DOSBox harnesses run headless: gen-decompilation.sh starts a single shared Xvfb display (no window pops up, no per-call xvfb-run cost); the scratchpad round-trip harnesses use xvfb-run when present + 3 delegate round-trip tests (typed proc pointer -> DWORD+thunk+CALL DWORD, inline lambda -> CODEPTR32(thunk), named delegate); all 2178 unit tests green * no regression: 246/246 corpus compile-clean, output-equivalence harness 30/32, docs/DECOMPILATION.md regenerated (30 identical-output, 2 diverge) (beeb35c)