mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
1de46b2051
pool strings generated by mrbc -C are C string literals inside static const structs, which reside in ROM. mark them as IREP_TT_SSTR (static) instead of IREP_TT_STR (dynamic) so the VM uses mrb_str_new_static() and mrb_intern_static() instead of mrb_str_new() and mrb_intern(). this avoids unnecessary malloc+memcpy for string literals longer than the embed threshold, especially on embedded platforms where mrb_ro_data_p() returns FALSE. Co-authored-by: Claude <noreply@anthropic.com>