• Roman Alifanov's avatar
    Optimize codegen: peephole tmp/RET elimination, static dispatch, metadata DCE · af265565
    Roman Alifanov authored
    Peephole optimizations in _assign() eliminate __CT_RET and __ct_tmp
    round-trips by retargeting assignments directly to the target variable.
    Boolean condition peephole in _condition_bash() extracts test expressions
    directly instead of going through __CT_RET. Static dispatch for this
    method calls uses class_name to emit direct function calls instead of
    dynamic __ct_call_method. Class metadata (_fields/_types) only emitted
    when reflect/json categories are used. Stdlib methods (math, args, core)
    use direct __CT_RET= instead of echo to avoid subshell forks.
    af265565
math.py 2.26 KB