Skip to content

Gibbed.MadMax-1.5.3

Choose a tag to compare

@gigaHours gigaHours released this 19 Feb 17:13

Release 1.5.3

break statement support + decompiler bug fixes

New feature: break keyword

  • The break statement is now fully supported in the decompiler, compiler, and round-trip pipeline
  • Exits the enclosing while loop, matching Python semantics

Decompiler fixes (StructuralAnalysis):

  • Fixed break inside while loops — previously emitted as pass, causing all post-loop code to be absorbed into the loop body. Scripts like lib_vehicleupgrades.xvmc (RecomputeGearbox) produced functionally broken output when recompiled.
  • Fixed elif body absorbing subsequent statementsFindLinearEnd could advance past the stop block, causing code after an if/elif chain to be pulled inside the last branch (e.g. MassCompensateSuspensionLength).
  • Fixed elif chains collapsing into nested ifs — merge point detection failed when the merge coincided with the outer exit block, breaking flat elif chains into deeply nested if blocks with misplaced return statements (e.g. DiminishingReturnsProgression).

StoreItem bug fix:

  • Fixed stitem stack order in both the decompiler (ExpressionRecovery) and compiler (CodeGenerator). The XVM convention is push value, push obj, push indexstitem pops index, obj, val.

Batch directory mode:

  • Decompiler and compiler now accept a directory as input, recursively processing all .xvmc / .xvm files. Supports drag-and-drop of folders onto the .exe.

Affected files:

  • StructuralAnalysis.cs — region-based control flow recovery with break support
  • Ast.cs / AstPrinter.csBreakStmt AST node
  • Token.cs / Lexer.cs / Parser.cs / CodeGenerator.csbreak compilation
  • ExpressionRecovery.cs / CodeGenerator.csstitem stack order fix
  • XvmDecompile/Program.cs / XvmCompile/Program.cs — batch directory mode