Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-v…
Browse files Browse the repository at this point in the history
…ersion-1
  • Loading branch information
rm155 committed Aug 17, 2023
2 parents 997f3a4 + 5db8b9b commit e4bd8cb
Show file tree
Hide file tree
Showing 698 changed files with 15,415 additions and 10,154 deletions.
11 changes: 6 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ environment:
# is limited, and compatibility issues that happen only in newer versions are rare.
# You may test some other stuff on GitHub Actions instead.
- build: vs
vs: 120
vs: 120 # Visual Studio 2013
ssl: OpenSSL-v111
# The worker image name. This is NOT the Visual Studio version we're using here.
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GEMS_FOR_TEST: ""
RELINE_TEST_ENCODING: "UTF-8"
Expand Down Expand Up @@ -92,8 +93,8 @@ for:
- nmake -l "TESTOPTS=-v -q" btest
- nmake -l "TESTOPTS=-v -q" test-basic
- >-
nmake -l "TESTOPTS=-v --timeout-scale=3.0
--excludes=../test/excludes/_appveyor -j%JOBS%
nmake -l "TESTOPTS=--timeout-scale=3.0
--excludes=../test/.excludes/_appveyor -j%JOBS%
--exclude win32ole
--exclude test_bignum
--exclude test_syntax
Expand All @@ -103,15 +104,15 @@ for:
# separately execute tests without -j which may crash worker with -j.
- >-
nmake -l
"TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor"
"TESTOPTS=--timeout-scale=3.0 --excludes=../test/.excludes/_appveyor"
TESTS="
../test/win32ole
../test/ruby/test_bignum.rb
../test/ruby/test_syntax.rb
../test/open-uri/test_open-uri.rb
../test/rubygems/test_bundled_ca.rb
" test-all
- nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
- nmake -l test-spec # not using `-j` because sometimes `mspec -j` silently dies on Windows
notifications:
- provider: Webhook
method: POST
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ runs:
working-directory: ${{ inputs.srcdir }}
run: |
touch config.status
touch rbconfig.time
touch .rbconfig.time
sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
make up
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
mv /c/Windows/System32/libssl-1_1-x64.dll /c/Windows/System32/libssl-1_1-x64.dll_
result=true
for e in gcc.exe ragel.exe make.exe libcrypto-1_1-x64.dll libssl-1_1-x64.dll; do
echo '##['group']'$'\033[93m'$e$'\033[m'
echo ::group::$'\033[93m'$e$'\033[m'
where $e || result=false
echo '##['endgroup']'
echo ::endgroup::
done
$result
working-directory:
Expand All @@ -91,9 +91,9 @@ jobs:
result=true
for e in gcc ragel make "openssl version"; do
case "$e" in *" "*) ;; *) e="$e --version";; esac
echo '##['group']'$'\033[93m'$e$'\033[m'
echo ::group::$'\033[93m'$e$'\033[m'
$e || result=false
echo '##['endgroup']'
echo ::endgroup::
done
$result
working-directory:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ jobs:
:vcset
set | C:\msys64\usr\bin\sort > old.env
call %VCVARS%
nmake -f nul
set TMP=%USERPROFILE%\AppData\Local\Temp
set TEMP=%USERPROFILE%\AppData\Local\Temp
set MAKEFLAGS=l
set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
set | C:\msys64\usr\bin\sort > new.env
C:\msys64\usr\bin\comm -13 old.env new.env >> %GITHUB_ENV%
Expand Down Expand Up @@ -162,7 +164,7 @@ jobs:
- run: nmake test
timeout-minutes: 5

- run: nmake test-spec MSPECOPT="-V -fspec"
- run: nmake test-spec
timeout-minutes: 10

- run: nmake test-all
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ script:
if [ -n "${TEST_ALL_OPTS_SEPARATED}" ]; then
$SETARCH make -s test-all -o exts TESTOPTS="$JOBS -v --tty=no ${TEST_ALL_OPTS_SEPARATED}" RUBYOPT="-w" || :
fi
- $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
- $SETARCH make -s test-spec # not using `-j` because sometimes `mspec -j` silently dies
- $SETARCH make -s -o showflags leaked-globals

# We enable Travis on the specific branches or forked repositories here.
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ The following default gems are updated.
* time 0.2.2
* timeout 0.4.0
* uri 0.12.2
* yarp 0.4.0
* yarp 0.7.0

The following bundled gems are updated.

* minitest 5.19.0
* test-unit 3.6.1
* rexml 3.2.6
* rss 0.3.0
* net-imap 0.3.7
* rbs 3.1.3
* typeprof 0.21.7
Expand Down
4 changes: 2 additions & 2 deletions array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def sample(n = (ary = false), random: Random)
#
# If +self+ is empty, returns +nil+.
#
# When non-negative \Integer argument +n+ is given,
# When non-negative Integer argument +n+ is given,
# returns the first +n+ elements in a new \Array:
#
# a = [:foo, 'bar', 2]
Expand Down Expand Up @@ -125,7 +125,7 @@ def first n = unspecified = true
#
# If +self+ is empty, returns +nil+.
#
# When non-negative \Integer argument +n+ is given,
# When non-negative Integer argument +n+ is given,
# returns the last +n+ elements in a new \Array:
#
# a = [:foo, 'bar', 2]
Expand Down
54 changes: 54 additions & 0 deletions bootstraptest/test_yjit.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# test splat filling required and feeding rest
assert_equal '[0, 1, 2, [3, 4]]', %q{
public def lead_rest(a, b, *rest)
[self, a, b, rest]
end
def call(args) = 0.lead_rest(*args)
call([1, 2, 3, 4])
}

# test missing opts are nil initialized
assert_equal '[[0, 1, nil, 3], [0, 1, nil, 3], [0, 1, nil, 3, []], [0, 1, nil, 3, []]]', %q{
public def lead_opts(a, b=binding.local_variable_get(:c), c=3)
[self, a, b, c]
end
public def opts_rest(a=raise, b=binding.local_variable_get(:c), c=3, *rest)
[self, a, b, c, rest]
end
def call(args)
[
0.lead_opts(1),
0.lead_opts(*args),
0.opts_rest(1),
0.opts_rest(*args),
]
end
call([1])
}

# test filled optionals with unspecified keyword param
assert_equal 'ok', %q{
def opt_rest_opt_kw(_=1, *, k: :ok) = k
def call = opt_rest_opt_kw(0)
call
}

# test splat empty array with rest param
assert_equal '[0, 1, 2, []]', %q{
public def foo(a=1, b=2, *rest)
[self, a, b, rest]
end
def call(args) = 0.foo(*args)
call([])
}

# Regression test for yielding with autosplat to block with
# optional parameters. https://github.com/Shopify/yjit/issues/313
assert_equal '[:a, :b, :a, :b]', %q{
Expand Down
59 changes: 33 additions & 26 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -85,32 +85,14 @@ MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \
YARP_FILES = yarp/api_node.$(OBJEXT) \
yarp/api_pack.$(OBJEXT) \
yarp/diagnostic.$(OBJEXT) \
yarp/enc/yp_ascii.$(OBJEXT) \
yarp/enc/yp_big5.$(OBJEXT) \
yarp/enc/yp_euc_jp.$(OBJEXT) \
yarp/enc/yp_gbk.$(OBJEXT) \
yarp/enc/yp_iso_8859_1.$(OBJEXT) \
yarp/enc/yp_iso_8859_10.$(OBJEXT) \
yarp/enc/yp_iso_8859_11.$(OBJEXT) \
yarp/enc/yp_iso_8859_13.$(OBJEXT) \
yarp/enc/yp_iso_8859_14.$(OBJEXT) \
yarp/enc/yp_iso_8859_15.$(OBJEXT) \
yarp/enc/yp_iso_8859_16.$(OBJEXT) \
yarp/enc/yp_iso_8859_2.$(OBJEXT) \
yarp/enc/yp_iso_8859_3.$(OBJEXT) \
yarp/enc/yp_iso_8859_4.$(OBJEXT) \
yarp/enc/yp_iso_8859_5.$(OBJEXT) \
yarp/enc/yp_iso_8859_6.$(OBJEXT) \
yarp/enc/yp_iso_8859_7.$(OBJEXT) \
yarp/enc/yp_iso_8859_8.$(OBJEXT) \
yarp/enc/yp_iso_8859_9.$(OBJEXT) \
yarp/enc/yp_koi8_r.$(OBJEXT) \
yarp/enc/yp_shared.$(OBJEXT) \
yarp/enc/yp_shift_jis.$(OBJEXT) \
yarp/enc/yp_tables.$(OBJEXT) \
yarp/enc/yp_unicode.$(OBJEXT) \
yarp/enc/yp_windows_1251.$(OBJEXT) \
yarp/enc/yp_windows_1252.$(OBJEXT) \
yarp/enc/yp_windows_31j.$(OBJEXT) \
yarp/extension.$(OBJEXT) \
yarp/node.$(OBJEXT) \
yarp/pack.$(OBJEXT) \
yarp/prettyprint.$(OBJEXT) \
Expand All @@ -130,8 +112,7 @@ YARP_FILES = yarp/api_node.$(OBJEXT) \
yarp/util/yp_strncasecmp.$(OBJEXT) \
yarp/util/yp_strpbrk.$(OBJEXT) \
yarp/yarp.$(OBJEXT) \
yarp/yarp_init.$(OBJEXT) \
yarp/extension.$(OBJEXT)
yarp/yarp_init.$(OBJEXT)

COMMONOBJS = array.$(OBJEXT) \
ast.$(OBJEXT) \
Expand Down Expand Up @@ -259,7 +240,7 @@ INSTALL_DATA_MODE = 0644
BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY) $(BOOTSTRAPRUBY_OPT)
TESTSDIR = $(srcdir)/test
TOOL_TESTSDIR = $(tooldir)/test
TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/
TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/.excludes --name=!/memory_leak/
TESTWORKDIR = testwork
TESTOPTS = $(RUBY_TESTOPTS)

Expand Down Expand Up @@ -883,10 +864,12 @@ test-sample: test-basic # backward compatibility for mswin-build
test-short: btest-ruby $(DOT_WAIT) test-knownbug $(DOT_WAIT) test-basic
test: test-short

yes-test-all-precheck: programs encs exts PHONY $(DOT_WAIT)

# $ make test-all TESTOPTS="--help" displays more detail
# for example, make test-all TESTOPTS="-j2 -v -n test-name -- test-file-name"
test-all: $(TEST_RUNNABLE)-test-all
yes-test-all: programs PHONY
yes-test-all: yes-test-all-precheck
$(ACTIONS_GROUP)
$(gnumake_recursive)$(Q)$(exec) $(RUNRUBY) "$(TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(TESTS)
$(ACTIONS_ENDGROUP)
Expand Down Expand Up @@ -928,10 +911,10 @@ $(RBCONFIG): $(tooldir)/mkconfig.rb config.status $(srcdir)/version.h $(srcdir)/
test-rubyspec: test-spec
yes-test-rubyspec: yes-test-spec

test-spec-precheck: programs yes-fake
yes-test-spec-precheck: yes-test-all-precheck yes-fake

test-spec: $(TEST_RUNNABLE)-test-spec
yes-test-spec: test-spec-precheck
yes-test-spec: yes-test-spec-precheck
$(ACTIONS_GROUP)
$(gnumake_recursive)$(Q) \
$(RUNRUBY) -r./$(arch)-fake -r$(tooldir)/rubyspec_temp \
Expand Down Expand Up @@ -1544,6 +1527,7 @@ check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest
test-bundler-precheck: $(TEST_RUNNABLE)-test-bundler-precheck
no-test-bundler-precheck:
yes-test-bundler-precheck: main $(arch)-fake.rb
yes-test-bundler-parallel-precheck: yes-test-bundler-precheck

test-bundler-prepare: $(TEST_RUNNABLE)-test-bundler-prepare
no-test-bundler-prepare: no-test-bundler-precheck
Expand Down Expand Up @@ -19327,6 +19311,11 @@ yarp/enc/yp_shift_jis.$(OBJEXT): $(top_srcdir)/yarp/defines.h
yarp/enc/yp_shift_jis.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_encoding.h
yarp/enc/yp_shift_jis.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_shift_jis.c
yarp/enc/yp_shift_jis.$(OBJEXT): {$(VPATH)}config.h
yarp/enc/yp_tables.$(OBJEXT): $(top_srcdir)/yarp/config.h
yarp/enc/yp_tables.$(OBJEXT): $(top_srcdir)/yarp/defines.h
yarp/enc/yp_tables.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_encoding.h
yarp/enc/yp_tables.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_tables.c
yarp/enc/yp_tables.$(OBJEXT): {$(VPATH)}config.h
yarp/enc/yp_unicode.$(OBJEXT): $(top_srcdir)/yarp/config.h
yarp/enc/yp_unicode.$(OBJEXT): $(top_srcdir)/yarp/defines.h
yarp/enc/yp_unicode.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_encoding.h
Expand Down Expand Up @@ -19587,6 +19576,7 @@ yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/regexp.c
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/regexp.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_constant_pool.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_list.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_memchr.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_newline_list.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_state_stack.h
yarp/regexp.$(OBJEXT): $(top_srcdir)/yarp/util/yp_string.h
Expand All @@ -19595,15 +19585,25 @@ yarp/regexp.$(OBJEXT): {$(VPATH)}config.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/ast.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/config.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/defines.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/diagnostic.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_encoding.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/node.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/pack.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/parser.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/regexp.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/serialize.c
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/unescape.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_buffer.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_char.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_constant_pool.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_list.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_memchr.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_newline_list.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_state_stack.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_string.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_string_list.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/util/yp_strpbrk.h
yarp/serialize.$(OBJEXT): $(top_srcdir)/yarp/yarp.h
yarp/serialize.$(OBJEXT): {$(VPATH)}config.h
yarp/token_type.$(OBJEXT): $(top_srcdir)/yarp/ast.h
yarp/token_type.$(OBJEXT): $(top_srcdir)/yarp/config.h
Expand All @@ -19617,16 +19617,23 @@ yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/config.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/defines.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/diagnostic.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/enc/yp_encoding.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/node.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/pack.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/parser.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/regexp.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/unescape.c
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/unescape.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_buffer.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_char.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_constant_pool.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_list.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_memchr.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_newline_list.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_state_stack.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_string.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_string_list.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/util/yp_strpbrk.h
yarp/unescape.$(OBJEXT): $(top_srcdir)/yarp/yarp.h
yarp/unescape.$(OBJEXT): {$(VPATH)}config.h
yarp/util/yp_buffer.$(OBJEXT): $(top_srcdir)/yarp/config.h
yarp/util/yp_buffer.$(OBJEXT): $(top_srcdir)/yarp/defines.h
Expand Down
6 changes: 0 additions & 6 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -10222,12 +10222,6 @@ dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr,
fflush(stdout);
}

bool
rb_insns_leaf_p(int i)
{
return insn_leaf_p(i);
}

int
rb_insn_len(VALUE insn)
{
Expand Down
Loading

0 comments on commit e4bd8cb

Please sign in to comment.