diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index d441d22842e1c4..5517985c1c153c 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -98,7 +98,7 @@ jobs: rustup install ${{ matrix.rust_version }} --profile minimal rustup default ${{ matrix.rust_version }} - - uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0 + - uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 412167da4ed1ba..80c7a0cb7986bf 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -141,7 +141,7 @@ jobs: ruby-version: '3.1' bundler: none - - uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0 + - uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/eval_intern.h b/eval_intern.h index 954ba6a1842484..5e4249e0b87d6c 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -125,9 +125,8 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval #define EC_REPUSH_TAG() (void)(_ec->tag = &_tag) -#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || defined __clang__ -/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings. - * This macro also prevents Clang from dumping core in EC_EXEC_TAG(). +#if defined __clang__ +/* This macro prevents Clang from dumping core in EC_EXEC_TAG(). * (I confirmed Clang 4.0.1 and 5.0.0.) */ # define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var)) diff --git a/iseq.c b/iseq.c index 65ab43f85635db..720c8f976b5ad5 100644 --- a/iseq.c +++ b/iseq.c @@ -1359,8 +1359,8 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, V { rb_iseq_t *iseq = NULL; rb_compile_option_t option; -#if !defined(__GNUC__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 8) -# define INITIALIZED volatile /* suppress warnings by gcc 4.8 */ +#if !defined(__GNUC__) +# define INITIALIZED volatile /* suppress warnings */ #else # define INITIALIZED /* volatile */ #endif diff --git a/vm_exec.h b/vm_exec.h index ecf8df3c7da378..0db016ec164f07 100644 --- a/vm_exec.h +++ b/vm_exec.h @@ -93,16 +93,7 @@ error ! /* token threaded code */ /* dispatcher */ -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3 -#define DISPATCH_ARCH_DEPEND_WAY(addr) \ - __asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr)) - -#else -#define DISPATCH_ARCH_DEPEND_WAY(addr) \ - /* do nothing */ -#endif #define TC_DISPATCH(insn) \ - DISPATCH_ARCH_DEPEND_WAY(insns_address_table[GET_CURRENT_INSN()]); \ INSN_DISPATCH_SIG(insn); \ RB_GNUC_EXTENSION_BLOCK(goto *insns_address_table[GET_CURRENT_INSN()]); \ rb_bug("tc error"); diff --git a/win32/setup.mak b/win32/setup.mak index 19ace3445c2568..db0445302275f7 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -160,11 +160,10 @@ main(void) return c != value_nan(); } << - @( \ - $(CC) -O2 $@.c && .\$@ || \ - (set bug=%ERRORLEVEL% & \ - echo This compiler has an optimization bug) \ - ) & $(WIN32DIR:/=\)\rm.bat $@.* & exit /b %bug% + @($(CC) -O2 $@.c && .\$@) || \ + (echo This compiler has an optimization bug & \ + $(WIN32DIR:/=\)\rm.bat $@.* & exit /b 1) + @$(WIN32DIR:/=\)\rm.bat $@.* -version-: nul verconf.mk diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index e16e7df836d66b..7225fcdc3800bb 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -2980,6 +2980,13 @@ impl Function { } } + /// Return whether the representative of `insn_id` is a `SendDirect` without + /// cloning the instruction or resolving its operands. + fn is_send_direct(&self, insn_id: InsnId) -> bool { + let insn_id = self.union_find.borrow().find_const(insn_id); + matches!(&self.insns[insn_id.0], Insn::SendDirect(..)) + } + fn new_block(&mut self, insn_idx: u32) -> BlockId { let id = BlockId(self.blocks.len()); let block = Block { @@ -5062,7 +5069,7 @@ impl Function { let mut search_start = 0; loop { let Some(offset) = self.blocks[block.0].insns[search_start..].iter() - .position(|&id| matches!(self.find(id), Insn::SendDirect(..))) + .position(|&id| self.is_send_direct(id)) else { break; }; @@ -5171,7 +5178,7 @@ impl Function { // pre-Send body, before the PushLightweightFrame and Jump we add // last). let tail = self.blocks[block.0].insns.split_off(send_pos); - debug_assert!(matches!(self.find(tail[0]), Insn::SendDirect(..))); + debug_assert!(self.is_send_direct(tail[0])); let omitted_opt_num = opt_num - passed_opt_num; let positional_kw_end = lead_num + opt_num + rest_slots + post_num + kw_num;