Skip to content
  • yui-knk's avatar
    51149f33
    Keep unused literal nodes · 51149f33
    yui-knk authored
    For static analysis, it’s better to keep unused literal nodes.
    If simply change `block_append` to fall through, both "unused literal ignored"
    and "possibly useless use of a literal in void context" warnings
    are shown for the same line. But it’s verbose then remove
    "unused literal ignored" warning.
    
    This kind of optimization is already implemented on compile.c.
    `compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK
    has next.
    51149f33
    Keep unused literal nodes
    yui-knk authored
    For static analysis, it’s better to keep unused literal nodes.
    If simply change `block_append` to fall through, both "unused literal ignored"
    and "possibly useless use of a literal in void context" warnings
    are shown for the same line. But it’s verbose then remove
    "unused literal ignored" warning.
    
    This kind of optimization is already implemented on compile.c.
    `compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK
    has next.
Loading