Skip to content

Commit 0d1bb85

Browse files
authored
Merge pull request #517 from dearblue/fiber
2 parents 052f975 + 2817f10 commit 0d1bb85

File tree

79 files changed

+1838
-1302
lines changed

Some content is hidden

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

79 files changed

+1838
-1302
lines changed

mrbgems/ngx_mruby_mrblib/mrblib/mrb_nginx.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,4 @@ module Kernel
127127
def get_server_class
128128
Nginx
129129
end
130-
131-
def _ngx_mrb_prepare_fiber(nginx_handler)
132-
fiber_handler = Fiber.new { nginx_handler.call }
133-
134-
lambda do
135-
# BUG?: return nginx_handler directly from fiber, not proc in any case.
136-
result = fiber_handler.resume
137-
[fiber_handler.alive?, result]
138-
end
139-
end
140130
end

mruby/.github/labeler.yml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,50 @@
11
benchmark:
2-
- benchmark/**/*
2+
- any:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- benchmark/**/*
36
build:
4-
- Makefile
5-
- Rakefile
6-
- build_config/**/*
7-
- lib/**/*
8-
- tasks/**/*
7+
- any:
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- Makefile
11+
- Rakefile
12+
- build_config/**/*
13+
- lib/**/*
14+
- tasks/**/*
915
core:
10-
- include/**/*
11-
- mrblib/**/*
12-
- src/**/*
13-
- test/**/*
16+
- any:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- include/**/*
20+
- mrblib/**/*
21+
- src/**/*
22+
- test/**/*
1423
doc:
15-
- CONTRIBUTING.md
16-
- LEGAL
17-
- LICENSE
18-
- NEWS
19-
- README.md
20-
- SECURITY.md
21-
- TODO.md
22-
- doc/**/*
23-
- examples/**/*
24+
- any:
25+
- changed-files:
26+
- any-glob-to-any-file:
27+
- CONTRIBUTING.md
28+
- LEGAL
29+
- LICENSE
30+
- NEWS
31+
- README.md
32+
- SECURITY.md
33+
- TODO.md
34+
- doc/**/*
35+
- examples/**/*
2436
github:
25-
- .github/**/*
37+
- any:
38+
- changed-files:
39+
- any-glob-to-any-file:
40+
- .github/**/*
2641
mrbgems:
27-
- mrbgems/**/*
42+
- any:
43+
- changed-files:
44+
- any-glob-to-any-file:
45+
- mrbgems/**/*
2846
oss-fuzz:
29-
- oss-fuzz/**/*
47+
- any:
48+
- changed-files:
49+
- any-glob-to-any-file:
50+
- oss-fuzz/**/*

mruby/.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v4
12+
- uses: actions/labeler@v5
1313
with:
1414
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1515
sync-labels: true

mruby/.github/workflows/super-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Full git history is needed to get a proper list of changed files within `super-linter`
2121
fetch-depth: 0
2222
- name: Lint Code Base
23-
uses: super-linter/super-linter/slim@v5.3.1
23+
uses: super-linter/super-linter/slim@v5.7.2
2424
env:
2525
ERROR_ON_MISSING_EXEC_BIT: true
2626
VALIDATE_BASH: true

mruby/.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: identity
1111
- id: check-hooks-apply
1212
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v4.4.0
13+
rev: v4.5.0
1414
hooks:
1515
- id: check-added-large-files
1616
- id: check-case-conflict
@@ -30,15 +30,15 @@ repos:
3030
- id: mixed-line-ending
3131
- id: trailing-whitespace
3232
- repo: https://github.com/Lucas-C/pre-commit-hooks
33-
rev: v1.5.1
33+
rev: v1.5.4
3434
hooks:
3535
- id: forbid-tabs
3636
exclude: Makefile$|Makefile\..+$|makefile$|\.mk$
3737
- id: remove-tabs
3838
args: [--whitespaces-count, '2']
3939
exclude: Makefile$|Makefile\..+$|makefile$|\.mk$
4040
- repo: https://github.com/codespell-project/codespell
41-
rev: v2.2.5
41+
rev: v2.2.6
4242
hooks:
4343
- id: codespell
4444
name: Run codespell
@@ -51,7 +51,7 @@ repos:
5151
name: Local policy is to exclude extension from all shell files
5252
types: [shell]
5353
- repo: https://github.com/igorshubovych/markdownlint-cli
54-
rev: v0.35.0
54+
rev: v0.37.0
5555
hooks:
5656
- id: markdownlint
5757
name: Run markdownlint
@@ -69,7 +69,7 @@ repos:
6969
types: [markdown]
7070
files: \.(md|mdown|markdown)$
7171
- repo: https://github.com/adrienverge/yamllint
72-
rev: v1.32.0
72+
rev: v1.33.0
7373
hooks:
7474
- id: yamllint
7575
name: Run yamllint

mruby/AUTHORS

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Authors of mruby (mruby developers)
22

3-
## The List of Contributors sorted by number of commits (as of 2023-08-26 b85b682)
3+
## The List of Contributors sorted by number of commits (as of 2023-11-20 6a3a810)
44

5-
9287 Yukihiro "Matz" Matsumoto (@matz)*
5+
9408 Yukihiro "Matz" Matsumoto (@matz)*
66
586 KOBAYASHI Shuji (@shuujii)
7-
494 dearblue (@dearblue)*
7+
508 dearblue (@dearblue)*
88
378 Daniel Bovensiepen (@bovi)*
99
346 Takeshi Watanabe (@take-cheeze)*
1010
334 Masaki Muranaka (@monaka)
1111
328 Tomoyuki Sahara (@tsahara)*
1212
234 Jun Hiroe (@suzukaze)
1313
220 Cremno (@cremno)*
1414
209 Yuki Kurihara (@ksss)+
15-
159 John Bampton (@jbampton)
15+
165 John Bampton (@jbampton)
1616
151 Yasuhiro Matsumoto (@mattn)*
1717
113 Carson McDonald (@carsonmcdonald)
1818
103 Tomasz Dąbrowski (@dabroz)*
@@ -115,9 +115,11 @@
115115
4 Dante Catalfamo (@dantecatalfamo)
116116
4 Goro Kikuchi (@gorogit)
117117
4 Herwin Weststrate (@herwinw)
118+
4 Horimoto Yasuhiro (@komainu8)
118119
4 Jon Moss (@maclover7)
119120
4 Ken Muramatsu (@ken-mu)+
120121
4 Kohei Suzuki (@eagletmt)
122+
4 Lanza (@LanzaSchneider)
121123
4 Li Yazhou (@flaneur2020)
122124
4 Marcus Stollsteimer (@stomar)
123125
4 NARUSE, Yui (@nurse)
@@ -132,12 +134,10 @@
132134
3 David Turnbull (@AE9RB)
133135
3 Franck Verrot (@franckverrot)
134136
3 HASUMI Hitoshi (@hasumikin)
135-
3 Horimoto Yasuhiro (@komainu8)
136137
3 J. Mutua (@katmutua)+
137138
3 Jan Berdajs (@mrbrdo)
138139
3 Jonas Minnberg (@sasq64)
139140
3 Joseph McCullough (@joequery)
140-
3 Lanza (@LanzaSchneider)
141141
3 Mark McCurry (@fundamental)
142142
3 Nobuhiro Iwamatsu (@iwamatsu)
143143
3 Per Lundberg (@perlun)*
@@ -283,6 +283,7 @@
283283
1 Yevhen Viktorov (@yevgenko)
284284
1 Yoji SHIDARA (@darashi)
285285
1 Yoshiori SHOJI (@yoshiori)
286+
1 Yuji Yokoo (@yujiyokoo)
286287
1 Yukang (@chenyukang)
287288
1 Yurii Nakonechnyi (@inobelar)
288289
1 Yusuke Suzuki (@Constellation)+

mruby/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y python3-pip she
66

77
WORKDIR /app
88

9-
COPY Gemfile .
10-
11-
COPY Gemfile.lock .
12-
13-
COPY .pre-commit-config.yaml .
9+
COPY Gemfile Gemfile.lock .pre-commit-config.yaml ./
1410

1511
RUN bundle install && pip3 install pre-commit && git init . && pre-commit install-hooks
1612

mruby/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2023 mruby developers
1+
Copyright (c) 2010- mruby developers
22

33
Permission is hereby granted, free of charge, to any person obtaining a
44
copy of this software and associated documentation files (the "Software"),

mruby/build_config/host-shared.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1+
# NOTE: Currently, this configuration file does not support VisualC++!
2+
# Your help is needed!
3+
14
MRuby::Build.new do |conf|
25
# load specific toolchain settings
3-
4-
# Gets set by the VS command prompts.
5-
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
6-
toolchain :visualcpp
7-
else
8-
toolchain :gcc
9-
end
6+
conf.toolchain
107

118
# include the GEM box
129
conf.gembox 'default'
1310

1411
# C compiler settings
15-
conf.cc do |cc|
16-
cc.flags = '-fPIC'
12+
conf.compilers.each do |cc|
13+
cc.flags << '-fPIC'
1714
end
1815

1916
conf.archiver do |archiver|
20-
archiver.command = 'gcc'
17+
archiver.command = cc.command
2118
archiver.archive_options = '-shared -o %{outfile} %{objs}'
2219
end
2320

@@ -29,6 +26,9 @@
2926
# file separator
3027
# conf.file_separator = '/'
3128

29+
# enable this if better compatibility with C++ is desired
30+
#conf.enable_cxx_exception
31+
3232
# Turn on `enable_debug` for better debugging
3333
conf.enable_debug
3434
conf.enable_bintest

mruby/build_config/nintendo_wii.rb

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Cross Compiling configuration for the Nintendo Wii
2+
# This configuration requires devkitPPC
3+
# https://devkitpro.org/wiki/Getting_Started
4+
#
5+
#
6+
MRuby::CrossBuild.new("wii") do |conf|
7+
toolchain :gcc
8+
9+
DEVKITPRO_PATH = "/opt/devkitpro"
10+
BIN_PATH = "#{DEVKITPRO_PATH}/devkitPPC/bin"
11+
12+
# C compiler
13+
conf.cc do |cc|
14+
cc.command = "#{BIN_PATH}/powerpc-eabi-gcc"
15+
cc.compile_options = %(%{flags} -o "%{outfile}" -c "%{infile}")
16+
end
17+
18+
# C++ compiler
19+
conf.cxx do |cxx|
20+
cxx.command = "#{BIN_PATH}/powerpc-eabi-g++"
21+
cxx.include_paths = conf.cc.include_paths.dup
22+
cxx.flags = conf.cc.flags.dup
23+
cxx.defines = conf.cc.defines.dup
24+
cxx.compile_options = conf.cc.compile_options.dup
25+
end
26+
27+
# Linker
28+
conf.linker do |linker|
29+
linker.command = "#{BIN_PATH}/powerpc-eabi-gcc"
30+
end
31+
32+
# No executables
33+
conf.bins = []
34+
35+
# Do not build executable test
36+
conf.build_mrbtest_lib_only
37+
38+
# Disable C++ exception
39+
conf.disable_cxx_exception
40+
41+
# All current core gems with ones with build issues commented out
42+
conf.gem 'mrbgems/mruby-array-ext/'
43+
conf.gem 'mrbgems/mruby-bigint/'
44+
conf.gem 'mrbgems/mruby-bin-config/'
45+
conf.gem 'mrbgems/mruby-bin-debugger/'
46+
conf.gem 'mrbgems/mruby-bin-mirb/'
47+
conf.gem 'mrbgems/mruby-bin-mrbc/'
48+
conf.gem 'mrbgems/mruby-bin-mruby/'
49+
conf.gem 'mrbgems/mruby-bin-strip/'
50+
conf.gem 'mrbgems/mruby-binding/'
51+
conf.gem 'mrbgems/mruby-catch/'
52+
conf.gem 'mrbgems/mruby-class-ext/'
53+
conf.gem 'mrbgems/mruby-cmath/'
54+
conf.gem 'mrbgems/mruby-compar-ext/'
55+
conf.gem 'mrbgems/mruby-compiler/'
56+
conf.gem 'mrbgems/mruby-complex/'
57+
conf.gem 'mrbgems/mruby-data/'
58+
#conf.gem 'mrbgems/mruby-dir/'
59+
conf.gem 'mrbgems/mruby-enum-chain/'
60+
conf.gem 'mrbgems/mruby-enum-ext/'
61+
conf.gem 'mrbgems/mruby-enum-lazy/'
62+
conf.gem 'mrbgems/mruby-enumerator/'
63+
conf.gem 'mrbgems/mruby-errno/'
64+
conf.gem 'mrbgems/mruby-error/'
65+
conf.gem 'mrbgems/mruby-eval/'
66+
conf.gem 'mrbgems/mruby-exit/'
67+
conf.gem 'mrbgems/mruby-fiber/'
68+
conf.gem 'mrbgems/mruby-hash-ext/'
69+
#conf.gem 'mrbgems/mruby-io/'
70+
conf.gem 'mrbgems/mruby-kernel-ext/'
71+
conf.gem 'mrbgems/mruby-math/'
72+
conf.gem 'mrbgems/mruby-metaprog/'
73+
conf.gem 'mrbgems/mruby-method/'
74+
conf.gem 'mrbgems/mruby-numeric-ext/'
75+
conf.gem 'mrbgems/mruby-object-ext/'
76+
conf.gem 'mrbgems/mruby-objectspace/'
77+
conf.gem 'mrbgems/mruby-os-memsize/'
78+
conf.gem 'mrbgems/mruby-pack/'
79+
conf.gem 'mrbgems/mruby-print/'
80+
conf.gem 'mrbgems/mruby-proc-binding/'
81+
conf.gem 'mrbgems/mruby-proc-ext/'
82+
conf.gem 'mrbgems/mruby-random/'
83+
conf.gem 'mrbgems/mruby-range-ext/'
84+
conf.gem 'mrbgems/mruby-rational/'
85+
conf.gem 'mrbgems/mruby-set/'
86+
conf.gem 'mrbgems/mruby-sleep/'
87+
#conf.gem 'mrbgems/mruby-socket/'
88+
conf.gem 'mrbgems/mruby-sprintf/'
89+
conf.gem 'mrbgems/mruby-string-ext/'
90+
conf.gem 'mrbgems/mruby-struct/'
91+
conf.gem 'mrbgems/mruby-symbol-ext/'
92+
conf.gem 'mrbgems/mruby-test-inline-struct/'
93+
#conf.gem 'mrbgems/mruby-test/'
94+
conf.gem 'mrbgems/mruby-time/'
95+
conf.gem 'mrbgems/mruby-toplevel-ext/'
96+
end

mruby/doc/guides/debugger.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ $ mrdb sample.rb
6161

6262
You can execute the shell commands listed below:
6363

64-
|command|description|
65-
|:-:|:--|
66-
|run|execute programs|
67-
|step|execute stepping|
68-
|continue|execute continuing program|
69-
|break|configure the breaking point|
70-
|delete|deleting the breaking points|
71-
|disable|disabling the breaking points|
72-
|enable|enabling the breaking points|
73-
|info breakpoints|showing list of the breaking points|
74-
|print|evaluating and printing the values of the mruby expressions in the script|
75-
|list|displaying the source cords|
76-
|help|showing help|
77-
|quit|terminating the mruby debugger|
64+
| command | description |
65+
|:----------------:|:--------------------------------------------------------------------------|
66+
| run | execute programs |
67+
| step | execute stepping |
68+
| continue | execute continuing program |
69+
| break | configure the breaking point |
70+
| delete | deleting the breaking points |
71+
| disable | disabling the breaking points |
72+
| enable | enabling the breaking points |
73+
| info breakpoints | showing list of the breaking points |
74+
| print | evaluating and printing the values of the mruby expressions in the script |
75+
| list | displaying the source cords |
76+
| help | showing help |
77+
| quit | terminating the mruby debugger |
7878

7979
### 2.2.2 Debugging mruby Binary Files (mrb file) with mrdb
8080

0 commit comments

Comments
 (0)