nightly-20260627
Pre-release
Pre-release
Changed
- back-emitter: lower the deep pb36 features to real, output-equivalent PB 3.5 - building the decompilation reference with an OUTPUT-equivalence gate (run the program both ways, diff RESULT.TXT - not just "does it recompile") raised round-trip fidelity from a true 11/32 to 27/32: * TYPE methods / properties / operators: lifted THIS-receiver procedures, member calls and synthesized backing fields now use sanitized pb35-valid names (Counter.Bump -> Counter_Bump, THIS.$Current -> THIS.S_Current); the lifted-member RESULT is assigned through the emitted function name, not its ResultName (a property getter returned 0 before) * generics: the monomorphized type (Box@Long) is emitted from the resolved type table as TYPE Box_Long and DIMs name it via the bound symbol, instead of emitting the uninstantiated T template * coroutines: the synthesized enumerator TYPE (with its $state/$Current backing fields) is emitted, and the implicit FOR EACH enumerator local is given an explicit DIM, so the MoveNext state machine actually iterates under pb35 * TRY/CATCH/FINALLY: lowered to the ON ERROR machinery (handler label + ON ERROR GOTO 0 + finally), matching the codegen lowering at the source level * nested SUB/FUNCTION: an unqualified nested call (Bump) resolves to the lifted name (Outer_Bump) via the call binding, matching the definition * identifier sanitization (
$/@/. -> letter-leading underscores) preserves a trailing $ /@ type-suffix (STR$/HEX$ no longer mangled to STR_); synthesized UDT-typed locals get explicit DIMs # the function-pointer/delegate features (21/22/23) are PROVABLY not expressible in PB 3.5 - it cannot call a code pointer and yield a result (verified) - so they stay illustrative by necessity, not omission; rotate operators and far-pointer offset arithmetic likewise have no faithful pb35 form (08/09 diverge) * gen-decompilation.sh now annotates each example by OUTPUT equivalence via DOSBox (Round-trips ✅ same output / Illustrative - diverges / Illustrative - inexpressible), falling back to a compile check without an emulator: 27 round-trip with identical output, 2 diverge, 3 inexpressible + 5 round-trip tests (TRY, TYPE method, generic, coroutine, nested SUB) re-binding under pb35 * no regression: 246/246 corpus compile-clean, pb35 runtime byte-identical, all unit tests green (e8d727e)