diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 61ee5209592d1b..c071aee30bfe5c 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -69,7 +69,7 @@ jobs: test-all-opts: '--name=!/TestObjSpace#test_reachable_objects_during_iteration/' - msystem: 'CLANGARM64' os: 11-arm - test_task: 'test' + test_task: 'check' fail-fast: false if: >- diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index d37dee59ff963c..18a9ef1523ec5d 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -225,17 +225,32 @@ strio_s_allocate(VALUE klass) * call-seq: * StringIO.new(string = '', mode = 'r+') -> new_stringio * - * Note that +mode+ defaults to 'r' if +string+ is frozen. - * * Returns a new \StringIO instance formed from +string+ and +mode+; - * see {Access Modes}[rdoc-ref:File@Access+Modes]: + * the instance should be closed when no longer needed: * - * strio = StringIO.new # => # + * strio = StringIO.new + * strio.string # => "" + * strio.closed_read? # => false + * strio.closed_write? # => false * strio.close * - * The instance should be closed when no longer needed. + * If +string+ is frozen, the default +mode+ is 'r': + * + * strio = StringIO.new('foo'.freeze) + * strio.string # => "foo" + * strio.closed_read? # => false + * strio.closed_write? # => true + * strio.close + * + * Argument +mode+ must be a valid + * {Access Mode}[rdoc-ref:File@Access+Modes], + * which may be a string or an integer constant: + * + * StringIO.new('foo', 'w+') + * StringIO.new('foo', File::RDONLY) * - * Related: StringIO.open (accepts block; closes automatically). + * Related: StringIO.open + * (passes the \StringIO object to the block; closes the object automatically on block exit). */ static VALUE strio_initialize(int argc, VALUE *argv, VALUE self) @@ -712,7 +727,7 @@ strio_set_lineno(VALUE self, VALUE lineno) * binmode -> self * * Sets the data mode in +self+ to binary mode; - * see {Data Mode}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Data+Mode]. + * see {Data Mode}[rdoc-ref:File@Data+Mode]. * */ static VALUE diff --git a/namespace.c b/namespace.c index b85cbf57157924..4e5a4e9bc42491 100644 --- a/namespace.c +++ b/namespace.c @@ -268,7 +268,7 @@ const rb_data_type_t rb_root_namespace_data_type = { namespace_entry_memsize, rb_namespace_gc_update_references, }, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers + &rb_namespace_data_type, 0, RUBY_TYPED_FREE_IMMEDIATELY // TODO: enable RUBY_TYPED_WB_PROTECTED when inserting write barriers }; VALUE diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 029e144303f999..0a3be9277bb0e8 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -506,12 +506,9 @@ fn gen_get_ep(asm: &mut Assembler, level: u32) -> Opnd { fn gen_objtostring(jit: &mut JITState, asm: &mut Assembler, val: Opnd, cd: *const rb_call_data, state: &FrameState) -> Opnd { gen_prepare_non_leaf_call(jit, asm, state); - - let iseq_opnd = Opnd::Value(jit.iseq.into()); - // TODO: Specialize for immediate types // Call rb_vm_objtostring(iseq, recv, cd) - let ret = asm_ccall!(asm, rb_vm_objtostring, iseq_opnd, val, (cd as usize).into()); + let ret = asm_ccall!(asm, rb_vm_objtostring, VALUE(jit.iseq as usize).into(), val, (cd as usize).into()); // TODO: Call `to_s` on the receiver if rb_vm_objtostring returns Qundef // Need to replicate what CALL_SIMPLE_METHOD does @@ -836,16 +833,12 @@ fn gen_setivar(jit: &mut JITState, asm: &mut Assembler, recv: Opnd, id: ID, val: fn gen_getclassvar(jit: &mut JITState, asm: &mut Assembler, id: ID, ic: *const iseq_inline_cvar_cache_entry, state: &FrameState) -> Opnd { gen_prepare_non_leaf_call(jit, asm, state); - - let iseq = asm.load(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_ISEQ)); - asm_ccall!(asm, rb_vm_getclassvariable, iseq, CFP, id.0.into(), Opnd::const_ptr(ic)) + asm_ccall!(asm, rb_vm_getclassvariable, VALUE(jit.iseq as usize).into(), CFP, id.0.into(), Opnd::const_ptr(ic)) } fn gen_setclassvar(jit: &mut JITState, asm: &mut Assembler, id: ID, val: Opnd, ic: *const iseq_inline_cvar_cache_entry, state: &FrameState) { gen_prepare_non_leaf_call(jit, asm, state); - - let iseq = asm.load(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_ISEQ)); - asm_ccall!(asm, rb_vm_setclassvariable, iseq, CFP, id.0.into(), val, Opnd::const_ptr(ic)); + asm_ccall!(asm, rb_vm_setclassvariable, VALUE(jit.iseq as usize).into(), CFP, id.0.into(), val, Opnd::const_ptr(ic)); } /// Look up global variables