Repository navigation
Bug Fixes
- Fixed Cyberpunk 2077 startup crash (
EXCEPTION_ACCESS_VIOLATION) with nested collections: Collection element types are now emitted before outer collection types (Array,StaticArray,ScriptRef), preventing invalid forwardPoolTypereferences in generated.redscriptsbundles.
Performance
- Sped up the compiler frontend, decompiler, and REDmod adapter/transpiler by using identity hashers for
TypeId/FileIdlookups, switching unordered lookups to hash-based collections, and optimizingif-branch construction.
New Optional Warning Passes (compile & lint)
Added 9 new opt-in diagnostic passes available via -W / --warn-on (and enabled by default in redscript-compiler-api, except empty_branch):
unreachable_code— Reports statements that can never execute after a path that always exits.constant_condition— Reportsif/ternary conditions andwhile falseloops that always evaluate to the same value (while trueis allowed).duplicate_switch_case— Reports repeated constantcaselabels within aswitch.empty_branch(pedantic — requires-L pedantic) — Reports emptyif/else/whilebodies.no_op_statement— Reports standalone expressions with no effect (e.g.x;,42;).dead_store— Reports local variable assignments that are overwritten before being read.missing_return— Reports non-Voidfunctions with a code path that falls through without returning.non_exhaustive_switch— Reportsswitchstatements over an enum withoutdefault:that miss variants.unforwarded_wrap_method— Reports@wrapMethodbodies that never callwrappedMethod.