ruby/internal
Jean Boussier 3abdd4241f Turn rb_classext_t.fields into a T_IMEMO/class_fields
This behave almost exactly as a T_OBJECT, the layout is entirely
compatible.

This aims to solve two problems.

First, it solves the problem of namspaced classes having
a single `shape_id`. Now each namespaced classext
has an object that can hold the namespace specific
shape.

Second, it open the door to later make class instance variable
writes atomics, hence be able to read class variables
without locking the VM.
In the future, in multi-ractor mode, we can do the write
on a copy of the `fields_obj` and then atomically swap it.

Considerations:

  - Right now the `RClass` shape_id is always synchronized,
    but with namespace we should likely mark classes that have
    multiple namespace with a specific shape flag.
2025-06-12 07:58:16 +02:00
..
array.h Optimized instruction for Array#freeze 2024-09-05 12:46:02 +02:00
basic_operators.h Optimize instructions when creating an array just to call include? (#12123) 2024-11-26 14:31:08 -05:00
bignum.h Stop exporting symbols for MJIT 2023-03-06 21:59:23 -08:00
bits.h Add integer overflow check macros for add/sub as well as mul 2024-11-09 00:08:03 +09:00
class.h Turn rb_classext_t.fields into a T_IMEMO/class_fields 2025-06-12 07:58:16 +02:00
cmdlineopt.h Implement Options as part of ZJITState 2025-04-18 21:52:57 +09:00
compar.h Introduce BOP_CMP for optimized comparison 2022-12-06 12:37:23 -08:00
compile.h Move the PC regardless of the leaf flag (#8232) 2023-08-16 20:28:33 -07:00
compilers.h
complex.h
cont.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
dir.h
enc.h
encoding.h string.c: Directly create strings with the correct encoding 2024-11-13 13:32:32 +01:00
enum.h
enumerator.h
error.h Implement rb_bug_without_die 2024-12-12 14:07:56 -05:00
eval.h namespace on read 2025-05-11 23:32:50 +09:00
file.h Revert "reuse open(2) from rb_file_load_ok on POSIX-like system" 2023-02-27 09:24:45 -08:00
fixnum.h rb_fix_mul_fix needs internal/bits.h for MUL_OVERFLOW_FIXNUM_P 2024-10-08 23:29:49 +09:00
gc.h Move object_id in object fields. 2025-05-08 07:58:05 +02:00
hash.h Support Marshal.{dump,load} for core Set 2025-04-28 08:38:35 -07:00
imemo.h Turn rb_classext_t.fields into a T_IMEMO/class_fields 2025-06-12 07:58:16 +02:00
inits.h Merge rb_objspace_alloc and Init_heap. 2024-04-04 15:00:57 +01:00
io.h rb_io_blocking_operation_exit should not execute with pending interrupts. 2025-06-06 13:13:16 +09:00
load.h namespace on read 2025-05-11 23:32:50 +09:00
loadpath.h
math.h
missing.h Free environ when RUBY_FREE_AT_EXIT 2024-01-11 10:09:53 -05:00
namespace.h Show experimental warning when namespace is enabled 2025-05-11 23:32:50 +09:00
numeric.h Faster Integer.sqrt for large bignum 2024-03-18 13:52:27 +09:00
object.h Remove unused RBASIC_RESET_FLAGS 2025-06-02 09:52:25 -04:00
parse.h [Bug #20989] Ripper: Pass compile_error 2024-12-28 11:25:57 +09:00
proc.h Remove dead function rb_func_proc_new 2025-01-20 10:31:36 -05:00
process.h Put rb_fork back into process.c 2023-05-21 23:00:27 +09:00
ractor.h Fix shared GC with -DRUBY_DEBUG 2024-10-24 16:08:46 +01:00
random.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
range.h Implement Struct on VWA 2023-06-05 15:47:16 -04:00
rational.h Don't redefine RB_OBJ_WRITE 2023-01-18 08:49:32 -05:00
re.h String#gsub! Elide MatchData allocation when we know it can't escape 2025-02-24 18:32:46 +01:00
ruby_parser.h Change return value of gets function to be rb_parser_string_t * instead of VALUE 2024-05-04 11:59:10 +09:00
sanitizers.h Make ASAN default option string built-in libruby 2025-03-16 17:33:58 +09:00
serial.h
set_table.h Optimize callcache invalidation for refinements 2025-06-09 12:33:35 +09:00
signal.h Revert "hijack SIGCHLD handler for internal use" 2024-04-04 21:48:14 +09:00
st.h Move internal ST functions to internal/st.h 2023-12-25 10:41:12 -05:00
static_assert.h
string.h Lock-free hash set for fstrings [Feature #21268] 2025-04-18 13:03:54 +09:00
struct.h Remove dead function rb_struct_const_heap_ptr 2025-01-03 17:02:50 -05:00
symbol.h Move global symbol reference updating to rb_sym_global_symbols_update_references 2025-02-10 08:47:44 -05:00
thread.h Allow IO#close to interrupt IO operations on fibers using fiber_interrupt hook. (#12839) 2025-05-23 14:55:05 +09:00
time.h [Bug #21144] Win32: Use Windows time zone ID if TZ is not set 2025-02-19 18:27:32 +09:00
transcode.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
util.h
variable.h Refactor the last references to rb_shape_t 2025-06-11 16:38:38 +02:00
vm.h namespace on read 2025-05-11 23:32:50 +09:00
warnings.h