73787 Commits

Author SHA1 Message Date
Shugo Maeda
a8ad22d926
Suppress a warning on clang
The following warning appears without this fix:

```
parse.y:78:1: warning: unknown warning group '-Wpsabi', ignored
      [-Wunknown-warning-option]
RBIMPL_WARNING_IGNORED(-Wpsabi)
^
./include/ruby/internal/warning_push.h:103:39: note: expanded from macro
      'RBIMPL_WARNING_IGNORED'
                                      ^
./include/ruby/internal/warning_push.h:99:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA2'
                                      ^
./include/ruby/internal/warning_push.h:98:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA1'
                                      ^
./include/ruby/internal/warning_push.h:97:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA0'
                                      ^
<scratch space>:49:27: note: expanded from here
 clang diagnostic ignored "-Wpsabi"
                          ^
1 warning generated.
```
2022-09-26 14:44:54 +09:00
Samuel Williams
025b8701c0
Add several new methods for getting and setting buffer contents. (#6434) 2022-09-26 18:06:12 +13:00
Nobuyoshi Nakada
ecffc6a203 Generate the revision.h before Makefile
Except for GNU make which updates makefiles automatically, repeating
configure in the same directory causes `make` to stop whenever pulled
a new commit.  This is unexpected in CIs.
2022-09-26 13:03:23 +09:00
John Hawthorn
b361bdc200 [Bug #19021] Fix safe call w/ conditional assign
As of fbaac837cfba23a9d34dc7ee144d7940248222a2, when we were performing
a safe call (`o&.x=`) with a conditional assign (`||= 1`) and discarding
the result the stack would end up in a bad state due to a missing pop.

This commit fixes that by adjusting the target label of the branchnil to
be before a pop in that case (as was previously done in the
non-conditional assignment case).
2022-09-25 20:44:54 -07:00
Yuta Saito
e3cc1a6cae Initialize Objective-C classes before fork() for macOS 13
Since macOS 13, CFString family API used in
`rb_str_append_normalized_ospath` may internally use Objective-C classes
(`NSTaggedPointerString` and `NSPlaceholderMutableString`) for small strings.

On the other hand, Objective-C classes should not be used for the first
time in a `fork()`'ed but not `exec()`'ed process. Violations for this rule
can result deadlock during class initialization, so Objective-C runtime
conservatively crashes on such cases by default.

Therefore, we need to use CFString API to initialize Objective-C classes
used internally *before* `fork()`.

For more details, see https://bugs.ruby-lang.org/issues/18912
2022-09-26 12:03:40 +09:00
Yuichiro Kaneko
d89f8a0467 [ruby/rdoc] Fix ruby script in "test_parse_method_bracket" (https://github.com/ruby/rdoc/pull/927)
Because it's syntax error.

https://github.com/ruby/rdoc/commit/993f2532ff
2022-09-26 09:38:40 +09:00
Nobuyoshi Nakada
1481e6828c
Avoid type limits (#6435) 2022-09-26 09:21:05 +09:00
Nobuyoshi Nakada
dc7d929e54
Extract RUBY_RELEASE_DATE from also revision.h
This make variable is very useful for daily build.
2022-09-25 22:40:05 +09:00
Samuel Williams
85cc0ce5c8 Use int first_lineno for binary format. 2022-09-26 00:41:16 +13:00
Samuel Williams
22af2e9084 Rework vm_core to use int first_lineno struct member. 2022-09-26 00:41:16 +13:00
Samuel Williams
75cf29f60d Rework first_lineno to be int. 2022-09-26 00:41:16 +13:00
Samuel Williams
a95b741a97 [ruby/bigdecimal] Remove trailing whitespace.
https://github.com/ruby/bigdecimal/commit/223d193f01
2022-09-25 19:34:27 +09:00
Maciek Rząsa
8e2c425183 [ruby/bigdecimal] Improve documentation of BigDecimal#sign
Fixes https://github.com/ruby/bigdecimal/issues/78 by describing behaviour for positive and negative zero in the docs.

https://github.com/ruby/bigdecimal/commit/5415b120ab
2022-09-25 16:51:17 +09:00
Samuel Williams
81b919ce5c Add news for eval coverage. 2022-09-25 20:35:47 +13:00
Samuel Williams
09ea4f3a9f Extract common code for coverage setup. 2022-09-25 20:35:47 +13:00
S-H-GAMELINKS
205c252ec7 Reuse rb_method_call_kw function 2022-09-25 11:11:06 +13:00
Takashi Kokubun
08476c4579
Remove unneeded semicolons 2022-09-23 23:13:43 -07:00
Takashi Kokubun
b0e3ee454d
Suppress -Wtype-limits warnings on mjit_c.rb 2022-09-23 23:07:30 -07:00
Chris Salzberg
82ac4a2399 Support using at toplevel in wrapped script
Allow refinements to be used at the toplevel within a script that is
loaded under a module.

Fixes [Bug #18960]
2022-09-24 09:41:15 +09:00
John Hawthorn
a74f4cded2 Remove reference to __classid__
This used to be used for module names but its uses were removed in
b00f280d4b9569e7153365d7e1c522b3d6b3c6cf.
2022-09-23 15:57:02 -07:00
Takashi Kokubun
912ea8257a
YJIT: Support Rust 1.58.1 for --yjit-stats on Arm (#6410)
* YJIT: Test Rust 1.58.1 as well on Cirrus

* YJIT: Avoid using a Rust 1.60.0 feature

* YJIT: Use autoconf to detect support

* YJIT: We actually need to run it

for checking it properly

* YJIT: Try cfg!(target_feature = "lse")

* Revert "YJIT: Try cfg!(target_feature = "lse")"

This reverts commit 4e2a9ca9a9c83052c23b5e205c91bdf79e88342e.

* YJIT: Add --features stats only when it works

* Update configure.ac

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-09-23 16:17:54 -04:00
Takashi Kokubun
7588f21851
Allow changing conversion macro in MJIT bindgen
This is necessary for object shapes.
2022-09-24 00:02:21 +09:00
Burdette Lamar
3ddab3a84e
[DOC] Housekeeping in iostreams doc (#6420)
Write some method names in linkable form; make some capitalization consistent.
2022-09-23 09:41:21 -05:00
Yusuke Endoh
a78c733cc3 Revert "Revert "error.c: Let Exception#inspect inspect its message""
This reverts commit b9f030954a8a1572032f3548b39c5b8ac35792ce.

[Bug #18170]
2022-09-23 16:40:59 +09:00
Nobuyoshi Nakada
6e46bf1e54
Just a star [ci skip] 2022-09-23 08:52:15 +09:00
Maxime Chevalier-Boisvert
4e40fdbcee
YJIT: add chain guards in guard_two_fixnums (#6422)
* Add chain guards in guard_two_fixnums, opt_eq with symbols

* Remove symbol comparison in gen_equality_specialized
2022-09-22 17:47:54 -04:00
John Hawthorn
4b97f1e525
YJIT: Refactor into gen_push_frame (#6412)
This refactors the "push frame" operation common to both gen_send_iseq
and gen_send_cfunc into its own method. This allows that logic to live
in one place.
2022-09-22 17:47:26 -04:00
Takashi Kokubun
0c9dc01a2a Skip struct fields whose output differs
across different environments
2022-09-23 06:44:28 +09:00
Takashi Kokubun
dfc311c0b3 Swap the positions of offsetof and type 2022-09-23 06:44:28 +09:00
Takashi Kokubun
dc5b536468 Bindgen offsetof struct and union with builtin
except for bit fields.

I made a risky assumption on leading bit fields and just gave up
non-leading bit fields for now. I'll change it to let C code access bit
fields later.
2022-09-23 06:44:28 +09:00
Takashi Kokubun
2ce1460c65 Bindgen sizeof struct and union with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun
4c6e1556b1 Bindgen immediate types with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun
280ff1707e Drop c_64 and c_32 2022-09-23 06:44:28 +09:00
Takashi Kokubun
5cda5938f8 Bindgen enum with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun
2f5b37533e Builtin needs to be baseruby-compatible 2022-09-23 06:44:28 +09:00
Takashi Kokubun
591c3c7a1a Automatically setup bundler of bindgen.rb
to easily use it with `tool/mjit/bindgen.rb BUILDDIR` instead of using
`make mjit-bindgen`.
2022-09-23 06:44:28 +09:00
Takashi Kokubun
4e0db2f753 mjit_c.rb doesn't need to be an erb 2022-09-23 06:44:28 +09:00
Takashi Kokubun
334b8bd459 Mix manual and auto-generated C APIs 2022-09-23 06:44:28 +09:00
Takashi Kokubun
00c441ce7a Bindgen macro with builtin 2022-09-23 06:44:28 +09:00
Takashi Kokubun
e81a612413 Auto-generate mjit_c.rb.erb 2022-09-23 06:44:28 +09:00
Takashi Kokubun
f2bea691cd Builtin RubyVM::MJIT::C 2022-09-23 06:44:28 +09:00
Jeremy Evans
88bf8ad6e9 Allow --enable-yjit on OpenBSD
yjit uses _Unwind_* functions from libunwind.  These functions
are available in libc++abi (which requires libpthread), so
add those to LDFLAGS if enabling yjit on OpenBSD.
2022-09-23 05:51:34 +09:00
Jemma Issroff
b5c459d57a Adds a benchmark to measure freezing objects 2022-09-22 10:29:43 -07:00
HParker
fbaac837cf avoid extra dup and pop in compile_op_asgn2
Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-09-22 09:47:13 -07:00
HParker
aafbc9068f avoid extra dup and pop in compile_op_log
Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-09-22 09:47:13 -07:00
Otávio Schwanck dos Santos
4bdd8f2ddf [ruby/reline] use assert_nothing_raised
https://github.com/ruby/reline/commit/f08be5da09
2022-09-22 22:28:39 +09:00
Otávio Schwanck dos Santos
696e8914b7 [ruby/reline] PR changes
https://github.com/ruby/reline/commit/e8e8d81f47
2022-09-22 22:28:38 +09:00
Otávio Schwanck dos Santos
9d19d910c0 [ruby/reline] Revert "update version"
This reverts commit https://github.com/ruby/reline/commit/ce1ac86179e6.

https://github.com/ruby/reline/commit/86602cd244
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos
224a3ea718 [ruby/reline] update version
https://github.com/ruby/reline/commit/ce1ac86179
2022-09-22 22:28:37 +09:00
Otávio Schwanck dos Santos
9fb18e6314 [ruby/reline] fix vi-operator-arg
https://github.com/ruby/reline/commit/d42cdb8f91
2022-09-22 22:28:36 +09:00