Skip to content

Commit dd20a3d

Browse files
committed
Merge branch 'sir-mirjit-base' into sir-mirjit
2 parents 276a06d + 08608be commit dd20a3d

File tree

2,141 files changed

+84838
-44610
lines changed

Some content is hidden

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

2,141 files changed

+84838
-44610
lines changed

Diff for: .appveyor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ skip_commits:
2020
- '**/*.[1-8]'
2121
- '**/*.ronn'
2222
environment:
23-
ruby_version: "24-%Platform%"
23+
ruby_version: "25-%Platform%"
2424
matrix:
2525
# Test only the oldest supported version because AppVeyor is unstable, its concurrency
2626
# is limited, and compatibility issues that happen only in newer versions are rare.
@@ -75,6 +75,7 @@ for:
7575
- attrib +r /s /d
7676
- mkdir %Platform%-mswin_%vs%
7777
build_script:
78+
- set HAVE_GIT=no
7879
- cd %APPVEYOR_BUILD_FOLDER%
7980
- cd %Platform%-mswin_%vs%
8081
- >-

Diff for: .cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ task:
5454
make_extract-extlibs_script: make extract-extlibs
5555
make_incs_script: make incs
5656
make_script: make
57-
make_leaked-globals_script: make leaked-globals
5857
make_test_script: make test
5958
make_install_script: make install
6059
install_gems_for_test_script: $RUBY_PREFIX/bin/gem install --no-doc timezone tzinfo
@@ -131,3 +130,4 @@ yjit_task:
131130
make_test_script: source $HOME/.cargo/env && make test RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
132131
make_test_all_script: source $HOME/.cargo/env && make test-all RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx" TESTOPTS="$RUBY_TESTOPTS"
133132
make_test_spec_script: source $HOME/.cargo/env && make test-spec RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
133+
clippy_script: source $HOME/.cargo/env && cd yjit && cargo clippy --all-targets --all-features

Diff for: .document

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ gc.rb
1818
io.rb
1919
kernel.rb
2020
marshal.rb
21+
rjit.rb
2122
numeric.rb
2223
nilclass.rb
2324
pack.rb
@@ -28,6 +29,7 @@ timev.rb
2829
thread_sync.rb
2930
trace_point.rb
3031
warning.rb
32+
yjit.rb
3133

3234
# the lib/ directory (which has its own .document file)
3335
lib

Diff for: .gdbinit

+29-27
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ define rp
6767
printf "%sT_OBJECT%s: ", $color_type, $color_end
6868
print ((struct RObject *)($arg0))->basic
6969
if ($flags & ROBJECT_EMBED)
70-
print/x *((VALUE*)((struct RObject*)($arg0))->as.ary) @ (ROBJECT_EMBED_LEN_MAX+0)
70+
print/x *((VALUE*)((struct RObject*)($arg0))->as.ary) @ (rb_shape_get_shape($arg0)->capacity)
7171
else
7272
print (((struct RObject *)($arg0))->as.heap)
7373
if (((struct RObject*)($arg0))->as.heap.numiv) > 0
@@ -104,8 +104,8 @@ define rp
104104
(($rsflags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
105105
set print address off
106106
output *(char *)(($rsflags & RUBY_FL_USER1) ? \
107-
((struct RString*)$regsrc)->as.heap.ptr : \
108-
((struct RString*)$regsrc)->as.ary) @ $len
107+
((struct RString*)$regsrc)->as.heap.ptr : \
108+
((struct RString*)$regsrc)->as.ary) @ $len
109109
set print address on
110110
printf " len:%ld ", $len
111111
if $flags & RUBY_FL_USER6
@@ -126,26 +126,26 @@ define rp
126126
printf "%sT_ARRAY%s: len=%ld ", $color_type, $color_end, $len
127127
printf "(embed) "
128128
if ($len == 0)
129-
printf "{(empty)} "
129+
printf "{(empty)} "
130130
else
131-
print/x *((VALUE*)((struct RArray*)($arg0))->as.ary) @ $len
132-
printf " "
131+
print/x *((VALUE*)((struct RArray*)($arg0))->as.ary) @ $len
132+
printf " "
133133
end
134134
else
135135
set $len = ((struct RArray*)($arg0))->as.heap.len
136136
printf "%sT_ARRAY%s: len=%ld ", $color_type, $color_end, $len
137137
if ($flags & RUBY_FL_USER2)
138-
printf "(shared) shared="
139-
output/x ((struct RArray*)($arg0))->as.heap.aux.shared_root
140-
printf " "
138+
printf "(shared) shared="
139+
output/x ((struct RArray*)($arg0))->as.heap.aux.shared_root
140+
printf " "
141141
else
142-
printf "(ownership) capa=%ld ", ((struct RArray*)($arg0))->as.heap.aux.capa
142+
printf "(ownership) capa=%ld ", ((struct RArray*)($arg0))->as.heap.aux.capa
143143
end
144144
if ($len == 0)
145-
printf "{(empty)} "
145+
printf "{(empty)} "
146146
else
147-
print/x *((VALUE*)((struct RArray*)($arg0))->as.heap.ptr) @ $len
148-
printf " "
147+
print/x *((VALUE*)((struct RArray*)($arg0))->as.heap.ptr) @ $len
148+
printf " "
149149
end
150150
end
151151
print (struct RArray *)($arg0)
@@ -445,8 +445,8 @@ define output_string
445445
(($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
446446
if $len > 0
447447
output *(char *)(($flags & RUBY_FL_USER1) ? \
448-
((struct RString*)($arg0))->as.heap.ptr : \
449-
((struct RString*)($arg0))->as.ary) @ $len
448+
((struct RString*)($arg0))->as.heap.ptr : \
449+
((struct RString*)($arg0))->as.ary) @ $len
450450
else
451451
output ""
452452
end
@@ -459,8 +459,8 @@ define print_string
459459
(($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
460460
if $len > 0
461461
printf "%s", *(char *)(($flags & RUBY_FL_USER1) ? \
462-
((struct RString*)($arg0))->as.heap.ptr : \
463-
((struct RString*)($arg0))->as.ary) @ $len
462+
((struct RString*)($arg0))->as.heap.ptr : \
463+
((struct RString*)($arg0))->as.ary) @ $len
464464
end
465465
end
466466

@@ -868,22 +868,22 @@ define rb_numtable_entry
868868
set $rb_numtable_p = $rb_numtable_tbl->as.packed.bins
869869
while $rb_numtable_p && $rb_numtable_p < $rb_numtable_tbl->as.packed.bins+$rb_numtable_tbl->num_entries
870870
if $rb_numtable_p.k == $rb_numtable_id
871-
set $rb_numtable_key = $rb_numtable_p.k
872-
set $rb_numtable_rec = $rb_numtable_p.v
873-
set $rb_numtable_p = 0
871+
set $rb_numtable_key = $rb_numtable_p.k
872+
set $rb_numtable_rec = $rb_numtable_p.v
873+
set $rb_numtable_p = 0
874874
else
875-
set $rb_numtable_p = $rb_numtable_p + 1
875+
set $rb_numtable_p = $rb_numtable_p + 1
876876
end
877877
end
878878
else
879879
set $rb_numtable_p = $rb_numtable_tbl->as.big.bins[st_numhash($rb_numtable_id) % $rb_numtable_tbl->num_bins]
880880
while $rb_numtable_p
881881
if $rb_numtable_p->key == $rb_numtable_id
882-
set $rb_numtable_key = $rb_numtable_p->key
883-
set $rb_numtable_rec = $rb_numtable_p->record
884-
set $rb_numtable_p = 0
882+
set $rb_numtable_key = $rb_numtable_p->key
883+
set $rb_numtable_rec = $rb_numtable_p->record
884+
set $rb_numtable_p = 0
885885
else
886-
set $rb_numtable_p = $rb_numtable_p->next
886+
set $rb_numtable_p = $rb_numtable_p->next
887887
end
888888
end
889889
end
@@ -961,7 +961,7 @@ define iseq
961961
set $operand_size = ((INSN*)($arg0))->operand_size
962962
set $operands = ((INSN*)($arg0))->operands
963963
while $i < $operand_size
964-
rp $operands[$i++]
964+
rp $operands[$i++]
965965
end
966966
end
967967
end
@@ -1281,7 +1281,7 @@ end
12811281

12821282
# Details: https://bugs.ruby-lang.org/projects/ruby-master/wiki/MachineInstructionsTraceWithGDB
12831283
define trace_machine_instructions
1284-
set logging on
1284+
set logging enabled
12851285
set height 0
12861286
set width 0
12871287
display/i $pc
@@ -1348,3 +1348,5 @@ define print_flags
13481348
printf "RUBY_FL_USER17 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER17 ? "1" : "0"
13491349
printf "RUBY_FL_USER18 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER18 ? "1" : "0"
13501350
end
1351+
1352+
source misc/gdb.py

Diff for: .git-blame-ignore-revs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# Expand tabs
77
5b21e94bebed90180d8ff63dad03b8b948361089
8+
c5e9af9c9d890578182a21e7b71b50334cd5579e
89

910
# Enable Style/StringLiterals cop for RubyGems/Bundler
1011
d7ffd3fea402239b16833cc434404a7af82d44f3

Diff for: .github/auto_request_review.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
files:
22
'yjit*': [team:yjit]
33
'yjit/**/*': [team:yjit]
4+
'yjit/src/cruby_bindings.inc.rs': []
45
'doc/yjit/*': [team:yjit]
56
'bootstraptest/test_yjit*': [team:yjit]
67
'test/ruby/test_yjit*': [team:yjit]
78
'.github/workflows/yjit*': [team:yjit]
89
options:
910
ignore_draft: true
11+
# This currently doesn't work as intended. We want to skip reviews when only
12+
# cruby_bingings.inc.rs is modified, but this skips reviews even when other
13+
# yjit files are modified as well. To be enabled after fixing the behavior.
14+
#last_files_match_only: true

Diff for: .github/codeql/codeql-config.yml

-3
This file was deleted.

Diff for: .github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ updates:
33
- package-ecosystem: 'github-actions'
44
directory: '/'
55
schedule:
6-
interval: 'monthly'
6+
interval: 'daily'

Diff for: .github/workflows/annocheck.yml

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
name: Annocheck
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'doc/**'
7+
- '**/man'
8+
- '**.md'
9+
- '**.rdoc'
10+
- '**/.document'
11+
pull_request:
12+
paths-ignore:
13+
- 'doc/**'
14+
- '**/man'
15+
- '**.md'
16+
- '**.rdoc'
17+
- '**/.document'
18+
merge_group:
19+
paths-ignore:
20+
- 'doc/**'
21+
- '**/man'
22+
- '**.md'
23+
- '**.rdoc'
24+
- '**/.document'
25+
26+
concurrency:
27+
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
28+
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
29+
30+
# GitHub actions does not support YAML anchors. This creative use of
31+
# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
32+
# restriction.
33+
env:
34+
default_cc: clang-15
35+
append_cc: ''
36+
37+
# -O1 is faster than -O3 in our tests... Majority of time are consumed trying
38+
# to optimize binaries. Also GitHub Actions run on relatively modern CPUs
39+
# compared to, say, GCC 4 or Clang 3. We don't specify `-march=native`
40+
# because compilers tend not understand what the CPU is.
41+
optflags: '-O1'
42+
43+
# -g0 disables backtraces when SEGV. Do not set that.
44+
debugflags: '-ggdb3'
45+
46+
default_configure: >-
47+
--enable-debug-env
48+
--disable-install-doc
49+
--with-ext=-test-/cxxanyargs,+
50+
append_configure: >-
51+
--without-valgrind
52+
--without-jemalloc
53+
--without-gmp
54+
55+
CONFIGURE_TTY: never
56+
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
57+
RUBY_DEBUG: ci rgengc
58+
RUBY_TESTOPTS: >-
59+
-q
60+
--color=always
61+
--tty=no
62+
63+
permissions:
64+
contents: read
65+
66+
jobs:
67+
compile:
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
env:
72+
- {}
73+
entry:
74+
- name: 'gcc-11 annocheck'
75+
container: gcc-11
76+
env:
77+
# Minimal flags to pass the check.
78+
default_cc: 'gcc-11 -fcf-protection -Wa,--generate-missing-build-notes=yes'
79+
optflags: '-O2'
80+
LDFLAGS: '-Wl,-z,now'
81+
# FIXME: Drop skipping options
82+
# https://bugs.ruby-lang.org/issues/18061
83+
# https://sourceware.org/annobin/annobin.html/Test-pie.html
84+
TEST_ANNOCHECK_OPTS: "--skip-pie --skip-gaps"
85+
check: true
86+
87+
name: ${{ matrix.entry.name }}
88+
runs-on: ubuntu-latest
89+
container:
90+
image: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || matrix.entry.env.default_cc || 'clang-15' }}
91+
options: --user root
92+
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
93+
env: ${{ matrix.entry.env || matrix.env }}
94+
steps:
95+
- run: id
96+
working-directory:
97+
- run: mkdir build
98+
working-directory:
99+
- name: setenv
100+
run: |
101+
echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
102+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
103+
with:
104+
path: src
105+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
106+
with:
107+
path: src/.downloaded-cache
108+
key: downloaded-cache
109+
- name: autogen
110+
run: |
111+
if [ ! -f ./autogen.sh ]; then
112+
ls -la
113+
fi
114+
./autogen.sh
115+
working-directory: src
116+
- name: Run configure
117+
run: >
118+
../src/configure -C ${default_configure} ${append_configure}
119+
--${{
120+
matrix.entry.crosshost && 'host' || 'with-gcc'
121+
}}=${{
122+
matrix.entry.crosshost || '"${default_cc}${append_cc:+ $append_cc}"'
123+
}}
124+
--${{ matrix.entry.shared || 'enable' }}-shared
125+
- run: make extract-extlibs
126+
- run: make incs
127+
- run: make showflags
128+
- run: make
129+
- run: make test
130+
- run: make install
131+
if: ${{ matrix.entry.check }}
132+
- run: make test-tool
133+
if: ${{ matrix.entry.check }}
134+
### test-all doesn't work: https://github.com/ruby/ruby/actions/runs/4340112185/jobs/7578344307
135+
# - run: make test-all TESTS='-- ruby -ext-'
136+
# if: ${{ matrix.entry.check }}
137+
### test-spec doesn't work: https://github.com/ruby/ruby/actions/runs/4340193212/jobs/7578505652
138+
# - run: make test-spec
139+
# env:
140+
# CHECK_LEAKS: true
141+
# if: ${{ matrix.entry.check }}
142+
- run: make test-annocheck
143+
if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }}
144+
145+
- uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
146+
with:
147+
payload: |
148+
{
149+
"ci": "GitHub Actions",
150+
"env": "${{ github.workflow }} / ${{ matrix.entry.name }}",
151+
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
152+
"commit": "${{ github.sha }}",
153+
"branch": "${{ github.ref_name }}"
154+
}
155+
env:
156+
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
157+
if: ${{ failure() && github.event_name == 'push' }}
158+
159+
defaults:
160+
run:
161+
working-directory: build

Diff for: .github/workflows/auto_request_review.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ jobs:
1010
auto-request-review:
1111
name: Auto Request Review
1212
runs-on: ubuntu-latest
13+
if: ${{ github.repository == 'ruby/ruby' }}
1314
steps:
1415
- name: Request review based on files changes and/or groups the author belongs to
15-
uses: necojackarc/auto-request-review@b5e81876454003a4ccb9b89cb205c67d77d7035b # v0.8.0
16+
uses: necojackarc/auto-request-review@5f91f424cabb3211c669e49e79da8363f7df395b # v0.10.0
1617
with:
1718
# scope: public_repo
1819
token: ${{ secrets.MATZBOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)