summaryrefslogtreecommitdiff
path: root/tool/ruby_vm
diff options
context:
space:
mode:
authorKoichi Sasada <[email protected]>2020-10-14 10:43:13 +0900
committerKoichi Sasada <[email protected]>2020-10-14 16:36:55 +0900
commitfad97f1f96caf11005a5858a29d32c66203913e8 (patch)
tree156a20da88b4e1efae3c9f749a1ed0dd2181da86 /tool/ruby_vm
parentae693fff748c68ca2500bbc2c0a8802d50f269dc (diff)
sync generic_ivtbl
generic_ivtbl is a process global table to maintain instance variables for non T_OBJECT/T_CLASS/... objects. So we need to protect them for multi-Ractor exection. Hint: we can make them Ractor local for unshareable objects, but now it is premature optimization.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3655
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_ivar.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_ivar.erb b/tool/ruby_vm/views/_mjit_compile_ivar.erb
index 7283d37ae7..eb05f4de8e 100644
--- a/tool/ruby_vm/views/_mjit_compile_ivar.erb
+++ b/tool/ruby_vm/views/_mjit_compile_ivar.erb
@@ -82,7 +82,7 @@
% # JIT: cache hit path of vm_getivar, or cancel JIT (recompile it without any ivar optimization)
fprintf(f, " struct gen_ivtbl *ivtbl;\n");
fprintf(f, " VALUE val;\n");
- fprintf(f, " if (LIKELY(FL_TEST_RAW(obj, FL_EXIVAR) && ic_serial == RCLASS_SERIAL(RBASIC(obj)->klass) && st_lookup(rb_ivar_generic_ivtbl(obj), (st_data_t)obj, (st_data_t *)&ivtbl) && index < ivtbl->numiv && (val = ivtbl->ivptr[index]) != Qundef)) {\n");
+ fprintf(f, " if (LIKELY(FL_TEST_RAW(obj, FL_EXIVAR) && ic_serial == RCLASS_SERIAL(RBASIC(obj)->klass) && rb_ivar_generic_ivtbl_lookup(obj, &ivtbl) && index < ivtbl->numiv && (val = ivtbl->ivptr[index]) != Qundef)) {\n");
fprintf(f, " stack[%d] = val;\n", b->stack_size);
fprintf(f, " }\n");
fprintf(f, " else {\n");