mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
f50936e8bd
Replace complex flat array packing with simple cons-list storage to reduce memory overhead and code complexity. This continues the compiler simplification work by reverting array nodes to the original memory-efficient approach. - Remove len/flags fields from mrb_ast_array_node structure - Eliminate complex two-pass processing (count + copy) in new_array() - Replace array indexing with cons-list iteration in gen_array_var() - Reduce parser code from 30+ lines to 4 lines for array creation - Maintain full functionality with zero test regressions Following the same successful pattern used for mrb_ast_case_node upgrade, this change proves that flat array packing provides no memory benefit since cons lists aren't recycled, while adding unnecessary complexity. Co-authored-by: Claude <noreply@anthropic.com>