Граф коммитов

69449 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 6b9285e8d4 'uri/https' is needed
`URI.parse('https://a.b.c/')` needs 'uri/https'.
2021-10-22 23:56:07 +09:00
Alan Wu ba4bf8a1e6
Fix simple test on platforms where compaction is not supported
844588f915 made it so that trying to call
gc_verify_compaction_references on unsupported platform result in an
exception rather than a crash. Rescue the exception in a YJIT btest
that uses gc_verify_compaction_references.
2021-10-22 10:53:42 -04:00
rm155 d09cb64ae5 [ruby/mutex_m] Make VERSION shareable
https://github.com/ruby/mutex_m/commit/a839e29d04
2021-10-22 19:49:34 +09:00
Tiago 553f234a07 [ruby/uri] URI#HTTP#origin and URI#HTTP#authority (https://github.com/ruby/uri/pull/30)
https://github.com/ruby/uri/commit/bf13946c32

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2021-10-22 19:48:36 +09:00
Olle Jonsson c8ad024e8e [ruby/delegate] gemspec: Drop unused executables directives
https://github.com/ruby/delegate/commit/81a3c32140
2021-10-22 19:48:22 +09:00
Nobuyoshi Nakada aee4940d5e
Reduce YJIT runs on macOS [ci skip]
MacOs concurrency on GitHub Actions is limited, and the
performance is relatively poor.
2021-10-22 17:14:00 +09:00
Hiroshi SHIBATA 93691d0752
Import bigdecimal-3.1.0.dev 2021-10-22 15:53:49 +09:00
Nobuyoshi Nakada 22a7f7ec5a
Refinement#include and Refinement#prepend have been deprecated 2021-10-22 15:06:41 +09:00
Koichi Sasada 598382f686 debug.gem 1.3.1 2021-10-22 14:43:38 +09:00
Nobuyoshi Nakada 9f4f3bd1cc
Refinement#include and Refinement#prepend have been deprecated 2021-10-22 13:53:21 +09:00
Nobuyoshi Nakada 4446942f1a
Extract UNPACK_FETCH 2021-10-22 12:47:34 +09:00
Takashi Kokubun 6469038ae2
Fix TestRubyOptions#test_enable for -DMJIT_FORCE_ENABLE
--enable=all didn't work when cppflags=-DMJIT_FORCE_ENABLE was given.
2021-10-21 20:41:14 -07:00
Aaron Patterson 844588f915 Push compaction page alignment check down
It seems like `gc_verify_compaction_references` is not protected in case
alignment is wrong.  This commit pushes the alignment check down to
`gc_start_internal` so that anyone trying to compact will check page
alignment

I think this method may be getting called on PowerPC and the alignment
might be wrong.

  http://rubyci.s3.amazonaws.com/ppc64le/ruby-master/log/20211021T190006Z.fail.html.gz
2021-10-21 15:47:38 -07:00
Alan Wu bdfc23cba9
YJIT: don't compile attr_accessor methods when tracing (#4998)
2d98593bf5 made it so that
attr_accessor methods fire C method tracing events.
Previously, we weren't checking for whether we are tracing before
compiling, leading to missed events.

Since global invalidation invalidates all code, and that attr_accessor
methods can never enable tracing while running, events are only dropped
when YJIT tries to compile when tracing is already enabled.

Factor out the code for checking tracing and check it before generating
code for attr_accessor methods.

This change fixes TestSetTraceFunc#test_tracepoint_attr when it's
ran in isolation.
2021-10-21 15:07:32 -04:00
Justin Searls d0cad8ad83 [rubygems/rubygems] Re-enable `default_ignores` option for standard
I am not sure why this flag was turned off (it wasn't explained in my commit message in 0365dc852767ae589376a7aad1fb129738e408b0 or in my PR in #4411). 

Whatever the reason, without `default_ignores` turned on, most default CI configurations will immediately fail, as they most likely vendor and cache their dependencies under `vendor`, which will cause standard to run against all the vendored gems and (most likely) fail. I think we should remove this before this feature is released.

https://github.com/rubygems/rubygems/commit/677f74be48
2021-10-22 03:33:44 +09:00
Maxime Chevalier-Boisvert 32a8cb965c
Add link to YJIT blog post to NEWS.md
Requested by @nurse
2021-10-21 12:49:58 -04:00
git ad1f7f2a8e * 2021-10-22 [ci skip] 2021-10-22 00:28:26 +09:00
Jeremy Evans 119626da94 Force disable yjit on OpenBSD
TestRubyOptions#test_enable was broken on OpenBSD after the yjit
merge. --yjit (and --enable-all, which enables --yjit) fails on
OpenBSD because yjit uses an insecure mmap call (both writable
and executable), in alloc_exec_mem, which OpenBSD does not allow.

This can probably be reverted if yjit switches to a more secure
mmap design (writable xor executable).  This would involve
initially calling mmap with PROT_READ | PROT_WRITE, and after writing
of executable code has finished, using mprotect to switch to
PROT_READ | PROT_EXEC. I believe Firefox uses this approach for
their Javascript engine since Firefox 46.
2021-10-21 08:26:02 -07:00
Hiroshi SHIBATA d74f1e1623
Added version of readline-ext 2021-10-21 21:19:16 +09:00
Hiroshi SHIBATA c5345979e8
Bump up readline-ext version to 0.1.3 2021-10-21 21:17:45 +09:00
Hiroshi SHIBATA 03fd60937d
Update the merged versions of default gems. 2021-10-21 21:07:23 +09:00
Hiroshi SHIBATA eac7a71062 [ruby/prettyprint] Bump up prettyprint version to 0.1.1
https://github.com/ruby/prettyprint/commit/0e8eee5f5f
2021-10-21 21:05:39 +09:00
Hiroshi SHIBATA ba3c2593ab [ruby/pp] Bump up pp version to 0.2.1
https://github.com/ruby/pp/commit/06b839b9ca
2021-10-21 21:04:14 +09:00
Hiroshi SHIBATA 9f398d023b [ruby/securerandom] Bump up securerandom version to 0.1.1
https://github.com/ruby/securerandom/commit/5f9d3d1dfa
2021-10-21 21:03:08 +09:00
Hiroshi SHIBATA aca0dcc5f9 [ruby/rinda] Bump up rinda version to 0.1.1
https://github.com/ruby/rinda/commit/d394ba107e
2021-10-21 21:02:37 +09:00
Hiroshi SHIBATA b8d49d0d01 [ruby/optparse] Bump up optparse version to 0.2.0
https://github.com/ruby/optparse/commit/1226b670e6
2021-10-21 21:01:34 +09:00
Hiroshi SHIBATA cb4c98f949 [ruby/net-http] Bump up net-http version to 0.2.0
https://github.com/ruby/net-http/commit/f3e65e2a31
2021-10-21 21:01:06 +09:00
Hiroshi SHIBATA cc2f76041d [ruby/net-protocol] Bump up net-protocol version to 0.1.2
https://github.com/ruby/net-protocol/commit/088e52609a
2021-10-21 21:00:53 +09:00
Hiroshi SHIBATA 8ef125c838 [ruby/uri] Bump up uri version to 0.11.0
https://github.com/ruby/uri/commit/1619f713e6
2021-10-21 21:00:04 +09:00
Hiroshi SHIBATA 422b057d65 [ruby/ostruct] Bump up ostruct version to 0.5.0
https://github.com/ruby/ostruct/commit/c535a406f8
2021-10-21 20:54:33 +09:00
Hiroshi SHIBATA 7529fe82f0 [ruby/io-wait] Bump up io-wait version to 0.2.0
https://github.com/ruby/io-wait/commit/f6a1b10a59
2021-10-21 20:54:20 +09:00
Hiroshi SHIBATA 8eb8522f47 [ruby/stringio] Bump up stringio version to 3.0.1
https://github.com/ruby/stringio/commit/f7c40aa339
2021-10-21 20:53:53 +09:00
Hiroshi SHIBATA 6b08aaf228 [ruby/fileutils] Bump up fileutils version to 1.6.0
https://github.com/ruby/fileutils/commit/918d19e4f2
2021-10-21 20:14:57 +09:00
Shugo Maeda 6606597109
Deprecate include/prepend in refinements and add Refinement#import_methods instead
Refinement#import_methods imports methods from modules.
Unlike Module#include, it copies methods and adds them into the refinement,
so the refinement is activated in the imported methods.

[Bug #17429] [ruby-core:101639]
2021-10-21 16:31:54 +09:00
Koichi Sasada 7185c00fcc freeze (make shareable) script_lines 2021-10-21 16:17:39 +09:00
Koichi Sasada c7550537f1 `RubyVM.keep_script_lines`
`RubyVM.keep_script_lines` enables to keep script lines
for each ISeq and AST. This feature is for debugger/REPL
support.

```ruby
RubyVM.keep_script_lines = true
RubyVM::keep_script_lines = true

eval("def foo = nil\ndef bar = nil")
pp RubyVM::InstructionSequence.of(method(:foo)).script_lines
```
2021-10-21 16:17:39 +09:00
Takashi Kokubun 3b16d07e45
Fix test_version again for RUBY_YJIT_ENABLE=1 2021-10-20 22:08:43 -07:00
Takashi Kokubun 76f9bc7e66
Reduce the amount of false positive notifications
While f6048e592c tried to approach the
instability mentioned there, unfortunately the Travis arm32 environment
seems unstable by itself. I already saw 2 different failures in the last
4 builds:
https://app.travis-ci.com/github/ruby/ruby/jobs/544382885
https://app.travis-ci.com/github/ruby/ruby/jobs/544361370

Let's revisit this when this kind of thing stops happening.
2021-10-20 21:57:49 -07:00
Hiroshi SHIBATA 5823168706 [ruby/psych] Bump up psych version to 4.0.2
https://github.com/ruby/psych/commit/69a713f860
2021-10-21 13:49:20 +09:00
Nobuyoshi Nakada 4d4bdcf368
Move the test file 2021-10-21 13:07:48 +09:00
Nobuyoshi Nakada 58956dba16
Fix for out-of-place build 2021-10-21 13:07:48 +09:00
Nobuyoshi Nakada 18b65508e2
Suppress warnings 2021-10-21 13:07:48 +09:00
Takashi Kokubun 66a64e6f16
Fix tests with cppflags=-DYJIT_FORCE_ENABLE
0dbd95c625
2021-10-20 20:52:21 -07:00
Maxime Chevalier-Boisvert 8684946b21 Add bit about YJIT to NEWS.md 2021-10-20 19:15:45 -04:00
git 7637175a84 * append newline at EOF. [ci skip] 2021-10-21 08:12:53 +09:00
Alan Wu 6a9e2b3cc3 YJIT: Show GCC that the mmap probing loop runs at least once
Fixes:
    ./src/yjit_asm.c:196:8: warning: 'mem_block' may be used uninitialized [-Wmaybe-uninitialized]
2021-10-20 19:04:22 -04:00
Alan Wu 00be5846e4 Fix non RUBY_DEBUG build warnings
On non RUBY_DEBUG builds, assert() compiles to nothing and the compiler
warns about uninitialized variables in those code paths. Replace
those asserts with rb_bug() to fix the warnings and do the assert in
all builds. Since yjit_asm_tests.c compiles outside of Ruby, it needed
a distinct version of rb_bug().

Also put YJIT_STATS check for function delcaration that is only defined
in YJIT_STATS builds.
2021-10-20 18:19:43 -04:00
Alan Wu cffa116275 Do kwarg shuffle after checking for interrupts
Previously, we were shuffling keyword arguments before checking for
interrupts. In the case that we side exit in the interrupt check,
we left the interpreter with an already-shuffled argument list for
the call, resulting in a double shuffle, leaving the locals in the
wrong order for the callee.

Do keyword shuffling after all the possible side exits.

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2021-10-20 18:19:43 -04:00
Alan Wu c062028d37 YJIT: check machine arch before enabling
So we don't try to run x64 on ARM.
2021-10-20 18:19:43 -04:00
Alan Wu b74d6563a6 Extract yjit_force_iv_index and make it work when object is frozen
In an effort to simplify the logic YJIT generates for accessing instance
variable, YJIT ensures that a given name-to-index mapping exists at
compile time. In the case that the mapping doesn't exist, it was created
by using rb_ivar_set() with Qundef on the sample object we see at
compile time. This hack isn't fine if the sample object happens to be
frozen, in which case YJIT would raise a FrozenError unexpectedly.

To deal with this, make a new function that only reserves the mapping
but doesn't touch the object. This is rb_obj_ensure_iv_index_mapping().
This new function superceeds the functionality of rb_iv_index_tbl_lookup()
so it was removed.

Reported by and includes a test case from John Hawthorn <john@hawthorn.email>

Fixes: GH-282
2021-10-20 18:19:43 -04:00