Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto cfd9214b3d class.c: add MRB_MT_FROZEN_BIT for method table layers
When mrb_mt_init_rom() is called on a class that already has a
mutable method table (from prior mrb_define_method_id() calls),
the mutable top layer is now frozen in place instead of being
left as a writable layer that wastes RAM on embedded systems.

The frozen bit (bit 29 of alloc field) marks heap-allocated
method table layers as temporarily immutable. Unlike the
readonly bit (bit 30, for true ROM), frozen layers are
automatically unfrozen when methods are later added via
mrb_define_method_raw() or removed via mrb_remove_method().
This preserves the c->mt pointer, which is critical because
iclasses (from module inclusion) hold a copy of it.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-19 23:25:16 +09:00
..
2024-06-27 22:46:13 +02:00
2023-05-03 22:12:59 +10:00
2026-01-24 11:31:32 +09:00
2025-11-02 21:18:18 +09:00
2019-08-18 20:12:44 +09:00
2025-06-25 10:46:23 +10:00