RJIT: Workaround USE_RVARGC=0 CI

This commit is contained in:
Takashi Kokubun 2023-03-18 23:42:58 -07:00
Родитель 32e0c97dfa
Коммит c4e2718763
3 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -2734,7 +2734,8 @@ module RubyVM::RJIT
# @param asm [RubyVM::RJIT::Assembler]
def jit_rb_str_empty_p(jit, ctx, asm, argc, known_recv_class)
# Assume same offset to len embedded or not so we can use one code path to read the length
assert_equal(C.RString.offsetof(:as, :heap, :len), C.RString.offsetof(:as, :embed, :len))
#assert_equal(C.RString.offsetof(:as, :heap, :len), C.RString.offsetof(:as, :embed, :len))
# `C.RString.offsetof(:as, :embed, :len)` doesn't work because of USE_RVARGC=0 CI
recv_opnd = ctx.stack_pop(1)
out_opnd = ctx.stack_push

Просмотреть файл

@ -768,11 +768,6 @@ module RubyVM::RJIT # :nodoc: all
shared: self.VALUE,
), Primitive.cexpr!("OFFSETOF(((struct RString *)NULL)->as.heap, aux)")],
),
embed: CType::Struct.new(
"", Primitive.cexpr!("SIZEOF(((struct RString *)NULL)->as.embed)"),
len: [CType::Immediate.parse("long"), Primitive.cexpr!("OFFSETOF(((struct RString *)NULL)->as.embed, len)")],
ary: [CType::Pointer.new { CType::Immediate.parse("char") }, Primitive.cexpr!("OFFSETOF(((struct RString *)NULL)->as.embed, ary)")],
),
), Primitive.cexpr!("OFFSETOF((*((struct RString *)NULL)), as)")],
)
end

Просмотреть файл

@ -606,6 +606,7 @@ generator = BindingGenerator.new(
],
skip_fields: {
'rb_execution_context_struct.machine': %w[regs], # differs between macOS and Linux
'RString.as': %w[embed], # doesn't compile on USE_RVARGC=0 CI
rb_execution_context_struct: %w[method_missing_reason], # non-leading bit fields not supported
rb_iseq_constant_body: %w[yjit_payload], # conditionally defined
rb_thread_struct: %w[status locking_native_thread to_kill abort_on_exception report_on_exception pending_interrupt_queue_checked],