Skip to content

Commit 23a726a

Browse files
committed
Merge remote-tracking branch 'shopify/yjit' into yjit-getters
2 parents 9a0d83e + 5d72a4c commit 23a726a

78 files changed

Lines changed: 1015 additions & 656 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ in the mail body (not subject) to the address [ruby-talk-request@ruby-lang.org].
9292

9393
4. Edit `include/ruby/defines.h` if you need. Usually this step will not be needed.
9494

95-
5. Remove comment mark(`#`) before the module names from `ext/Setup` (or add
96-
module names if not present), if you want to link modules statically.
95+
5. Optional: Remove comment mark(`#`) before the module names from `ext/Setup`.
9796

98-
If you don't want to compile non static extension modules (probably on
99-
architectures which do not allow dynamic loading), remove comment mark
100-
from the line "`#option nodynamic`" in `ext/Setup`.
97+
This step is only necessary if you want to link modules statically.
98+
99+
If you don't want to compile dynamic extensions (probably on architectures
100+
which do not allow dynamic loading), remove comment mark from the line
101+
"`#option nodynamic`" in `ext/Setup`.
101102

102103
Usually this step will not be needed.
103104

benchmark/hash_first.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prelude: |
2+
hash1 = 1_000_000.times.to_h { [rand, true]}
3+
hash2 = hash1.dup
4+
hash2.keys[1..100_000].each { hash2.delete _1 }
5+
hash2.delete hash2.first[0]
6+
7+
benchmark:
8+
hash1: hash1.first
9+
hash2: hash2.first
10+
11+
loop_count: 100_000

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
185185
--make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \
186186
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
187187
--
188-
INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(tooldir)/rbinstall.rb
188+
INSTRUBY = $(SUDO) $(INSTRUBY_ENV) $(RUNRUBY) -r./$(arch)-fake $(tooldir)/rbinstall.rb
189189
INSTRUBY_ARGS = $(SCRIPT_ARGS) \
190190
--data-mode=$(INSTALL_DATA_MODE) \
191191
--prog-mode=$(INSTALL_PROG_MODE) \

configure.ac

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ AS_IF([test x"${RPATHFLAG}" = x], [
583583
rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'`
584584
])
585585

586-
RUBY_TRY_CFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
586+
RUBY_TRY_LDFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
587587
AS_IF([test "$fdeclspec" = yes], [
588588
RUBY_APPEND_OPTIONS(CFLAGS, -fdeclspec)
589589
RUBY_APPEND_OPTIONS(cflags, -fdeclspec)
@@ -1558,7 +1558,9 @@ AS_IF([test "$GCC" = yes], [
15581558
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
15591559
[RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
15601560
])
1561+
])
15611562

1563+
{
15621564
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
15631565
AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
15641566
[[
@@ -1589,7 +1591,6 @@ AS_IF([test "$GCC" = yes], [
15891591
AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
15901592
AC_DEFINE(HAVE_GCC_SYNC_BUILTINS)
15911593
])
1592-
])
15931594

15941595
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
15951596
[RUBY_WERROR_FLAG(
@@ -1602,6 +1603,7 @@ AS_IF([test "$GCC" = yes], [
16021603
AS_IF([test "$rb_cv_func___builtin_unreachable" = yes], [
16031604
AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()])
16041605
])
1606+
}
16051607

16061608
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
16071609
rb_cv_func_exported=no
@@ -1700,6 +1702,7 @@ RUBY_CHECK_SIGNEDNESS(size_t, [AC_MSG_ERROR(size_t is signed)], [],
17001702
[@%:@include <sys/types.h>])
17011703
RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
17021704
RUBY_CHECK_SIZEOF(ptrdiff_t, size_t, [], [@%:@include <stddef.h>])
1705+
RUBY_CHECK_SIZEOF(dev_t)
17031706
RUBY_CHECK_PRINTF_PREFIX(size_t, z)
17041707
RUBY_CHECK_PRINTF_PREFIX(ptrdiff_t, t)
17051708
AC_CHECK_MEMBERS([struct stat.st_blksize])
@@ -1710,6 +1713,10 @@ AS_IF([test "$ac_cv_member_struct_stat_st_blocks" = yes], [
17101713
RUBY_CHECK_SIZEOF([struct stat.st_blocks], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
17111714
])
17121715
RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include <sys/stat.h>])
1716+
RUBY_CHECK_SIZEOF([struct stat.st_dev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
1717+
AS_IF([test "$ac_cv_member_struct_stat_st_rdev" = yes], [
1718+
RUBY_CHECK_SIZEOF([struct stat.st_rdev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
1719+
])
17131720
AC_CHECK_MEMBERS([struct stat.st_atim])
17141721
AC_CHECK_MEMBERS([struct stat.st_atimespec])
17151722
AC_CHECK_MEMBERS([struct stat.st_atimensec])

defs/gmake.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ override mflags := $(filter-out -j%,$(MFLAGS))
66
MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
77
nproc = $(subst -j,,$(filter -j%,$(MFLAGS)))
88

9+
ifneq ($(filter %darwin%,$(arch)),)
10+
INSTRUBY_ENV += SDKROOT=/
11+
endif
12+
913
CHECK_TARGETS := great exam love check test check% test% btest%
1014
# expand test targets, and those dependents
1115
TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))

dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3261,7 +3261,7 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
32613261
* File.fnmatch('**.rb', 'main.rb') #=> true
32623262
* File.fnmatch('**.rb', './main.rb') #=> false
32633263
* File.fnmatch('**.rb', 'lib/song.rb') #=> true
3264-
* File.fnmatch('*', 'dave/.profile') #=> true
3264+
* File.fnmatch('*', 'dave/.profile') #=> true
32653265
*
32663266
* pattern = '*' '/' '*'
32673267
* File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME) #=> false

0 commit comments

Comments
 (0)