Activity
From 10/15/2021 to 10/21/2021
10/21/2021
-
11:06 PM Feature #11066 (Rejected): symbol.to_s performance - caching and returning a frozen string
-
11:06 PM Feature #11346 (Closed): New #intern_str or similarly-named method of Symbol to return a cached, frozen string (like "string".freeze)
- `Symbol#name` was added in Ruby 3.0 for this.
-
10:56 PM Feature #13715: [PATCH] avoid garbage from Symbol#to_s in interpolation
- I've submitted a pull request for an updated version of @normalperson's patch: https://github.com/ruby/ruby/pull/5002, expanding the optimization to include nil/true/false/0-9. This is an across-the-board performance improvement, mostly...
-
10:47 PM Revision 844588f9 (git): 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 met... -
10:26 PM Feature #8637 (Closed): I18n documentation
-
10:23 PM Feature #8951 (Closed): Please add a hash-to-hash alternative of the map method to Hash
-
08:48 PM Feature #4183 (Closed): [ext/openssl] Timestamp support
- ruby-openssl 2.2.0 (included with Ruby 3.0) added OpenSSL::Timestamp, so this can be closed.
-
08:34 PM Bug #18260: YJIT uses insecure mmap protections
- We can look into this. The downside is that YJIT does a lot of code patching, so this would presumably involve two system calls every time YJIT needs to generate code. Hopefully the performance impact will be relatively minimal.
-
03:58 PM Bug #18260 (Closed): YJIT uses insecure mmap protections
- YJIT uses `mmap` with `PROT_READ | PROT_WRITE | PROT_EXEC` protections, which reduces security because it makes code injection attacks much easier, as the attacker only needs to be able to write their shellcode to the mapped memory regio...
-
07:07 PM Revision bdfc23cb (git): YJIT: don't compile attr_accessor methods when tracing (#4998)
- 2d98593bf54a37397c6e4886ccc7e3654c2eaf85 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 invalidatio... -
06:33 PM Revision d0cad8ad (git): [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 configurat... -
04:49 PM Revision 32a8cb96 (git): Add link to YJIT blog post to NEWS.md
- Requested by @nurse
-
04:14 PM Bug #17007 (Closed): SystemStackError when using super inside Module included and lexically inside refinement
- Refinement#include is now deprecated and will be removed in Ruby 3.2.
-
04:13 PM Bug #17379 (Closed): Refinement with modules redefinition bug
- Refinement#include is now deprecated and will be removed in Ruby 3.2.
-
04:13 PM Bug #18021 (Closed): Mixins in Refinements: possibly multiple bugs, workarounds are awkward
- Refinement#include is now deprecated and will be removed in Ruby 3.2.
- 03:28 PM Revision ad1f7f2a (git): * 2021-10-22 [ci skip]
-
03:26 PM Revision 119626da (git): 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 Ope... -
02:14 PM Bug #18187 (Rejected): Float#clamp() returns ArgumentError (comparison of Float with 1 failed)
-
08:11 AM Bug #18187: Float#clamp() returns ArgumentError (comparison of Float with 1 failed)
- I vote for keeping NaN raises exceptions.
Matz.
-
01:57 PM Bug #18257: rb_mRubyVMFrozenCore is broken by GC run
- I think a condition of "RSTRING_PTR is returning NULL!!" was fixed this year, but can't remember now.
-
01:54 PM Bug #18257: rb_mRubyVMFrozenCore is broken by GC run
- vo.x (Vit Ondruch) wrote in #note-2:
> ~~~
> ...
The `flags` 73831 = 0x12067, that means `orig` is an `Array` object, which has two elements(0x00000001000728e8, 0x0000000100072870). -
01:34 PM Bug #18255: ioctl zeroes the last buffer byte
- nobu (Nobuyoshi Nakada) wrote in #note-3:
> Found the bug.
> ...
Here I am.
Apparently it doesn't.
I dug a bit deeper and I found that there are two issues that concur to this behavior:
* `ioctl_narg_len` isn't properly extracti... -
01:00 PM Feature #18083: Capture error in ensure block.
- ioquatix (Samuel Williams) wrote in #note-24:
> Surprisingly this does work:
> ...
It is a pattern-matching. -
11:17 AM Feature #18083: Capture error in ensure block.
- Regarding
``` ruby
foo rescue $!
```
Maybe we can improve this:
``` ruby
foo rescue => error
```
I'm not sure it's worth the effort...
Surprisingly this does work:
``` ruby
foo rescue $! => error
``` -
11:15 AM Feature #18083: Capture error in ensure block.
- Proposal to RuboCop to introduce warning: https://github.com/rubocop/rubocop/issues/10204
I support deprecating `$!` and `$@`.
One way: for Ruby 3.x we can create deprecation warning, and remove it in Ruby 4.x. -
10:24 AM Feature #18083: Capture error in ensure block.
- ko1 (Koichi Sasada) wrote in #note-20:
> Sorry, my proposal is introducing dynamic scope, not syntactical scope like:
Ah, I misunderstood.
Then I think deprecating `$!` is the right way, since that seems the only way to be able to... -
06:28 AM Feature #18083: Capture error in ensure block.
- First, I am not going to change the syntax for the `ensure` clause. The `ensure` clause is to unwind-protect so it is not recommended to branch depending on exceptions.
I admit the current `$!` behavior is error-prone. But considering... -
06:13 AM Feature #18083: Capture error in ensure block.
- Sorry, my proposal is introducing dynamic scope, not syntactical scope like:
```ruby
def foo
p $! #=> A
begin
# no raise
ensure
p $! #=> nil
end
end
begin
raise A
ensure
foo
end
```
We can implement `raise` like me... -
12:31 PM Feature #17873: Update of default gems in Ruby 3.1
- I prepared versions for Ruby 3.1.0-preview1. But I keep the version numbers of the following libraries.
* RubyGems/Bundler: I coordinate the version numbering with @deivid
* Reline, Irb: @aycabta
* BIgDecimal: @mrkn
* Fiddle, CSV, Strin... -
12:19 PM Revision d74f1e16 (git): Added version of readline-ext
-
12:17 PM Revision c5345979 (git): Bump up readline-ext version to 0.1.3
-
12:15 PM Feature #18259: Support quarter spec %q in Time#strftime
- When we introduce a new specifier for strftime, we are afraid that we accidentally introduce it as a different meaning from the de-facto standard.
Maybe you insist coreutil's date is an implementation near the de-facto, but I think the... -
09:39 AM Feature #18259 (Open): Support quarter spec %q in Time#strftime
- This syntax is used by coreutil's `date` program (since 8.26):
> ‘%q’
> ...
> quarter of year (‘1’…‘4’) -
12:07 PM Revision 03fd6093 (git): Update the merged versions of default gems.
-
12:05 PM Revision eac7a710 (git): [ruby/prettyprint] Bump up prettyprint version to 0.1.1
- https://github.com/ruby/prettyprint/commit/0e8eee5f5f
-
12:04 PM Revision ba3c2593 (git): [ruby/pp] Bump up pp version to 0.2.1
- https://github.com/ruby/pp/commit/06b839b9ca
-
12:03 PM Revision 9f398d02 (git): [ruby/securerandom] Bump up securerandom version to 0.1.1
- https://github.com/ruby/securerandom/commit/5f9d3d1dfa
-
12:02 PM Revision aca0dcc5 (git): [ruby/rinda] Bump up rinda version to 0.1.1
- https://github.com/ruby/rinda/commit/d394ba107e
-
12:01 PM Revision b8d49d0d (git): [ruby/optparse] Bump up optparse version to 0.2.0
- https://github.com/ruby/optparse/commit/1226b670e6
-
12:01 PM Revision cb4c98f9 (git): [ruby/net-http] Bump up net-http version to 0.2.0
- https://github.com/ruby/net-http/commit/f3e65e2a31
-
12:00 PM Revision cc2f7604 (git): [ruby/net-protocol] Bump up net-protocol version to 0.1.2
- https://github.com/ruby/net-protocol/commit/088e52609a
-
12:00 PM Revision 8ef125c8 (git): [ruby/uri] Bump up uri version to 0.11.0
- https://github.com/ruby/uri/commit/1619f713e6
-
11:54 AM Revision 422b057d (git): [ruby/ostruct] Bump up ostruct version to 0.5.0
- https://github.com/ruby/ostruct/commit/c535a406f8
-
11:54 AM Revision 7529fe82 (git): [ruby/io-wait] Bump up io-wait version to 0.2.0
- https://github.com/ruby/io-wait/commit/f6a1b10a59
-
11:53 AM Revision 8eb8522f (git): [ruby/stringio] Bump up stringio version to 3.0.1
- https://github.com/ruby/stringio/commit/f7c40aa339
-
11:37 AM Misc #18174: DevelopersMeeting20211021Japan
- We held the dev-meeting but didn't finish until the last topic. An extra meeting will be held at the next Monday.
-
11:14 AM Revision 6b08aaf2 (git): [ruby/fileutils] Bump up fileutils version to 1.6.0
- https://github.com/ruby/fileutils/commit/918d19e4f2
-
09:43 AM Feature #18035: Introduce general model/semantic for immutability.
- Re naming, I discussed with @ioquatix and I think this is consistent and makes sense:
```ruby
class MyClass
extend Immutable
end
MyClass.new.immutable? # true
MY_CONSTANT = Immutable [1, 2, [3]]
MY_CONSTANT.immutable? # tr... -
09:20 AM Feature #18035: Introduce general model/semantic for immutability.
- Use cases:
* Actually have a way to express immutable/deeply frozen in Ruby. Right now there is no way, and `freeze` is only shallow.
* Immutability has many benefits, easier to reason about, no data races possible, clarifies a lot the b... -
09:12 AM Feature #18035: Introduce general model/semantic for immutability.
- The above sounds good.
Note that `RB_FL_FREEZE | RB_FL_SHAREABLE` is not enough, it should be a new flag, I detailed in https://bugs.ruby-lang.org/issues/18035#note-24.
Re (2) I think `.deep_freeze` would be a good option too. `Immut... -
03:21 AM Feature #18035: Introduce general model/semantic for immutability.
- After discussing it, we found some good ideas regarding immutability in Ruby.
Firstly, we need some definition for immutability. There appear to be two options.
(1) We can assume that `RB_FL_FREEZE | RB_FL_SHAREABLE` implies immutable ... -
09:41 AM Feature #17760: Where we should install a header file when `gem install --user`?
- We have discussed this in today's developer meeting.
- As a tentative workaround, I'll fix the digest gem not to try to install `digest.h` to an unwritable directory so `gem install --user digest` succeeds.
- It is (technically) poss... -
08:58 AM Feature #18258: Ractor.shareable? can be slow and mutates internal object flags.
- I think for the semantic model it could be easier with the proposed semantics in this issue: only always-shareable objects are shareable without `Ractor.make_shareable`/`freeze` for leaf objects with no ivars/`deep_freeze/Immutable`.
Ri... -
08:58 AM Feature #18258: Ractor.shareable? can be slow and mutates internal object flags.
- I feel from a predictability POV, it would definitely be advantageous to set `RB_FL_SHAREABLE` in every case it's known ahead of time to avoid unexpected overheads. Even if `Ractor.shareable?` is not public interface, it's still used int...
-
08:52 AM Feature #18258: Ractor.shareable? can be slow and mutates internal object flags.
- Yeah that's an alternative design.
Currently `Ractor.shareable?` semantics are "is it already shareable as in conceptually or not?".
(And the flag is just a cache for the "yes" case)
And it's not "is it already shareable as marked w... -
03:19 AM Feature #18258 (Closed): Ractor.shareable? can be slow and mutates internal object flags.
- On my computer, even with a relatively small object graph,`Ractor.shareable?` can be quite slow (around 1-2ms). The following example creates an object graph with ~40k objects as an example, and on my computer takes around 20ms to execut...
-
07:50 AM Feature #17369 (Closed): Introduce non-blocking `Process.wait`, `Kernel.system` and related methods.
-
07:49 AM Feature #17369: Introduce non-blocking `Process.wait`, `Kernel.system` and related methods.
- Please file a new issue for fiber-local `$?`.
-
07:36 AM Bug #17429 (Closed): Prohibit include/prepend in refinement modules
- Applied in changeset commit:git|6606597109bdb535a150606323ce3d8f5750e1f6.
----------
Deprecate include/prepend in refinements and add Refinement#import_methods instead
Refinement#import_methods imports methods from modules.
Unlike Modu... -
05:42 AM Bug #17429: Prohibit include/prepend in refinement modules
- I agreed with `import_methods`, which is more descriptive and clear.
Matz.
-
07:31 AM Revision 66065971 (git): 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] -
07:17 AM Revision 7185c00f (git): freeze (make shareable) script_lines
-
07:17 AM Revision c7550537 (git): `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 ... -
06:02 AM Feature #18239: Variable Width Allocation: Strings
- I agree with merging it, but it's too close to the 3.1 release. So how about merging it, turned off by default, then turning it on after the release?
Matz.
-
05:08 AM Bug #18170: Exception#inspect should not include newlines
- I agree with the new behavior that wraps messages with newlines.
Matz.
-
05:08 AM Revision 3b16d07e (git): Fix test_version again for RUBY_YJIT_ENABLE=1
-
04:57 AM Revision 76f9bc7e (git): Reduce the amount of false positive notifications
- While f6048e592c520e20ba498ba4d553f07f02213a61 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.t... -
04:49 AM Revision 58231687 (git): [ruby/psych] Bump up psych version to 4.0.2
- https://github.com/ruby/psych/commit/69a713f860
-
04:25 AM Feature #18229: Proposal to merge YJIT
- I finished to setup maximecb's account as a committer.
-
04:07 AM Revision 4d4bdcf3 (git): Move the test file
-
04:07 AM Revision 58956dba (git): Fix for out-of-place build
-
04:07 AM Revision 18b65508 (git): Suppress warnings
-
03:52 AM Revision 66a64e6f (git): Fix tests with cppflags=-DYJIT_FORCE_ENABLE
- https://github.com/ko1/build-ruby/commit/0dbd95c6250594b6ddadc3c4424b071704083187
10/20/2021
-
11:21 PM Feature #18229 (Closed): Proposal to merge YJIT
- @alanwu has just merged https://github.com/ruby/ruby/pull/4992 at commit:6a9e2b3cc381fd1b6c5ec5eddb077ea5468ef75e. Congratulations!
-
05:34 PM Feature #18229: Proposal to merge YJIT
- Thank you Matz & Kokubun
I will follow the instructions to register as a committer :)
The upstreaming PR on ruby/ruby is now open. Currently working on a last-minute issue, trying to resolve a bug we found this morning, but otherwi... -
04:36 AM Feature #18229: Proposal to merge YJIT
- Thank you for your support, Matz!
@maximecb Could you follow https://bugs.ruby-lang.org/projects/ruby/wiki/CommitterHowto#What-to-do-for-registering-you-as-a-committer to give commit access to you? -
04:28 AM Feature #18229: Proposal to merge YJIT
- I accept @maximecb as a committer. Welcome!
For the concrete process for merging YJIT into master, consult with @k0kubun.
Matz.
-
11:15 PM Revision 8684946b (git): Add bit about YJIT to NEWS.md
- 11:12 PM Revision 7637175a (git): * append newline at EOF. [ci skip]
-
11:04 PM Revision 6a9e2b3c (git): 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] -
10:59 PM Feature #18256: Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- znz (Kazuhiro NISHIYAMA) wrote in #note-5:
> `'\bMutex\b'` counts `Thread::Mutex` too.
True, although given the proportion it doesn't really change things much.
`gem-codesearch` is always an approximation anyway.
Trying to be a l... -
12:25 AM Feature #18256: Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- `'\bMutex\b'` counts `Thread::Mutex` too.
```
$ gem-codesearch '\bMutex\b' | grep Thread::Mutex | wc -l
254
``` -
10:19 PM Revision 00be5846 (git): 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_test... -
10:19 PM Revision cffa1162 (git): 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 shuf... -
10:19 PM Revision c062028d (git): YJIT: check machine arch before enabling
- So we don't try to run x64 on ARM.
-
10:19 PM Revision b74d6563 (git): 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() ... - 10:19 PM Revision 2e243056 (git): Update yjit.md
-
10:19 PM Revision adcee68a (git): Doc: remove outdated note about hooking into the interpreter
- DAE remember MicroJIT?
-
10:19 PM Revision 8a9a2d00 (git): Move test_yjit_asm.sh into misc
- Since conventionally scripts don't live at the top level of the repo.
-
10:19 PM Revision 5906a5a7 (git): Add comments about special runtime routines YJIT calls
- When YJIT make calls to routines without reconstructing interpreter
state through jit_prepare_routine_call(), it relies on the routine to
never allocate, raise, and push/pop control frames. Comment about this
on the routines that YJTI ca... -
10:19 PM Revision 1e23b1a6 (git): Actually, tabs are okay in Makefile
-
10:19 PM Revision 454fbe10 (git): Expand tabs
-
10:19 PM Revision 38f364b8 (git): Update dependencies
- 10:19 PM Revision da305dd2 (git): Match the main-branch location of yjit in inits.c
-
10:19 PM Revision 40608d0b (git): Fix indentation in ruby.c
-
10:19 PM Revision 95e337f8 (git): Warn when trying to use YJIT in --disable-jit-support builds
-
10:19 PM Revision ff863f38 (git): Show --yjit in help message
-
10:19 PM Revision 11096da6 (git): Improve YJIT command line option parsing
- Previously, options such as "--yjit123" would enable YJIT. Additionally,
the error message for argument parsing mentioned "--jit-..." instead of
"--yjit-...". - 10:19 PM Revision d11ea252 (git): Update yjit.md
-
10:19 PM Revision de0af4fa (git): Revert "Disable YJIT while running MJIT tests (#62)"
- This reverts commit 60f3f25cc421b75b3dbf02fef759c4857bf3ef46.
We don't need to pass --disable-yjit when running MJIT tests anymore
because we are off by default. -
10:19 PM Revision 27358b6e (git): Simplify code for YJIT const cache in compile.c
- Since opt_getinlinecache and opt_setinlinecache point to the same cache
struct, there is no need to track the index of the get instruction and
then store it on the cache struct later when processing the set
instruction. Setting it when p... -
10:19 PM Revision 28632ea7 (git): Mention YJIT in Capstone autoconf check
-
10:19 PM Revision 63faab3c (git): Minimize diff in existing workflow files
-
10:19 PM Revision 4cad8930 (git): Add String#bytesize
- Fixes: https://github.com/Shopify/yjit/issues/258
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org -
10:19 PM Revision 5d2e5218 (git): Use env var to turn on YJIT for test-bundled-gems
- tool/test-bundled-gems.rb use sub processes for testing bundled gems and
doesn't support RUN_OPTS. We weren't enabling YJIT for these tests.
Use an include config with RUBY_YJIT_ENABLE to turn on YJIT for these
tests.
Note that we only ... -
10:19 PM Revision ec4a79a7 (git): Remove YJIT CI configs for tests make check runs
- "make check" runs "make test-spec" and "make test-all", so they don't
need to be individual elements of the matrix. -
10:19 PM Revision 413397b9 (git): Turn on YJIT for repeat-count=2 runs through env var
- It wasn't on at all before... Since it's a snowflake "include" matrix
element, might as well test the env var with it. -
10:19 PM Revision 27661ee8 (git): Turn on YJIT in macOS workflow
- It wasn't on at all and the printout of RUBY_DESCRIPTION at the end of
`make check` wasn't saying +YJIT. -
10:19 PM Revision efed4596 (git): Show +YJIT in version string and RUBY_DESCRIPTION
- There might be code out there that expect `ruby -v` to print only one
line. Since MJIT shows +JIT in `ruby -v` and RUBY_DESCRIPTION, let's
show +YJIT.
The crash report doesn't show anything about MJIT, so adjust the test.
The "test_ruby... -
10:19 PM Revision 13261f00 (git): More simple bootstrap tests for kwargs
-
10:19 PM Revision 32b5125c (git): else if style
- 10:19 PM Revision 35b37c58 (git): Update yjit_codegen.c
- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
- 10:19 PM Revision 201721b7 (git): Update yjit_codegen.c
- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
-
10:19 PM Revision 56b1b93a (git): Feedback, tests, and rebase for kwargs
-
10:19 PM Revision c5acbd02 (git): Bail out if passing keyword arguments to only positional and/or optional methods
-
10:19 PM Revision 06a826b8 (git): Set up the callee stack pointer properly taking into account the bits object
-
10:19 PM Revision 5759d840 (git): Correct for positional required arguments
-
10:19 PM Revision 266e12ac (git): Push the unspecified_bits_value onto the stack
-
10:19 PM Revision 9aed5809 (git): Reuse stack swapping logic
-
10:19 PM Revision 2c0891be (git): Get kwargs reordering working
-
10:19 PM Revision 885bb972 (git): Get kwargs working for all passed in the correct order
-
10:19 PM Revision 1f25bba7 (git): YJIT_STATS instead of RUBY_DEBUG for --yjit-stats in help printout
-
10:19 PM Revision d4fae3e3 (git): Say YJIT is disabled by default in ruby --help
-
10:19 PM Revision d355bf17 (git): Style fix in ruby.c
-
10:19 PM Revision 34f15954 (git): Enable leaked global tests in YJIT workflows
-
10:19 PM Revision 99facbc0 (git): Correct workflow name for YJIT Ubuntu
- 10:19 PM Revision 4705db6a (git): Try turning off test-bundler-parallel to see if that fixes all the build errors
- 10:19 PM Revision 21e58ace (git): Don't enable YJIT by default. More tests on both Ubuntu and MacOS.
- Add RUBY_YJIT_ENABLE env var and YJIT_FORCE_ENABLE compile-time constant.
Rename YJIT_STATS to RUBY_YJIT_STATS. -
10:19 PM Revision 7c08538a (git): Cleanup diff against upstream. Add comments
- I did a `git diff --stat` against upstream and looked at all the files
that are outside of YJIT to come up with these minor changes. -
10:19 PM Revision 884b6f3d (git): Move YJIT internal macros away from yjit.h. Tweak style
- Since this file is exposed to the rest of the codebase and they don't
really need to know about things like PLATFORM_SUPPORTED_P. -
10:19 PM Revision ed723ca7 (git): Remove yjit_backend to help with upstreaming
- The new backend isn't used at the moment and adds to our diff against
upstream so remove it for now. We can reverse the removal later with git
history. -
10:19 PM Revision 506c037a (git): Cleanup iseq.c minimize diff with upstream
- Most of these are vestiges of our old setup where we hack into the
interpreter loop. -
10:19 PM Revision 735b3a77 (git): Tweak mjit_exec() to remove YJIT symbol exports
- We were exporting a couple of symbols in yjit.h because they could be
used by code generated by MJIT. We don't want MJIT calling into YJIT
code anyways so let's stop exporting them to libruby.so.
Also adjust indentation and comments in ... -
10:19 PM Revision b242ea87 (git): Re-enable leaked global check
- YJIT should be able to pass this check now.
-
10:19 PM Revision f6da559d (git): Put YJIT into a single compilation unit
- For upstreaming, we want functions we export either prefixed with "rb_"
or made static. Historically we haven't been following this rule, so we
were "leaking" a lot of symbols as `make leak-globals` would tell us.
This change unifies ev... -
10:19 PM Revision 25eed284 (git): Remove unused function
-
10:19 PM Revision 7eea96c7 (git): Fix gen_getclassvariable
- We need to reconstruct interpreter state before calling into the
routines to be able to raise exceptions. I'm getting a crash in
debug build with:
make test-all 'TESTS=test/ruby/variable.rb' RUN_OPTS='--yjit-call-threshold=1 --yjit-m... -
10:19 PM Revision 70c5bbf8 (git): Fix counter names for getblockparamproxy. Print in --yjit-stats.
- 10:19 PM Revision f021b352 (git): Reduce line length for YJIT option descriptions
- 10:19 PM Revision fab469b6 (git): Document YJIT options in --help
-
10:19 PM Revision c8e157bb (git): Implement getclassvariable in yjit
- Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
- 10:19 PM Revision 4fc20a8c (git): Move Ruby's README back where it was
- 10:19 PM Revision 3dd4abfc (git): Move YJIT's README into doc/yjit/yjit.md
- 10:19 PM Revision 63927023 (git): Incorporate feedback from the PR into yjit_hacking.md
- 10:19 PM Revision d4a75dd9 (git): Add a YJIT hacking doc with some internals; change the README text a bit to reflect its current condition
-
10:19 PM Revision f911e264 (git): Add counted side exit to getblockparamproxy
- This is so we know the specific reason we're exiting this instruction.
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org - 10:19 PM Revision be06112d (git): Fix changes from rebase
-
10:19 PM Revision f36a5a98 (git): style: line break before "else"
-
10:19 PM Revision ec4998bd (git): style: switch statements indent
- Case labels get half an indent and the opening brace is on the same line
as "switch". -
10:19 PM Revision a10cf74e (git): style: align pointer "*" to the right
-
10:19 PM Revision 5b68d14c (git): Add optimized Thread.current
-
10:19 PM Revision 5c15850e (git): Use jit_guard_known_klass() for hashes in opt_aref
- The old heap object check is not as efficient as the one in
jit_guard_known_klass(). Also, the old code saves cfp->sp after popping
the operands off the stack, which might cause the operands to be not
marked by the GC in some circumstances. -
10:19 PM Revision 9dce2d51 (git): Also do String#str
-
10:19 PM Revision 1a5109cb (git): Comment edits and moving functions around in the file
-
10:19 PM Revision a09adac2 (git): Add specialization for String#to_s on plain strings
- When calling "to_s" on an instance of String, the method simply returns
self. In this situation most of the work comes from setting up the
method call. It turns out that both railsbench and liquid-render do this
a lot.
When generating c... -
10:19 PM Revision 79015926 (git): Try to get getblockparamproxy to support level > 0
-
10:19 PM Revision 8edb29e5 (git): Reconstruct interpreter state before calling rb_ivar_get()
- It could raise ractor exceptions. The included test didn't run properly
before this change. -
10:19 PM Revision d0a213b3 (git): Remove a memory load in gen_send_iseq
- Instead of loading from meory for REG_SP, do a register rename instead.
It's cheaper. -
10:19 PM Revision 0a108601 (git): Add counters for version invalidation reasons
- I noticed that there were two st_table iterators that do exactly the
same thing so I merged them into one. - 10:19 PM Revision e48fc07d (git): Fix counter names
- 10:19 PM Revision 7704a699 (git): Fix typo in comment
- 10:19 PM Revision a0790e63 (git): Break up callsite_not_simple into multiple cases.
-
10:19 PM Revision 0c1aa175 (git): Remove a few more uses of the global cb/ocb
-
10:19 PM Revision 78b5e95e (git): Add a slowpath for opt_getinlinecache
- Before this change, when we encounter a constant cache that is specific
to a lexical scope, we unconditionally exit. This change falls back to
the interpreter's cache in this situation.
This should help constant expressions in `class <<... -
10:19 PM Revision f1eb48cb (git): Step 2 to remove the global cb/ocb objects.
-
10:19 PM Revision c55d4caf (git): Pass the global cb through codegen functions
-
10:19 PM Revision 0385ca2e (git): Try to break the code page refactoring into smaller steps
-
10:19 PM Revision c46bda6f (git): Fix excessive invalidation for opt_getinlinecache
- YJIT expects the VM to invalidate opt_getinlinecache when updating the
constant cache, and the invalidation used to happen even when YJIT can't
use the cached value.
Once the first invalidation happens, the block for opt_getinlinecache
... -
10:19 PM Revision 6ef1609f (git): Correct margin for stack overflow test
- In vm_push_frame(), the stack overflow test is done against a
decremented cfp. YJIT wasn't accounting for that in its stack overflow
tests. -
10:19 PM Revision 7482744e (git): Add jit_obj_info_dump
-
10:19 PM Revision 561882e9 (git): Add comment explaining argc + 2
-
10:19 PM Revision 9951a9a8 (git): Implement invokebuiltin
- 10:19 PM Revision 6055078b (git): Update README.md
- 10:19 PM Revision e04c3af5 (git): Update README.md
-
10:19 PM Revision 5506f276 (git): Add test for setlocal
-
10:19 PM Revision 82f60df5 (git): Implement generic setlocal
-
10:19 PM Revision 90de2dc7 (git): Extract gen_get_ep
-
10:19 PM Revision 2ff26b9e (git): Fix opt_aset comptime_key check
-
10:19 PM Revision a6cf515e (git): Rearrange stats printout for consistency
-
10:19 PM Revision 82405ac4 (git): Add counters for tracking invalidations
-
10:19 PM Revision 1f09eb66 (git): Expand tabs
- 10:19 PM Revision 0ad9d1fa (git): Update yjit_codegen.c
-
10:19 PM Revision 5e37f280 (git): Remove vm_opt_aset
-
10:19 PM Revision ba9d01b3 (git): Specialize based on types of opt_aset
-
10:19 PM Revision 121d8f47 (git): Compile out declaration for runtime stats on non stats builds
- Checked on default build, RUBY_DEBUG build, and YJIT_STATS build.
-
10:19 PM Revision a71590e6 (git): Don't store cfp->pc when doing iseq calls
- We set it before calling routines and when we are exiting.
-
10:19 PM Revision 1f664168 (git): No need to do ec->cfp = reg_cfp on exits
- It's already up to date. We set it when we do iseq calls and it's set
properly on entry. If it's not set properly exceptions wouldn't work. -
10:19 PM Revision 9fff8fdb (git): Update suggested ./configure in README
-
10:19 PM Revision bc765299 (git): Fix warnings about redefining YJIT_STATS
- Follow up for ecb5b383a0c17550b9b27663005049ddac871edb. Now that
YJIT_STATS is defined in yjit.h, it shoudl be the only place that
defines it. -
10:19 PM Revision 0ee8c606 (git): Add missing percent sign in printout
-
10:19 PM Revision a68e61f0 (git): Add tests against side exits for non-fixnum
-
10:19 PM Revision 7d99e856 (git): Check for comptime fixnum in gen_fixnum_cmp
-
10:19 PM Revision f1b7568f (git): Check for comptime fixnums in opt_and and opt_or
-
10:19 PM Revision cb9bc13f (git): Check for comptime integers in opt_plus and opt_minus
-
10:19 PM Revision fd10634b (git): Move forward declaration up
-
10:19 PM Revision bd8cfb35 (git): Fix misplaced ivar_set_method exit counter
-
10:19 PM Revision 217f7cb1 (git): Include errno message in mmap failure output
- It might help figure out why it is failing.
-
10:19 PM Revision 96fd8afb (git): Skip opt_case_dispatch
-
10:19 PM Revision fc13ff14 (git): Add comments to getspecial
-
10:19 PM Revision bf8557f4 (git): Add comments for new function
-
10:19 PM Revision 25f8431d (git): only compile for T_OBJECT types
-
10:19 PM Revision 5bc03432 (git): Refactor attrset to use a function
- This new function will do the write barrier / resize the object / check
frozen for us -
10:19 PM Revision 5092d612 (git): Fix opt_eq for overridden equality
-
10:19 PM Revision 554d76af (git): Revert "disable yjit when testing mjit"
- This reverts commit e8622ce5c0a09c7213e4d536ddd0ef3ea68377ef.
-
10:19 PM Revision afc5db43 (git): is this right?
-
10:19 PM Revision b78c50d8 (git): Don't check MJIT if it's not enabled
-
10:19 PM Revision 9d5beb6f (git): Disable YJIT by default if MJIT_FORCE_ENABLE is on
- Compile time flag seems pretty forceful, so let MJIT turn on by default
if it is used. -
10:19 PM Revision ea453acf (git): disable MJIT when --enable-all is set
-
10:19 PM Revision 44214e8a (git): Implement getspecial
-
10:19 PM Revision cc2aa122 (git): Fix avg_len_in_yjit
- We weren't counting completing an entire method in YJIT as exits so the
avg_len_in_yjit for
./miniruby --yjit-call-threshold=1 --yjit-stats -e'def foo; end; foo'
was infinite. -
10:19 PM Revision cbb0271d (git): Deduplicate side exits
- Send instructions currently generate the exact same side exit twice.
Cache the exit the first time we generate it. Also add a comment
explaining what side exits do.
Closes GH-117. - 10:19 PM Revision 6e1f2519 (git): Info for Fedora and choosing C compiler
-
10:19 PM Revision 11599e5e (git): Add rb_darray_clear() for Kevin. Fix some warnings.
-
10:19 PM Revision f3808569 (git): Add fixes for feedback
-
10:19 PM Revision f30f2990 (git): Use C_ARG_REGS earlier
-
10:19 PM Revision c2b19344 (git): Add tests against opt_eq side exits
-
10:19 PM Revision 10f1d808 (git): Remove rb_opt_equality_specialized
-
10:19 PM Revision 9ebcd576 (git): String and fixnum equality
-
10:19 PM Revision 6db5e80d (git): Use method dispatch for opt_eq
-
10:19 PM Revision 692f94ba (git): Add jit_rb_obj_equal
-
10:19 PM Revision 4b58d698 (git): Count interpreter instructions when -DYJIT_STATS=1
- The interpreter instruction count was enabled based on RUBY_DEBUG as
opposed to YJIT_STATS. In builds with YJIT_STATS=1 but RUBY_DEBUG=0,
the count was not available.
Move YJIT_STATS in yjit.h where declarations are expoed to code outsi... - 10:19 PM Revision 9bd6ce47 (git): Update README.md
-
10:19 PM Revision 580e1bab (git): disable yjit when testing mjit
- 10:19 PM Revision a1d42c37 (git): Update ruby.c
-
10:19 PM Revision 234ab816 (git): Exit if YJIT and MJIT are both enabled
- YJIT and MJIT can't be running in the same process otherwise they'll
clobber each other. We should show an error and exit if they're both
enabled. -
10:19 PM Revision 013a4a31 (git): Prevent stats being enabled late at run-time
-
10:19 PM Revision 640b162b (git): Exit when the object is frozen
- Exit when the object is frozen, also add tests
-
10:19 PM Revision 376f5ec1 (git): Add a write barrier to ivar set
- We need to fire the write barrier during ivar set. This function
extracts the write barrier function then calls it.
Co-Authored-By: John Hawthorn <john@hawthorn.email> -
10:19 PM Revision 307a4369 (git): Implement setivar method calls
-
10:19 PM Revision ce02aefa (git): Allow calling variadic cfuncs with many args
- We have a check to ensure we don't have to push args on the stack to
call a cfunc with many args. However we never need to use the stack for
variadic cfuncs, so we shouldn't care about the number of arguments. -
10:19 PM Revision 922aed92 (git): Add codegen for rb_true and rb_false
- These are used by .nil? and therefore opt_nil_p
-
10:19 PM Revision fd34c831 (git): Allow special case of expandarray with nil
-
10:19 PM Revision d098c556 (git): Shave a few instructions off of leave
- The code path for leave that returns to the interpreter
(gen_leave() -> yjit_gen_leave_exit()) used to have the logic:
```
cfp->sp++;
cfp->sp[-1] = return_val;
cfp->sp--;
return return_val;
```
The SP changes it made wa... -
10:19 PM Revision ed85e8a3 (git): Use reg1 in GEN_COUNTER_INC to avoid clobbering RAX
-
10:19 PM Revision c210fade (git): Implement newrange
-
10:19 PM Revision 3a3f7066 (git): Additional invokesuper tests
-
10:19 PM Revision 3ecc6bef (git): Implement invokesuper using cfp->ep[ME] check
- This fixes and re-enables invokesuper, replacing the existing guards
with a guard on the method entry for the EP. -
10:19 PM Revision fbde1d9b (git): Store block callee_cme in darray
- This allows a block version to have dependencies on multiple CMEs.
-
10:19 PM Revision 9d5b3e1d (git): Add a small test for the code GC
-
10:19 PM Revision e527912f (git): Use jit_prepare_routine_call
-
10:19 PM Revision 69a25312 (git): Implement gen_putstring
- 10:19 PM Revision 2c93ef7a (git): Add YJIT logo
- Adding YJIT logo with a link to https://yjit.org
-
10:19 PM Revision 2bd99d7d (git): typo, rename, comment
-
10:19 PM Revision 81259767 (git): Avoid immediate side exits in checktype
- Previously checktype only supported heap objects, however it's not
uncommon to receive an immediate, for example when string interpolating
a Symbol or Integer. -
10:19 PM Revision 54db64f7 (git): filter out internal events. add comments. reorder
-
10:19 PM Revision 4b815abb (git): Lock, don't loock.
-
10:19 PM Revision 0ca04e2d (git): Only clear the JIT function when we invalidate the entry block
- We should only clear the JIT function when the entry point is
invalidated. Right now we only support compiling functions with a PC
offset of zero (functions that take optional parameters can start at
non-zero PC), so this patch just che... -
10:19 PM Revision b5a0baf1 (git): Allow to toggle YJIT stats collection from runtime
- For use cases where you want to collect the metrics
for a specific piece of code (typically a web request)
you can have the stats turned off by default and then
turn them on at runtime before executing the code you care
about. -
10:19 PM Revision 924e3ca8 (git): fix typo
-
10:19 PM Revision bd876c24 (git): TracePoint support
- This change fixes some cases where YJIT fails to fire tracing events.
Most of the situations YJIT did not handle correctly involves enabling
tracing while running inside generated code.
A new operation to invalidate all generated code i... -
10:19 PM Revision 05624594 (git): Redo the ivtable lookp once the ivar is set
-
10:19 PM Revision b3e993a6 (git): Make sure that there is always an index table entry for getivars
-
10:19 PM Revision 7f2828d1 (git): Update README
-
10:19 PM Revision 0dc3bba6 (git): Allow to compile with --yjit-stats support but not the full RUBY_DEBUG
- RUBY_DEBUG have a very significant performance overhead. Enough that
YJIT with RUBY_DEBUG is noticeably slower than the interpreter without
RUBY_DEBUG.
This makes it hard to collect yjit-stats in production environments.
By allowing to... -
10:19 PM Revision 2ba090a1 (git): Add toregexp to yjit
- The FIXME is there so we remember to investigate why insns clears the
temporary array. Is this necessary? If it's not we can remove it from
both.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> -
10:19 PM Revision dd5082d7 (git): Use cmov to handle Qundef case in getivar instead of side-exit
-
10:19 PM Revision c4b99d6a (git): Add ASM comment
-
10:19 PM Revision 918668b4 (git): update README with correct repository URL
-
10:19 PM Revision e18b0b6e (git): Implement putspecialobject
-
10:19 PM Revision 3edf2966 (git): Add opt_regexpmatch2
-
10:19 PM Revision 595fdf8d (git): Assign directly to C_ARG_REGS now when possible
-
10:19 PM Revision 8fa0ee4d (git): Use callee-saved regs for REG_SP, REG_EP, REG_CFP
-
10:19 PM Revision ed8aa340 (git): Detach mapping to local in ctx_set_local_type
- Similar to the previous fix to ctx_clear_local_types, we must detach
mappings to a local if we are changing its value. -
10:19 PM Revision 6d852e84 (git): Fix stack size check for ctx_get_opnd_type
- Previously all stack operands would become unknown once the stack grew
beyond a certain size. This worked, but unnecessarily hid available
information. -
10:19 PM Revision 48dca334 (git): Move yjit_type_of_value into yjit_core.c
-
10:19 PM Revision d78ea4ab (git): Implement verify_ctx for debugging
-
10:19 PM Revision a02002dc (git): More detection of immediate constants
-
10:19 PM Revision 2e707ee6 (git): Don't generate entry point when PC != 0
- If we hit this at PC > 0 (ie. with an optional argument) the provided
types and context are likely incorrect and it is likely this block can't
be used. -
10:19 PM Revision d2e8b99b (git): Implement tostring instruction for yjit
- Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
-
10:19 PM Revision 5b4305f7 (git): Simpler fix for -DUSE_EMBED_CI=0
- Nobu pointed out that saving the old ci to a local is enough to keep it
reachable. -
10:19 PM Revision 8cf01dd2 (git): Revert "Fix use-after-free on USE_EMBED_CI=0"
- This reverts commit 1e0f2e4b09ca9443524acf4b50ffd50a80f330f3.
-
10:19 PM Revision 641ef34d (git): Allow upgrading first N types when stack is large
-
10:19 PM Revision 5d155fc8 (git): Improve comments for mapping functions
-
10:19 PM Revision 786e5121 (git): Add regression test of invalid mapping merge
- This should have referenced MAX_TEMP_TYPES, not MAX_LOCAL_TYPES.
-
10:19 PM Revision 42574768 (git): Fix ctx_clear_local_types
-
10:19 PM Revision 250b97da (git): Make ctx_diff aware of mappings
-
10:19 PM Revision 6c80150d (git): Introduce ctx_{get,set}_opnd_mapping
-
10:19 PM Revision 4ea69e5c (git): Rename to ctx_upgrade_opnd_type
-
10:19 PM Revision 53079ca5 (git): Return if fixnums impossible
-
10:19 PM Revision f4f940e5 (git): Save PC and SP before accessing globals
- These instructions are marked as not leaf in insns.def, which indicate
that they could raise exceptions and/or call Ruby methods. -
10:19 PM Revision b91078ea (git): Add setglobal to yjit
- Adds yjit support for setting global variables.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email> - 10:19 PM Revision dd23e465 (git): If codeblock is NULL because YJIT is disabled, YJIT.runtime_stats should return Qnil
-
10:19 PM Revision 50029fb1 (git): Add getglobal to yjit
- Adds getglobal to yjit and a test for it.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> -
10:19 PM Revision 6aa46372 (git): Fix and uncomment getlocal test
- Previously, under the scraper, this would side-exit because it was
returning to a C method. Now that we use the jit_func entrypoint, this
test no longer side-exits. -
10:19 PM Revision 1891dcaa (git): Add flag so we can easily tell if all stats avail. Comment out broken test.
-
10:19 PM Revision 736eb29a (git): Fix use-after-free on USE_EMBED_CI=0
- The old code didn't keep old_operands[0] reachable while allocating. You
can crash it by requiring erb under GC stress mode. -
10:19 PM Revision a0bb731f (git): Add some YJIT runtime tests
- This is just for helping my own understanding, but could be useful for others as well.
-
10:19 PM Revision 71cef744 (git): Clear JIT code when tracepoints get enabled
- Clear out any JIT code on iseqs when tracepoints get enabled. We can't
handle tracepoints right now, so we'll just try to recompile later. -
10:19 PM Revision e8617d0e (git): Make sure we can still compile with the JIT disabled
- If `--disable-jit-support` is passed to configure, then `jit_func` is
removed from the iseq body and we can't compile YJIT. This commit
detects when the JIT function pointer is gone and disables YJIT in that
case. -
10:19 PM Revision 41f405c4 (git): Remove the scraper
- Now that we're using the jit function entry point, we don't need the
scraper. Thank you for your service, scraper. ❤️ -
10:19 PM Revision 84a1e04e (git): Change register definitions to match the entry point calling convention
- The JIT entry point passes the CFP as RSI and the EC as RDI. Lets match
that so we don't have to shuffle registers around. -
10:19 PM Revision 2a59bd73 (git): Disable YJIT in MJIT tests
-
10:19 PM Revision 5336f6da (git): make compiler happy
-
10:19 PM Revision 8fd3e0e9 (git): Fix BOP invalidation
- Instead of mutating the iseqs, just clear the JIT function.
-
10:19 PM Revision 05b5a7f0 (git): Add a guard that we start executing on the first PC
- Methods with optional parameters don't always start executing at the
first PC, but we compile all methods assuming that they do. This commit
adds a guard to ensure that we're actually starting at the first PC for
methods with optional p... -
10:19 PM Revision 0fdcdd26 (git): fix alignment
-
10:19 PM Revision d0174d99 (git): Always use `ret` to return to the interpreter
- Always using `ret` to return to the interpreter means that we never have
to check the VM_FRAME_FLAG_FINISH flag.
In the case that we return `Qundef`, the interpreter will execute the
cfp. We can take advantage of this by setting the PC... - 10:19 PM Revision b70383fb (git): YJIT stats should always include the inlined and outlined sizes, regardless of RUBY_DEBUG and --yjit-stats/YJIT_STATS settings
-
10:19 PM Revision adfecd8f (git): Allow asserts on results, rather than stdout
-
10:19 PM Revision 9c9e23e2 (git): Add assert_no_exits alias
-
10:19 PM Revision 4040ca82 (git): more testing
-
10:19 PM Revision 073e3b2e (git): Add test for recursion
-
10:19 PM Revision 7ed1e3ff (git): Add test of yjit compilation
-
10:19 PM Revision 4dc821e6 (git): Add YJIT.enabled?
-
10:19 PM Revision 9a436da0 (git): Ensure we guard the value before we return
- Otherwise you can end up not implicitly calling `to_ary`, which if it has side-effects will result in different behavior.
- 10:19 PM Revision 1943b27f (git): Update yjit.rb
- 10:19 PM Revision 84920fe8 (git): Update yjit.rb
- Co-authored-by: Rafael França <rafael.franca@shopify.com>
-
10:19 PM Revision a9c96222 (git): Dup strings so we can mutate them
- I guess the strings are frozen, so we need to dup before mutating
-
10:19 PM Revision 27681f26 (git): It's RUN_OPTS, not RUNOPTS!!! via @tenderlove
-
10:19 PM Revision 341d5bdc (git): Code review for expandarray and tests
-
10:19 PM Revision 97025db9 (git): Convert jumps to cmov
- 10:19 PM Revision bfde30c3 (git): Implement expandarray
-
10:19 PM Revision be648e09 (git): Implement splatarray
-
10:19 PM Revision cb5571ee (git): Flatten mappings when clearing locals
- We clear locals when we know their values might change (ex. when
performing a method call). However previously values on the stack which
were originally pushed from a local would still point back to that
local.
With this commit, when cl... -
10:19 PM Revision d5f18f78 (git): Add (void) for no arg functions
-
10:19 PM Revision 350b686a (git): First pass at code page GC object.
-
10:19 PM Revision 2440fafb (git): rb_struct_define_under needs a trailing NULL
- The last parameter to rb_struct_define_under needs to be NULL otherwise
we can get a SEGV. -
10:19 PM Revision dc8aca18 (git): Use push and pop in jit_rb_obj_not to avoid corrupting types
-
10:19 PM Revision 0c390e99 (git): Add assertions of types in jit_guard_known_klass
-
10:19 PM Revision 51c84f00 (git): Code page allocation code
-
10:19 PM Revision 09679f48 (git): Add an lldb script to print YJIT comments
- This script is an lldb helper that just loops through all the comments
stored and prints out the comment along with the address corresponding
to the comment.
For example, I'm crashing in JIT code at address 0x0000000110000168.
Using the... - 10:19 PM Revision ba9aa1f8 (git): Implement opt_div
- 10:19 PM Revision b0ae4fdc (git): Implement opt_mult
- Basically the same thing as opt_mod, but for multiplying.
-
10:19 PM Revision 4bea8af6 (git): Update deps
-
10:19 PM Revision 6cb4edd7 (git): Implement swap instruction
-
10:19 PM Revision 9e0a56fb (git): Add FLONUM detection
-
10:19 PM Revision dfc5e5e3 (git): Support guards against symbols and integers
- This adds guards
-
10:19 PM Revision c3f264b6 (git): Allow chaining on immediate guard
- In jit_guard_known_klass whenever we encounter a new class should
recompile the current instruction.
However, previously once jit_guard_known_klass had guarded for a heap
object it would not recompile for any immediate (special const) ... - 10:19 PM Revision 69982462 (git): Use snprintf rather than double strncpy.
- 10:19 PM Revision e2fe7e4a (git): Percentages should be out of 100.0%, not 1.0%.
- 10:19 PM Revision db02d73e (git): Change strcpy of a static string to strncpy
- 10:19 PM Revision 5e164a77 (git): Better comments where we add exits-by-opcode to the stats hash, plus a presumably-unneeded strncpy just to be sure.
- 10:19 PM Revision 89ae21a0 (git): Add back ifdefs for RUBY_DEBUG, accidentally removed
- 10:19 PM Revision d2e99329 (git): Convert YJIT stats reporting on exit from C to Ruby.
- 10:19 PM Revision 33227b10 (git): Add exit counters and inline/outlined code size to stats hash
-
10:19 PM Revision 0d63600e (git): Partial revert of ceebc7fc98d
- I'm looking through the places where YJIT needs notifications. It looks
like these changes to gc.c and vm_callinfo.h have become unnecessary
since 84ab77ba592. This commit just makes the diff against upstream
smaller, but otherwise sho... - 10:19 PM Revision b385f311 (git): Remove seven YJIT counters that are no longer used.
- 10:19 PM Revision 25792c17 (git): Convert yjit static stat variables to counters
-
10:19 PM Revision 94cb5a6b (git): Implement opt_neq
-
10:19 PM Revision 3996e0ab (git): Add tests, comments, and an assert for invokesuper
-
10:19 PM Revision 6883aeda (git): Add a macro for tweaking default call threshold
- For use in development for writing `test.rb` and running with `make
run`. -
10:19 PM Revision 71560f88 (git): Add opt_size and opt_length
-
10:19 PM Revision e4bf905a (git): Use an st_table for optimized method codegen
- We recently added the ability to optimize a known cfunc with custom code
generation for it.
Previously we performed this lookup with a switch statement on the
address of the c function being called. This commit swaps that out for a
hash... -
10:19 PM Revision 7030cae9 (git): Try running with more YJIT options in CI to surface more bugs
-
10:19 PM Revision b63fcafb (git): Make jumps dashed and falls solid
-
10:19 PM Revision 089ad6dc (git): Clean graph formatting
-
10:19 PM Revision 46d5e102 (git): Add graphviz output
- This adds a method to blocks to get outgoing ids, then uses the outgoing
ids to generate a graphviz graph. Two methods were added to the Block
object. One method returns an id for the block, which is just the
address of the underlying ... -
10:19 PM Revision f54e6e13 (git): Update comment
-
10:19 PM Revision 30f20d7c (git): Remove some MicroJIT vestiges
- Just happened to run across this, so lets fix them
-
10:19 PM Revision 0cd3b97e (git): Handle non-material empty singleton class properly
- As an optimization, multiple objects could share the same singleton
class. The optimization introduced in 6698e433934d810b16ee3636b63974c0a75c07f0
wasn't handling this correctly so was generating guards that never pass
for the inputs we ... -
10:19 PM Revision 89110590 (git): Disable invokesuper codegen for now. Add test
- The added test fails with SystemStackError with --yjit-call-threshold=1.
-
10:19 PM Revision da20ff16 (git): Fix bug in generic case for gen_checktype
- When checking for T_HASH, which is Qnil and when the type check succeeds
we were outputting to the stack a Qnil instead of a Qtrue. -
10:19 PM Revision 7d252186 (git): Simplify known class check for singletons
- Singleton classes should only ever be attached to one object. This means
that checking for the object should be the same as checking for the
class. This should be slightly faster by avoiding one memory acccess as
well as allowing us to s... -
10:19 PM Revision 8c68f112 (git): Delay and be selective about when to discard local types
- jit_rb_obj_not() wants to access the type information of the receiver,
but we were discarding type info of locals before jit_rb_obj_not() runs
unncessarily.
There are also cases we are unncessarily discarding local type info. For
exampl... -
10:19 PM Revision 936ee555 (git): Improve opt_not by expanding cfunc codegen
- This commit improves opt_not by making it correct when TrueClass#!
and/or FalseClass#! is defined and genearting better code when the
receiver is a heap object.
guard_known_class() can now handle true, false, and nil, and we
introduce a... -
10:19 PM Revision 78f64d14 (git): Add invokebuiltin_delegate_leave
- invokebuiltin_delegate can be run in place of
invokebuiltin_delegate_leave because there is always a leave instruction
afterwards (the interpreter takes advantage of this as well when
rewriting iseqs for tracing). -
10:19 PM Revision b93f59ce (git): Implement invokebuiltin_delegate
- invokebuiltin_delegate is a special version of invokebuiltin used for
sending a contiguous subset of the current method's locals.
In some cases YJIT would already handle this for trivial cases it could
be inlined, implementing this OP a... -
10:19 PM Revision d416a15c (git): Warn rather than raise when --yjit-stats is ignored
-
10:19 PM Revision f16ec70e (git): Allow yjit.rb to work with frozen strings
- 10:19 PM Revision d1d3d2c0 (git): If --yjit-stats is given without RUBY_DEBUG, that should be an error.
-
10:19 PM Revision 364cdda0 (git): Fix compiler warning
-
10:19 PM Revision 3365e1d7 (git): Allow to enable `--yjit-stats` via a env variable
-
10:19 PM Revision 9043ad3d (git): Implement topn instruction
- This commit implements the topn instruction
Co-Authored-By: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-Authored-By: Noah Gibbs <noah.gibbs@shopify.com> -
10:19 PM Revision 986b9b47 (git): Better comments
-
10:19 PM Revision 0a3ee8b2 (git): Avoid looping on invokesuper on module included multiple times
-
10:19 PM Revision 3fedf832 (git): Check for refinements in gen_invokesuper
-
10:19 PM Revision 0fb29260 (git): Guard against implicitly forwarded block
-
10:19 PM Revision ecd4487a (git): Remove #define MAX_VERSIONS, now using command-line option
-
10:19 PM Revision 83c7f27a (git): Add invokesuper
-
10:19 PM Revision 99341d4a (git): Fix issue in yjit_free_block causing segfault
- This addresses issue #55
-
10:19 PM Revision 67c2cdc5 (git): Implement gen_getlocal
- This extracts the generation code from getlocal_wc1, since this is the
same just with more loops inside vm_get_ep. -
10:19 PM Revision 5432f46f (git): Can't add comments to the outlined code block
-
10:19 PM Revision ed636b59 (git): Add duparray to YJIT codegen
-
10:19 PM Revision d77c989a (git): Fix check for leaf invokebuiltin
- Also added a comment when inlining a leaf builtin
- 10:19 PM Revision 9a55fd37 (git): Update README.md
- 10:19 PM Revision 43acb9d7 (git): Update README.md
-
10:19 PM Revision cdc9cb6e (git): Stylize macOS correctly
- Yes, it's all very confusing.
- 10:19 PM Revision 7dc497e1 (git): Update README.md
- 10:19 PM Revision b1fab663 (git): Update README.md
- 10:19 PM Revision 860589c7 (git): Use builtin_inline_p to avoid pushing a frame for primitive C methods (#63)
- * Use builtin_inline_p to skip a frame of C methods
* Fix bugs in primitive cfunc call code
* Remove if (push_frame) {}
* Remove if (push_frame) {}
* Push Aaron's fix to avoid hardcoding insn lengths
Co-authored-by: Takashi Kokubun ... - 10:19 PM Revision 9f46e6e6 (git): Disable YJIT while running MJIT tests (#62)
- Two JITs running at once may result in strange interactions. Lets
disable YJIT while running the MJIT tests. -
10:19 PM Revision ea33b0a9 (git): Add concatstrings to yjit codegen (#58)
- * Add ETYPE_TRUE and ETYPE_FALSE
* Implement checktype
* Implement concatstrings
* Update deps -
10:19 PM Revision eb6e5be0 (git): Add newhash and newarray instructions to yjit codegen (#48)
- * Implement gen_newarray
* Implement newhash for n=0
* Add yjit tests for newhash/newarray
* Fix integer size warning on clang
* Save PC and SP in newhash and newarray
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmai... -
10:19 PM Revision d01204a1 (git): Disable extra T_OBJECT check added because of Nokogiri
-
10:19 PM Revision 546ca816 (git): Guard for T_OBJECT at compile time (#53)
- Previously this could crash on Nokogiri when JITing the getivar
instruction because we would attempt to treat Nokogiri::XML::Document's
T_DATA as a T_OBJECT in calling rb_iv_index_tbl_lookup.
This commit also checks for T_OBJECT at comp... -
10:19 PM Revision 9283fc1b (git): Implement opt_freeze and opt_uminus (#49)
- 10:19 PM Revision b415ceb9 (git): Increase default YJIT call threshold to 10. Add exec mem size arg. (#52)
-
10:19 PM Revision 764740c6 (git): Merge pull request #50 from jhawthorn/detect_type
- Detect types from putobject and getinlinecache
- 10:19 PM Revision 844067f7 (git): Update README.md
-
10:19 PM Revision 6ecb007f (git): Recommend installing libcapstone
-
10:19 PM Revision 1aace65d (git): Add comment
-
10:19 PM Revision 03da234e (git): Add T_OBJECT check to getivar
- 10:19 PM Revision a66dce14 (git): Implement opt_not with deferred compilation (#44)
-
10:19 PM Revision da30f21a (git): Try to fix MJIT symbol clash with cargo cult
- 10:19 PM Revision 0db85218 (git): Avoid interrupt checks for forward branches (#41)
-
10:19 PM Revision 6b5d26dc (git): Implement basic encodings for xchg
-
10:19 PM Revision 5c2f74fc (git): Fix encoding of test x86 instruction
- 10:19 PM Revision 54fe43b4 (git): Implement defined bytecode (#39)
- 10:19 PM Revision 7ce6d1f0 (git): Update README.md
- 10:19 PM Revision 3677b233 (git): Implement opt_nil_p and opt_empty_b by delegating to send (#35)
- 10:19 PM Revision d6412126 (git): Implement setivar with a plain old function call (#34)
- * Implement setivar with a plain old function call
* Remove return -
10:19 PM Revision 7eef8f09 (git): Implement getblockparamproxy
- * Implement getblockparamproxy
* Parallel runner: wait for timeout thread to terminate after killing
Or else the leak cheaker could sees the thread as running and cause test
failures in test-tool.
* Add a comment, use jne
* Comment a... - 10:19 PM Revision ce928473 (git): Deletate to opt_send_without_block for opt_ltlt (#33)
-
10:19 PM Revision 0c3842d1 (git): Implement opt_aset as interpreter handler call
- 10:19 PM Revision c9feb72b (git): Implement opt_mod as call to interpreter function (#29)
- 10:19 PM Revision e2c1d693 (git): Implement opt_eq by calling interpreter function (#28)
- 10:19 PM Revision e22657b8 (git): Implement branchnil bytecode (#26)
- 10:19 PM Revision 6c793a2f (git): Update README.md
- 10:19 PM Revision 4f24f3af (git): Update README.md
-
10:19 PM Revision 0d64f5e8 (git): Check for easy-to-handle cases of block param (#24)
- In some cases, methods taking block parameters don't require extra
paramter setup. They are fairly popular in railsbench. - 10:19 PM Revision ad601cef (git): Update README.md
- Add section documenting command-line arguments
- 10:19 PM Revision e5f8b417 (git): Implement send with alias method (#23)
- * Implement send with alias method
* Add alias_method tests -
10:19 PM Revision 0758115d (git): Implement send with blocks
- * Implement send with blocks
Not that much extra work compared to `opt_send_without_block`.
Moved the stack over flow check because it could've exited after changes
are made to cfp.
* rename oswb counters
* Might as well implement sen... - 10:19 PM Revision 59e5f6b8 (git): Implement dupn for n==2 (only case used in RDoc/railsbench) (#20)
- * Implement dupn for n==2 (only case used in RDoc/railsbench)
* Implement adjuststack bytecode - 10:19 PM Revision 8249f6ef (git): Print top-20 common exit reasons instead of just top-10 (#19)
-
10:19 PM Revision 684e84df (git): Use rb_ivar_get() for general case of getivar (#17)
- * Use rb_ivar_get() for general case of getivar
Pretty straight forward. Buys about 1% coverage on railsbench.
* Update yjit_codegen.c
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> - 10:19 PM Revision 62c1297e (git): Implement setn bytecode (#15)
-
10:19 PM Revision 36134f7d (git): Implement calls to methods with simple optional params
- * Implement calls to methods with simple optional params
* Remove unnecessary MJIT_STATIC
See comment for MJIT_STATIC. I added it not knowing whether it's
required because the function next to it has it. Don't use it and wait
for probl... - 10:19 PM Revision bce6dea7 (git): Fix assertions in `invalidate_block_version()`, add small repro (#14)
- * Fix block invalidation assertions
* Add Alan's small repro for double invalidation bug - 10:19 PM Revision cfaf6013 (git): Update README.md
- 10:19 PM Revision cf2b5083 (git): Try to alloc executable memory within rel32 range on Linux machines (#12)
- * Use INT32_MIN, INT32_MAX, etc. constants in yjit_asm.c
* Print warning on stderr when code past rel32 jump range
* Fix preprocessor snafu
* Move rel32 warning into --yjit-stats
* Try to allocate within rel32 offset on Linux machine... - 10:19 PM Revision 34dcd0b3 (git): Update README.md
- 10:19 PM Revision 31ab3530 (git): Update common.mk
- 10:19 PM Revision 8bd3e501 (git): Update README.md
- 10:19 PM Revision 96f4f918 (git): Implement greedy versioning. Refactor versioning logic. (#10)
- * Implement eager versioning. Refactor versioning logic.
* Add --version-limit and --greedy-versioning command-line args -
10:19 PM Revision 4c7afa64 (git): Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)
- Basically mirroring the interpreter for the general case.
- 10:19 PM Revision eaf039af (git): Create GitHub workflow to run ASM tests (#8)
- * Create GitHub workflow to run ASM tests
* Specify path
* Attempt #3
* Set bash flags to print commands, stop on first error
* Remove clear command from test_asm.sh
* Use clang -
10:19 PM Revision f1b11fa4 (git): Comment edits
-
10:19 PM Revision 3e801040 (git): Aesthetic changes and add missing counter
-
10:19 PM Revision 8106a95e (git): English
-
10:19 PM Revision 10c0275b (git): Use jmp with memory operand for smaller code size
-
10:19 PM Revision 1610dc08 (git): YJIT: use a context-free landing pad to optimize `leave`
- This allows gen_leave to always do an indirect to cfp->jit_return.
-
10:19 PM Revision 9bd779cb (git): Don't check if value is immediate if context has type info
-
10:19 PM Revision e66c9f8c (git): Remove redundant mov
-
10:19 PM Revision adbd7ff3 (git): Fix frozen check (use jnz) and move heap object check.
-
10:19 PM Revision 38e67ccd (git): Add setivar exit reasons to --yjit-stats
-
10:19 PM Revision 435d7c50 (git): Improve set instance variable
- This commit improves the set ivar implementation.
-
10:19 PM Revision 035b5ac3 (git): Remove token_paste.h dep from common.mk
-
10:19 PM Revision ac88c61e (git): cYjitCodeComment is only defined if we're not in debugging mode
- This commit fixes a build error. If we build in release mode (IOW
*without* RUBY_DEBUG), then this constant isn't defined. Release mode
builds are required by yjit-bench -
10:19 PM Revision 60496b66 (git): Pass self type through method calls
- 10:19 PM Revision ef5cfcae (git): Delete codeql-analysis-2.yml
- 10:19 PM Revision 852ffe26 (git): Create codeql-analysis-2.yml
-
10:19 PM Revision 10217d14 (git): Rename YJIT readme to README.md
-
10:19 PM Revision 51e46eac (git): Rename Ruby README to README_ruby.md
- 10:19 PM Revision 0cc73ca2 (git): Malloc branch entries (#112)
- * Malloc branch entries
* Add ASM comment for stack overflow check
* WIP
* Fix branch GC code. Add rb_darray_remove_unordered().
* Fix block end_pos after branch rewriting. Remove dst_patched bits. - 10:19 PM Revision 33c975b8 (git): Merge pull request #114 from Shopify/yjit-dup-comments
- YJIT: Avoid adding duplicate code comments
-
10:19 PM Revision 23f88957 (git): Switch to 2-comparison heap object check
-
10:19 PM Revision f2530f88 (git): Improve codegen and type tracking in putobject
-
10:19 PM Revision 6250506d (git): Remove debug prints
-
10:19 PM Revision edaf12de (git): Fix local type tracking in getlocal, setlocal. Add test.
-
10:19 PM Revision 791f20af (git): WIP
-
10:19 PM Revision b69951cf (git): add a couple of getivar tests for symbols
-
10:19 PM Revision 476a3f4b (git): Use a insn_opnd instead of a bool
-
10:19 PM Revision 646c7b3f (git): Temporarily increase MAX_BRANCHES until we have a better solution
-
10:19 PM Revision dac83055 (git): Diff the local types in ctx_diff()
-
10:19 PM Revision 4442029e (git): move assert. opnd.idx doesn't make sense for OPND_SELF
-
10:19 PM Revision 4ea2e753 (git): YJIT: implement calls to ivar getter methods
-
10:19 PM Revision 53ff2d79 (git): Fix bug in ctx_set_local_type()
-
10:19 PM Revision 6164274c (git): Re-enable local type tracking, until first call
- 10:19 PM Revision 0805cba7 (git): Update yjit_codegen.c
-
10:19 PM Revision 31acd22d (git): Assert for running out of branches in all builds
-
10:19 PM Revision 2404ff69 (git): Factor our guard_two_fixnums(). Implement opt_or.
-
10:19 PM Revision 7ee3636f (git): Remove unnamed enums because MSVC sux
-
10:19 PM Revision f6e3f75c (git): Introduce concept of YJIT instruction operands
-
10:19 PM Revision 40b32909 (git): Use autogen.sh in YJIT's CI setup
- See d825e34962540d345eb3c5a70eb264b415e915a5
-
10:19 PM Revision b626dd72 (git): YJIT: Fancier opt_getinlinecache
- Make sure `opt_getinlinecache` is in a block all on its own, and
invalidate it from the interpreter when `opt_setinlinecache`.
It will recompile with a filled cache the second time around.
This lets YJIT runs well when the IC for constan... -
10:19 PM Revision e81d1f4a (git): Fix stack-use-after-scope in gen_direct_jump()
- ASAN can catch these type of things for us, but the scraper can't
handle ASAN :/.
To be more resilient to refactoring, extend the lifetime of
`generic_ctx` in branch_stub_hit() too. -
10:19 PM Revision 032b2ecf (git): Compute percentage of exits for top-10 exit ops
-
10:19 PM Revision 7108da16 (git): Fix two stats bugs, refactor stats code, add total_insn_count print
- 10:19 PM Revision 04243533 (git): Update yjit.md
-
10:19 PM Revision 515fb988 (git): YJIT: add comments to disassembly
- Introduce a new macro `ADD_COMMENT(cb, comment)` that records a comment
for the current write position in the code block.
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Co-authored-by: Aaron Patterson <aaron.patt... - 10:19 PM Revision 543bdde6 (git): Update yjit_iface.c
-
10:19 PM Revision 7f4b9e8e (git): YJIT: make ratio_in_yjit more accurate
- Don't count instructions that take exit to the interpreter.
-
10:19 PM Revision 42af04ef (git): Add flag bits to avoid compiling stubs multiple times.
- Fixes bug involving ractors and branch stubs.
-
10:19 PM Revision 54312d77 (git): Disable local type tracking for now
-
10:19 PM Revision cbbae12a (git): Keep track of local types in the context
-
10:19 PM Revision e98d2c5e (git): Add ctcx_stack_push_local()
-
10:19 PM Revision ad5cc39d (git): update deps
-
10:19 PM Revision 681e76c6 (git): Fix case
-
10:19 PM Revision 4faaa8e5 (git): Collect statistics about binding allocations / local variable set
- This commit collects statistics about how many binding objects are
allocated as well as the number of local variables set on bindings.
Statistics are output along with other YJIT stats. Here is an example
of the output:
```
***YJIT: Pr... -
10:19 PM Revision 0881e018 (git): Add comments and asserts for clarity
- 10:19 PM Revision d1e9e456 (git): Update yjit_asm.c
-
10:19 PM Revision 3d53ee17 (git): Fill uninitialized memory with int3
-
10:19 PM Revision 131fc9c0 (git): Readd const arguments
-
10:19 PM Revision 5b613938 (git): Fix branch rewrite issue
- 10:19 PM Revision 2b522ad9 (git): Update yjit_core.c
-
10:19 PM Revision 21a63450 (git): YJIT: adjust branch shape properly when target already exists
- The old code decides branch->shape based on the write position of the
native code block, which is unsound in case the block already exists
and no new code is written to the write position.
Make this decision with the start address of th... -
10:19 PM Revision e56bd95c (git): Rename first call => threshold one
-
10:19 PM Revision c299112f (git): use ctx_stack_push_self()
-
10:19 PM Revision 215a2f40 (git): Fix type_diff logic after Alan pointed out errors
-
10:19 PM Revision aee44e4f (git): Part 1 of improved type tracking logic
-
10:19 PM Revision e47dd8bb (git): WIP
-
10:19 PM Revision c5f31264 (git): Commit WIP
-
10:19 PM Revision ac1aa84c (git): First sketch at temp type mapping
-
10:19 PM Revision cb46a17c (git): Log code size in bytes instead of MiB
-
10:19 PM Revision 983bcd5a (git): Fix improper use of st_foreach_with_replace
- Replacing the key was only okay if the new key hashes to the same thing
as the old key. That doesn't hold for YJIT's table when the keys move. -
10:19 PM Revision d03b7f77 (git): Fix GCC warnings
- Mostly unused and uninitialized warnings here and there
-
10:19 PM Revision 9911f486 (git): Stop all other ractors when patching machine code
-
10:19 PM Revision 784ef4cb (git): Add a CI check for --yjit-call-threshold=1
- Mostly copied from mjit.yml. Thank you Kokubun-san!
-
10:19 PM Revision 2b09e2fe (git): Add a comment
-
10:19 PM Revision 5ec94e0d (git): Fix issue with version matching logic
-
10:19 PM Revision fe784d14 (git): Track interpreter return as an exit reason for leave instr
-
10:19 PM Revision 0e5c3d66 (git): Implement opt_gt
- 10:19 PM Revision 98e93d6a (git): Update yjit.md
-
10:19 PM Revision 63f875b8 (git): Factor out protected callee guard, check for private callees
- We didn't need the private check before because we were lifting from the
interpreter's cache, and the interpreter only caches when visibility
checks go through. -
10:19 PM Revision 8173d540 (git): Factor out jit_jump_to_next_insn
-
10:19 PM Revision fbb514f6 (git): Introduce yjit_guard_known_klass()
-
10:19 PM Revision a8f7eb2f (git): Polymorphic opt_send_without_block
-
10:19 PM Revision ec1cbbb0 (git): Get rid of dependency on rb_call_cache
-
10:19 PM Revision 0cd9120f (git): YJIT: hash specialization for opt_aref
- Make it lazy and add a hash specialization in addition to the array
specialization. -
10:19 PM Revision db53deca (git): Exit reason breakdown for opt_aref
-
10:19 PM Revision c04e5188 (git): YJIT: use a flat array for finding codegen functions
- Simpler and faster.
-
10:19 PM Revision 927ead9f (git): YJIT: unify exits. Patch iseqs only when necessary
- * YJIT: unify exits. Patch iseqs only when necessary
This fixes the gotcha that returning YJIT_CANT_COPMILE for an
instruction at entry position leading to infinite loop.
Also, iseq patching is only done only when necessary, which shou... -
10:19 PM Revision f505446d (git): Yjit: rename context struct
- 10:19 PM Revision 4b80358e (git): Fix condition in cb_align_pos which should return early when aligned
- 10:19 PM Revision aba40479 (git): Update yjit.md
- Fix a typo in the bibtex.
-
10:19 PM Revision f4c04a95 (git): Tweak include order in yjit_core.c
- This is playing it safe. Ruby headers rely on some macros generated by
autoconf that affect what system headers behave. We should take care to
bring in those configs before including systme headers to stay
consistent with the rest of Ruby. -
10:19 PM Revision 5d834bcf (git): YJIT: lazy polymorphic getinstancevariable
- Lazily compile out a chain of checks for different known classes and
whether `self` embeds its ivars or not.
* Remove trailing whitespaces
* Get proper addresss in Capstone disassembly
* Lowercase address in Capstone disassembly
Caps... -
10:19 PM Revision 439db7b8 (git): Add metric for average # of insns spent in yjit before exiting
-
10:19 PM Revision cee597bd (git): Include ruby/ruby.h before vm_core.h
- This is how vm.c does it, and if we don't follow it in yjit
compilation units, rb_vm_t would have a conflicting size. -
10:19 PM Revision fe3bd570 (git): Remove trailing whitespaces
-
10:19 PM Revision cf011b66 (git): Check for null
- Sometimes you bop before you init, you know?
-
10:19 PM Revision c6156e51 (git): Fix trailing spaces
- 10:19 PM Revision 4ccfbfe6 (git): Update yjit.md
-
10:19 PM Revision c15a577e (git): Make Blocks depend on BOPS
- When a BOP is redefined, the BOP redefinition callback will invalidate
any blocks that depend on BOPS. This allows us to eliminate runtime
checks for BOP redefinition. - 10:19 PM Revision 46874b8f (git): Update yjit.md
- 10:19 PM Revision c56243da (git): Update yjit.md
- 10:19 PM Revision 4e2eb769 (git): Yet Another Ruby JIT!
- Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
-
10:19 PM Revision 7f7e79d8 (git): YJIT: handle when all counters are zero in printout code
- Also filter with not equal to zero instead of greater than zero, in case
there is memory corruption and counters are negative.
Fixes Shopify/ruby#70 - 10:19 PM Revision eaab6605 (git): Update ujit_core.h
- 10:19 PM Revision 0a160407 (git): Update ujit_core.h
- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
-
10:19 PM Revision 7f4000b1 (git): Machinery to implement deferred compilation
-
10:19 PM Revision f8b4082b (git): YJIT: fix leak, remove unused field on block_t
- This field was never used and is now covered by jit_mov_gc_ptr.
-
10:19 PM Revision 7de8ce4e (git): YJIT: Use 2D array to group block versions
- For deferred compilation, we sometimes want to care about the order of
the block versions. Use an array instead of a linked list to do that. -
10:19 PM Revision d6d58795 (git): Rename test files
- 10:19 PM Revision 4a99990b (git): Update yjit.md
- 10:19 PM Revision e4e453c7 (git): Update yjit.md
- 10:19 PM Revision 7b38bf18 (git): Update yjit.md
- 10:19 PM Revision f2b170b0 (git): Update and rename ujit.md to yjit.md
-
10:19 PM Revision abc016ad (git): WIP refactor block lists to use darray
- 10:19 PM Revision 5c497dfd (git): Update ujit.md
-
10:19 PM Revision eccf4bcd (git): uJIT: support 64 bit operands for TEST. Use it to check for zero
- It's one byte shorter than `cmp reg64, 0`. To illustrate:
```
48 83 f9 00 cmp rcx, 0x0
48 85 c9 test rcx, rcx
``` -
10:19 PM Revision 8302eb57 (git): Add UJIT.reset_stats!
- To allow analyzing sections of the application.
-
10:19 PM Revision 699bf974 (git): uJIT: Add exit counters for leave and refactor stats printout code
- Filter out counters that are zero and make it easier to have multiple
printout groups.
On `railsbench`:
```
opt_send_without_block exit reasons:
se_finish_frame 184809 (100.0%)
``` -
10:19 PM Revision 8a9ee00a (git): uJIT: add guards for protected opt_send_without_block calls
- These account for about 12% of the time when we were bailing from calls
in railsbench. `ratio_in_ujit` went up 0.1% with this change. -
10:19 PM Revision b3b3a8c6 (git): At jit_at_current_insn, jit_peek_at_stack functions
-
10:19 PM Revision 316f757c (git): Runtime counters for bailing from opt_send_without_block
- This allows counting things in generated code such as side exits or
different reasons for failing to compile. Runtime counters are exposed
to Ruby as `UJIT.runtime_stats` for ease of reporting and analysis. -
10:19 PM Revision 2e8db8c3 (git): Update ec->cfp->pc when hitting a stub.
-
10:19 PM Revision 824fea68 (git): Thread EC through jit state. Add codegen status enum.
- 10:19 PM Revision f63cdae3 (git): Support memory operands to pop
- 10:19 PM Revision 831ac473 (git): Update ujit.md
- 10:19 PM Revision 6f437d5b (git): Update ujit.md
- 10:19 PM Revision 0888d9c9 (git): Update ujit.md
- 10:19 PM Revision 3a365afa (git): Support memory operands to push
-
10:19 PM Revision 799d248e (git): Fix jmp encoding. Rename conditional jumps jxx() to jxx_label()
-
10:19 PM Revision 57977ba3 (git): uJIT: Implement opt_getinlinecache
- * ujit: implement opt_getinlinecache
Aggressively bet that writes to constants don't happen and invalidate
all opt_getinlinecache blocks on any and all constant writes.
Use alignment padding on block_t to track this assumption. No chan... -
10:19 PM Revision f93f3d6a (git): Implement support for variadic C functions
- 10:19 PM Revision 8e5222c8 (git): Update ujit.md
- 10:19 PM Revision 028e017e (git): Update ujit.md
- 10:19 PM Revision 47900e10 (git): Update ujit.md
- 10:19 PM Revision 6100b52e (git): Update ujit.md
- 10:19 PM Revision 0d6ed312 (git): Update ujit_iface.c
- 10:19 PM Revision 2a997430 (git): Update ujit_iface.c
-
10:19 PM Revision 0710bec0 (git): Implement --ujit-call-threshold
-
10:19 PM Revision 58657b33 (git): Remove dead code
-
10:19 PM Revision 9ce27716 (git): darray: fix strict aliasing issue
-
10:19 PM Revision 0658ab73 (git): Use rb_darray_make in ujit
-
10:19 PM Revision 2240932b (git): Add rb_darray_make
-
10:19 PM Revision 47e05fca (git): darray: fix buffer size calculation for element with strict alignment
-
10:19 PM Revision fff6d642 (git): Added ujit_save_regs() and ujit_load_regs() helper functions
-
10:19 PM Revision 1a937dd1 (git): Use darray for incoming branches
-
10:19 PM Revision df451752 (git): Free your memories!
-
10:19 PM Revision b87962eb (git): Stop using UJIT.install_entry in btest
- CI runs on some platforms uJIT doesn't support. They don't have
UJIT.install_entry. Maybe we want something like `install_entry_if_possible`. -
10:19 PM Revision 48b8c510 (git): Mark and update object references in generated code
- Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
-
10:19 PM Revision 064e3450 (git): Check for ::Array, not T_ARRAY in opt_aref
- 10:19 PM Revision 9d62ab30 (git): Update ujit.md
- 10:19 PM Revision 7fbbd0c6 (git): Update ujit.md
- 10:19 PM Revision 2babfeb8 (git): Update ujit.md
- 10:19 PM Revision 701a802a (git): Create ujit.md
-
10:19 PM Revision 1279236f (git): Fix opt_aref SNAFU
-
10:19 PM Revision faabe2b0 (git): Ujit bug fixes
- * uJIT: don't compile tailcalls
* Don't compile calls to protected methods
We need to generate extra code to check whether the call goes through if
we want to support these.
* Fix copy pasta
* Update blockids in branches
* Update de... -
10:19 PM Revision 15b088bd (git): ujit.h instead in the rest of Ruby
- ujit_iface.h is meant for uJIT internal use only.
-
10:19 PM Revision 03af6ad9 (git): Should fix builds without mjit support
-
10:19 PM Revision 1e573775 (git): Stop printing when invalidating uJIT blocks
-
10:19 PM Revision d3c9e311 (git): Fix empty struct
-
10:19 PM Revision 73bcd263 (git): Fix build on MSVC
- Use compiler protable way of delcaring function as maybe unused.
-
10:19 PM Revision 0ebb072f (git): Add regression test for extended table bounds check
-
10:19 PM Revision 980aa329 (git): fix: ujit getinstancevariable code checks ivar extended table size
- Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> -
10:19 PM Revision ddd1a5ce (git): Add op-not-redefined check to opt_aref
-
10:19 PM Revision 48736599 (git): Fix compiled iseq count stat
-
10:19 PM Revision c02517ba (git): Tie lifetime of uJIT blocks to iseqs
- * Tie lifetime of uJIT blocks to iseqs
Blocks weren't being freed when iseqs are collected.
* Add rb_dary. Use it for method dependency table
* Keep track of blocks per iseq
Remove global version_tbl
* Block version bookkeeping... -
10:19 PM Revision 148ab79c (git): oops
-
10:19 PM Revision 0b8473c4 (git): Fix pedantic returning void
-
10:19 PM Revision d192b149 (git): Added more tests to `make btest`
-
10:19 PM Revision 8ed77f96 (git): Add another torture test to `make btest`
-
10:19 PM Revision c2f6552a (git): Copy right number of bytes in add_incoming
-
10:19 PM Revision e7d20e66 (git): Free block->incoming in invalidate_block_version()
-
10:19 PM Revision a7c1bc61 (git): Add missing VM_CHECK_INTS() for correctness
-
10:19 PM Revision faafe716 (git): Add jit_print_loc() for debugging, based on Alan Wu's snippet
-
10:19 PM Revision 7a75e9bb (git): ujit_asm: if mmap() fails with the address hint, try without
- valgrind doesn't seem to support the address hint, and so the fallback
to using NULL will allow valgrind to run. -
10:19 PM Revision 05d36f31 (git): Fix bug in putobject found by @tenderlove
-
10:19 PM Revision 2eac297f (git): Optimize gen_dup
-
10:19 PM Revision 3d026adb (git): Add failing test identified by Aaron Patterson
-
10:19 PM Revision a267f455 (git): Remove superfluous instruction in opt_send_without_block
-
10:19 PM Revision 75b62377 (git): Fix jit_return bug, return address on wrong frame
-
10:19 PM Revision c1c5fd5a (git): Fix REG_SP writeback bug in gen_exit
-
10:19 PM Revision f9e16b0e (git): Fix context push/pop in Ruby-to-Ruby calls
-
10:19 PM Revision 69d27e3f (git): fix: allow make to complete when DEBUG_RUBY is not set
-
10:19 PM Revision 99d285a7 (git): fix: ensure add_incoming allocates the proper length memory
- Without this fix, valgrind reports for zero-length blocks:
==149294== Invalid write of size 4
==149294== at 0x408121: add_incoming (ujit_core.c:173)
==149294== by 0x408121: gen_block_version (ujit_core.c:286)
==149294== by 0x40... -
10:19 PM Revision a8827e5c (git): Added failing test to `make btest`
-
10:19 PM Revision 9d8cc01b (git): WIP JIT-to-JIT returns
-
10:19 PM Revision 6341fc21 (git): Don't increment instr/exit counters if stats not requested
-
10:19 PM Revision 21c4dd03 (git): Fix bug unnecessarily causing version limit hit
-
10:19 PM Revision d2ad0a11 (git): Added synthetic torture test with 30K tiny methods
-
10:19 PM Revision 8357e8e5 (git): Fixed two bugs in JIT-to-JIT calls (thanks Alan!)
-
10:19 PM Revision 0f53c216 (git): Pop stack operands in opt_aref
-
10:19 PM Revision a3916841 (git): Check for iseq wrapper instead of iseq imemo
-
10:19 PM Revision 2fcb17d6 (git): Make UJIT.disasm accept Procs
-
10:19 PM Revision ab576030 (git): add a callback for when method cache changes
-
10:19 PM Revision d2d564be (git): Moved ujit code invalidation test into bootstraptest
-
10:19 PM Revision 56ce40e8 (git): Only compile iseqs with simple parameters. Enable get_local_wc1
-
10:19 PM Revision e85e0e2f (git): Commit WIP setlocal_WC_1 implementation
-
10:19 PM Revision 439e1089 (git): Implement opt_le, opt_ge in ujit
-
10:19 PM Revision 020f7450 (git): Fix overflow check in ujit
-
10:19 PM Revision 7f73948c (git): Add code side info to --ujit-stats
- shopify/ruby#23
-
10:19 PM Revision c734405c (git): Add stats for number of ujit entry points installed
- shopify/ruby#23
-
10:19 PM Revision 6a291314 (git): Implement Ruby-to-Ruby calls in ujit (opt_send_without_block)
-
10:19 PM Revision 27a44436 (git): Add total exit count to stats
-
10:19 PM Revision 94532676 (git): add bop to redefinition callback
-
10:19 PM Revision 53bd13ed (git): Implement opt_and in ujit
-
10:19 PM Revision 863ff149 (git): Add a callback in to microjit when a BOP is redefined
- This commit adds a callback `rb_ujit_bop_redefined` when a basic
operation is redefined. -
10:19 PM Revision 05c72d40 (git): Alan & Max at Tanagra
-
10:19 PM Revision a6d0c61c (git): Add percentages to exit op counts in --ujit-stats
-
10:19 PM Revision 2e561ff2 (git): Restore interpreter regs in ujit hook. Implement leave bytecode.
-
10:19 PM Revision 3c7251b4 (git): Tally instructions when taking side exists for --ujit-stats
- shopify/ruby#29
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> -
10:19 PM Revision 09479c33 (git): Implement block version limit
-
10:19 PM Revision 81c57ab9 (git): Reduce size of ctx_t
-
10:19 PM Revision a14015e9 (git): Report unknown --ujit-* options
-
10:19 PM Revision b7f93e81 (git): Implement --ujit-stats and instructoin counting
- VM and ujit instruction counting in debug builds.
shopify/ruby#19 -
10:19 PM Revision 36232a48 (git): Set T_FIXNUM type tags in opt_plus, opt_minus
-
10:19 PM Revision c61238a2 (git): Optimize putobject codegen
-
10:19 PM Revision e7909467 (git): Eliminate type checks in opt_lt
-
10:19 PM Revision 63e85de3 (git): Fix bug, block added with wrong blockid.
-
10:19 PM Revision b0b1bc16 (git): Tweak ujit disasm output
-
10:19 PM Revision 4f47181b (git): Keep track of multiple versions per blockid
-
10:19 PM Revision 9def269b (git): Fix issue with block address accessor. Print absolute addresses.
-
10:19 PM Revision 79d6e961 (git): Make find_block_version() do list search
-
10:19 PM Revision 8a61e848 (git): Minor changes to disasm output. Fix GCC warning.
-
10:19 PM Revision 25234f8a (git): Update dependencies
-
10:19 PM Revision 042c6aab (git): Fix cast warning
-
10:19 PM Revision f68ddaa5 (git): Declare instead of define data varaibles in header
-
10:19 PM Revision 738160db (git): Write ctx_diff() function to compate ctx_t objects
-
10:19 PM Revision 7efde1bf (git): conditionally add libcapstone
-
10:19 PM Revision e427fdff (git): Directly link libcapstone for easier development
- This lets us use libcapstone directly from miniruby so we don't need a
Ruby Gem to to dev work.
Example usage:
```ruby
def foo(x)
if x < 1
"wow"
else
"neat"
end
end
iseq = RubyVM::InstructionSequence.of(method(:foo))
put... -
10:19 PM Revision dea4db16 (git): Add support for multiple versions per block
-
10:19 PM Revision d528cf4f (git): Added comments. Fixed compiler warning.
-
10:19 PM Revision 11512a80 (git): add a helper script for ujit disasm
-
10:19 PM Revision d9176d9f (git): Expose methods for inspecting Micro JIT code blocks
- This commit adds a module `UJIT`. The module allows you to insert the
initial Micro JIT instruction in to an arbitrary iseq like this:
```ruby
def foo(x)
if x < 1
"less than one"
else
"something else"
end
end
iseq = Ruby... -
10:19 PM Revision ce233c95 (git): Remove assert that doesn't compile
-
10:19 PM Revision 0a424280 (git): Implement branchif in ujit
-
10:19 PM Revision 331f662d (git): Update dependencies
-
10:19 PM Revision 0a6e824a (git): Prototype type-specialization for temp values
-
10:19 PM Revision cf4021ca (git): Take VM lock in branch_stub_hit(), fix ractor deadlock.
-
10:19 PM Revision dde69ab5 (git): Fix ujit block hash table bug
-
10:19 PM Revision 136bf983 (git): Fix bug with ujit code invalidation
-
10:19 PM Revision 37ad3746 (git): Added gen_direct_jump() for unary branches
-
10:19 PM Revision 187435c1 (git): Complete refactoring to eliminate recursion in ujit's compilation
-
10:19 PM Revision 02a97004 (git): End current block after opt_send_without_block
-
10:19 PM Revision 79331368 (git): Added block end index
-
10:19 PM Revision 59eb98fb (git): Fix ujit cc/cme invalidation code for opt_send_without_block
-
10:19 PM Revision 4a571076 (git): Sketch code to invalidate basic blocks. Rename version_t to block_t.
-
10:19 PM Revision 92e9b245 (git): Keep track of incoming branches in ujit
-
10:19 PM Revision 2cf32e55 (git): Refactor ujit logic for generating iseq entry points
-
10:19 PM Revision ef08af93 (git): Progress on code invalidation
-
10:19 PM Revision 3a74011f (git): Introduce version_t struct. Will be needed for code invalidation.
-
10:19 PM Revision a2510590 (git): Fix hash map key issue
-
10:19 PM Revision 7e60ce35 (git): Fix uint cast bug caught by Alan
-
10:19 PM Revision 2cc0db12 (git): Refactorings in ujit. Implement Ruby jump instruction.
-
10:19 PM Revision 1744c155 (git): Avoid generating redundant interpreter exit code after branches
-
10:19 PM Revision 97cffcf7 (git): Fix sneaky ujit side-exit bug. Reduce ujit call threshold to 1.
-
10:19 PM Revision 542f2ba0 (git): Use a versioning context when compiling blocks
-
10:19 PM Revision df16bf97 (git): Split out context object into jitstate_t and ctx_t
-
10:19 PM Revision 5e39d83f (git): Split out compile_entry() from compile_block()
-
10:19 PM Revision 4592ef9d (git): Fixed one bug in compile_block.
-
10:19 PM Revision e9344ae4 (git): Stub logic working for fib test, but still crashing in other cases
-
10:19 PM Revision 7d7e58d3 (git): Implement branch stub logic
-
10:19 PM Revision 40b70ef7 (git): WIP branch generation code
-
10:19 PM Revision bd7cc9ed (git): Thread insn_idx through context object
-
10:19 PM Revision 868a6809 (git): Add sign-extended mode for test() instruction
-
10:19 PM Revision 8ae354e9 (git): Implemented opt_lt. Prelude to branch instructions.
-
10:19 PM Revision 20f5b742 (git): Start implementing BBV primitives
-
10:19 PM Revision f7717b1d (git): Start refactoring JIT engine
-
10:19 PM Revision f761e9ee (git): Move code into ujit_iface.c
-
10:19 PM Revision e4c65ec4 (git): Refactor uJIT code into more files for readability
-
10:19 PM Revision 7be67a6c (git): Implemented opt_plus in MicroJIT
-
10:19 PM Revision ec423781 (git): Rename function and variable
-
10:19 PM Revision fa04478e (git): MicroJIT: coalesce heap pointer check on self
-
10:19 PM Revision 4d964e25 (git): Implemented setinstancevariable
-
10:19 PM Revision e2e70f69 (git): Add comment wrt getivar and allocators
-
10:19 PM Revision be91995a (git): Remove T_OBJECT runtime check
- If the cached class uses the default allocator, then all instances
coming from the class should be T_OBJECT instances. Meaning we can just
check the allocator function at compile time, then skip the runtime
T_OBJECT check -
10:19 PM Revision e17053c7 (git): Basic implementation of getivar for MicroJIT
-
10:19 PM Revision 1cd4c8b2 (git): Deoptimize on side-exit
-
10:19 PM Revision 64072dd3 (git): Rename variables for clarity
-
10:19 PM Revision b75169a4 (git): Fix typo
-
10:19 PM Revision 6a9a516d (git): Print to stderr in ujit_utils.c
-
10:19 PM Revision 50d8c3d4 (git): MicroJIT: Count number of compiled instructions better
-
10:19 PM Revision ba92d40d (git): Fix warning
-
10:19 PM Revision 68b0f69a (git): Make a bunch of functions compilation unit local
-
10:19 PM Revision 5f9beb9b (git): Include disassembly in MicroJIT scraper output
-
10:19 PM Revision 188c5442 (git): MicroJIT: avoid having to invalidate running output code
-
10:19 PM Revision 9ce9f613 (git): Update comment for `ujit_compile_insn`
-
10:19 PM Revision c378c7a7 (git): MicroJIT: generate less code for CFUNCs
- Added UJIT_CHECK_MODE. Set to 1 to double check method dispatch in
generated code.
It's surprising to me that we need to watch both cc and cme. There might
be opportunities to simplify there. -
10:19 PM Revision 0c52371c (git): Don't create a stack frame for Hash#key?
-
10:19 PM Revision 5413d091 (git): Fix GCC warning
-
10:19 PM Revision 81e70918 (git): Added stack overflow check to MicroJIT CFUNC calls
-
10:19 PM Revision 8b8470d0 (git): Added RUBY_VM_CHECK_INTS to CFUNC calls
-
10:19 PM Revision 5b6a963b (git): Fix compiler warnings
-
10:19 PM Revision b761f5c9 (git): Implemented mechanism for rel32 call
-
10:19 PM Revision 498fe0fb (git): Move MicroJIT compilation threshold into MicroJIT's header
-
10:19 PM Revision 809ecfb1 (git): Fixed two CFUNC call bugs thanks to Alan & Aaron!
-
10:19 PM Revision c2cb6a6f (git): MicroJIT: Read pointer to call cache from call data
- The call cache changes when the call site becomes polymophic and can
result in the generated code falsely assuming cd->cc->cme is not NULL.
Here is a crasher:
def body(thing)
thing.strip
end
str = ""
10.times { b... -
10:19 PM Revision d49edada (git): Fix MicroJIT argument copying for CFUNC calls
-
10:19 PM Revision 37e4350e (git): Fixed two issues with MicroJIT CFUNC calls
-
10:19 PM Revision 35c07684 (git): First pass at CFUNC calls complete. Not yet functional.
-
10:19 PM Revision ff73762b (git): Refactor ujit, define named register constants, code cleanup
-
10:19 PM Revision 6ca360aa (git): MicroJIT: switch to example that passes ec as second argument
- opt_send_without_block needs it. Ideally we would use this example
only when an instruction in the compiled sequence needs `ec`. We can
worry about that later. -
10:19 PM Revision 1ef2887b (git): MicroJIT: Use R9 in generated code for Ruby stack pointer
-
10:19 PM Revision 11c1daea (git): Add to the MicroJIT scraper an example that passes ec
-
10:19 PM Revision 008551de (git): Commit before merge.
-
10:19 PM Revision a88d6207 (git): Updated C function call sketch
-
10:19 PM Revision 770f3929 (git): Remove comment. Commit before rebase.
-
10:19 PM Revision 595e3a94 (git): Fix MicroJIT logic in MJIT exec
-
10:19 PM Revision 6f4d17d6 (git): Never compile with MicroJIT when MJIT is enabled
- There is a crash in there that we don't want to worry about for now.
-
10:19 PM Revision 12ba0c08 (git): Declare extern with RUBY_EXTERN for MJIT
-
10:19 PM Revision d9ab1e95 (git): Update dependencies
-
10:19 PM Revision 93f6ac39 (git): MicroJIT: Don't compile trace instructions
-
10:19 PM Revision ba45aff1 (git): Don't call MicroJIT from MJIT output
-
10:19 PM Revision a245db8d (git): Export MicroJIT global used in MJIT
-
10:19 PM Revision e677ca4a (git): Fixed is-object check in opt_send_without_block
-
10:19 PM Revision 7c9fdb5d (git): Check receiver type and klass in MicroJIT
-
10:19 PM Revision 76503528 (git): Take the VM lock when recompiling
-
10:19 PM Revision 8bda11f6 (git): MicroJIT: compile after ten calls
-
10:19 PM Revision ef9eb83c (git): Commit before merge
-
10:19 PM Revision 2cb376a5 (git): Started refactoring opt_send_without_block with codegen-time checks
-
10:19 PM Revision 32a66b99 (git): Add system to implement codegen preconditions in JIT
-
10:19 PM Revision 6f81bd2c (git): Added print_ptr() util function for debugging
-
10:19 PM Revision e5751768 (git): Added int3() to x86 asm
-
10:19 PM Revision beab6444 (git): Anonymous union is a C11 feature unavailable to us
-
10:19 PM Revision e8408359 (git): oops Direct threading should be default
-
10:19 PM Revision bab308b9 (git): Explicitly convert function pointer to void pointer
-
10:19 PM Revision 7662653b (git): Fix compilation for OPT_THREADED_CODE=2
-
10:19 PM Revision edede773 (git): Explicitly convert function pointer to void pointer
-
10:19 PM Revision b8dff14a (git): _GNU_SOURCE has to be before includes
-
10:19 PM Revision 3c8a9da7 (git): Bump executable memory allocation size
- We run out it on CI in test-all.
-
10:19 PM Revision a132d697 (git): Get access to MAP_ANONYMOUS in pedantic compile mode
-
10:19 PM Revision df15dfa6 (git): Don't put MicroJIT status in RUBY_DESCRIPTION
- That messes with tests too much.
-
10:19 PM Revision 2790428e (git): Zero sized array are not standard C
-
10:19 PM Revision 7e400ddc (git): Try to fix Windows build
-
10:19 PM Revision 805f4963 (git): Fix MicroJIT's putobject against GC copmaction
-
10:19 PM Revision e9ecf80d (git): Respect redefinition in MicroJIT's opt_minus
-
10:19 PM Revision f500c1e3 (git): Update dependency
-
10:19 PM Revision 040cfdb1 (git): Small build fixes
-
10:19 PM Revision 7d1546ec (git): Try to fix Windows build
-
10:19 PM Revision a3e58f4d (git): Compile with MicroJIT disabled when scrape fails
- This is just so we can build successfully on -O0 and other cases that
are not supported by the code scraper. -
10:19 PM Revision 726bdd4d (git): Show whether MicroJIT is enabled in the version string
-
10:19 PM Revision 12283c58 (git): Removed inc/dec instructions because usage not recommended.
-
10:19 PM Revision 5f4e30be (git): Run ruby tool/update-deps --fix
-
10:19 PM Revision 7fbf6d40 (git): Move registers into header and make them static
- We were leaking these as global symbols and were having linking errors
with Clang 12. -
10:19 PM Revision e3cd43e2 (git): Implemented opt_minus in MicroJIT
-
10:19 PM Revision 4e9a62c9 (git): Comment out jnl to fix Linux build again
-
10:19 PM Revision 1159034c (git): Fix compilation for -DUSE_INSNS_COUNTER
-
10:19 PM Revision 851ea463 (git): Added member_opnd() convenience macro
-
10:19 PM Revision d7f01266 (git): Partially implement opt_send_without_block
- It will read and check the inline cache now, but we need to actually
call the method.
Co-Authored-By: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> -
10:19 PM Revision e99e3daa (git): Added jmp_ptr() to ujit_asm.h
-
10:19 PM Revision a8d78488 (git): Fix mistake in ujit command line parsing
-
10:19 PM Revision 2c866ce8 (git): Check if outlined code block has enough space too
-
10:19 PM Revision e8c914c2 (git): Implement the --disable-ujit command line option
-
10:19 PM Revision f3c961f2 (git): endbr64 is fine
-
10:19 PM Revision e0c5d4ec (git): Implemented side-exits to interpreter. setlocal_WC_0
-
10:19 PM Revision 4d72b9a2 (git): Start implementing setlocal_wc0
-
10:19 PM Revision 5ed7e593 (git): Comment out jnl to avoid conflict with system header
- This is specific to Linux
-
10:19 PM Revision 453218b2 (git): Preliminary GNU/Linux support for code scraper
- Let's see if this works on CI
-
10:19 PM Revision 3d87eadf (git): Refactor ujit_examples.h generator. Remove dwarfdump dependency
-
10:19 PM Revision 2eaf55fc (git): Update PC in memory when exiting jitted code
- Without this, the allocation tracker was inaccurate and
was causing a failure in `test/objspace/test_objspace.rb`. -
10:19 PM Revision 86c438d1 (git): Revert "Add workaround for inserting into addr2insn mapping"
- This reverts commit 6b765b7ca0dad82ffbdeea76c63a0cac5fdc4bfd.
It made things much slower and didn't fix the crash. -
10:19 PM Revision 265c5ca8 (git): Avoid triggering GC while translating threaded code
-
10:19 PM Revision 5bcba2a5 (git): Add workaround for inserting into addr2insn mapping
-
10:19 PM Revision 38601da2 (git): Added 8-bit and 16-bit general-purpose registers, more tests.
-
10:19 PM Revision 25acbaf4 (git): Don't assume srcdir is cwd
-
10:19 PM Revision 304adba7 (git): Add location hint to code block mmap call
-
10:19 PM Revision c20066b2 (git): Added method to align code block write position
-
10:19 PM Revision 30c4237b (git): Fixed bug with ctx_stack_pop. Implemented dup bytecode.
-
10:19 PM Revision d1c9ca86 (git): Port print_int, movsx. Implement putself.
-
10:19 PM Revision b8a3f2ed (git): Add function to print strings from generated code
-
10:19 PM Revision 77cfdb24 (git): Implemented delayed stack pointer adjustment optimization
-
10:19 PM Revision 038f5d96 (git): Avoid recompiling overlapping instruction sequences in ujit
-
10:19 PM Revision 1665bbac (git): Fix typo
-
10:19 PM Revision 4d959a25 (git): Fix dependency for ujit_examples.h
- Once this works on GNU/Linux this could be done semi automatically.
-
10:19 PM Revision 132f7e11 (git): Compile putnil
-
10:19 PM Revision 8a5ced8e (git): Chain compilation of adjacent instructions
-
10:19 PM Revision 7eb192d6 (git): Testing lea instruction properly
-
10:19 PM Revision 16ddb422 (git): Complete refactoring to codegen functions
-
10:19 PM Revision b0b7d0a8 (git): Refactor MicroJIT codegen to use hash table of codegen functions
-
10:19 PM Revision 2811792f (git): Compiling getlocal_WC_0
-
10:19 PM Revision 2e319492 (git): Ported xor and cmovcc instructions
-
10:19 PM Revision 09025545 (git): Ported neg, and, or instructions
-
10:19 PM Revision 37395888 (git): Remove PC argument from ujit instructions
-
10:19 PM Revision ca47899c (git): Small refactorings in ujit_compile.c
-
10:19 PM Revision 1879a123 (git): Added cmp, not. Generate code for nop instruction.
-
10:19 PM Revision 7d0df31d (git): Ported inc/dec instructions
-
10:19 PM Revision 26fecc72 (git): Removed native_pop_code, ported call with label
-
10:19 PM Revision 4929ba0a (git): Generate multiple copies of native code for `pop`
- Insert generated addresses into st_table for mapping native code
addresses back to info about VM instructions. Export `encoded_insn_data`
to do this. Also some style fixes. -
10:19 PM Revision 6a12fb20 (git): Ported label linking and conditional jumps
-
10:19 PM Revision 1c8fb90f (git): Add new files, ujit_compile.c, ujit_compile.h
-
10:19 PM Revision 566d4abe (git): Added shift instructions
-
10:19 PM Revision fe1cd076 (git): Added test for lea
-
10:19 PM Revision 251531bd (git): Reimplement Alan's pop instruction with the new assembler
-
10:19 PM Revision efcaa49a (git): Added sub instruction, 32-bit registers, more tests
-
10:19 PM Revision 1392a6f2 (git): Added jmp R/M instruction
-
10:19 PM Revision a3b411b9 (git): add and mov instruction encoding ported and tested
-
10:19 PM Revision 8f40a626 (git): Progress on x86 assembler. Encode a few simple instructions.
-
10:19 PM Revision 5cf7ccd2 (git): Started porting instruction encoding
-
10:19 PM Revision 0a5dcc05 (git): Progress on porting x86 assembler for MicroJIT
-
10:19 PM Revision 07dd5f22 (git): Scraper touch-ups
- - Support older Ruby versions
- Catch rip-relative jmp. Happens in -O0 -
10:19 PM Revision 410323bd (git): Try to convince get better code out of Clang
-
10:19 PM Revision 16c5ce86 (git): Yeah, this actually works!
-
10:19 PM Revision cec19769 (git): Add example handler for ujit and scrape it from vm.o
-
10:06 PM Revision b0c3f18e (git): Print errno when mprotect fails
- Trying to figure out the problem on s390x.
-
08:32 PM Bug #17146: Queue operations are allowed after it is frozen
- > I think there is only one rational answer here: Queue#freeze should prevent mutations to the Queue just like for Array/Hash/etc.
I agree with this for consistency reasons. Anyone who is freezing a queue and expecting it to work has ... -
05:58 PM Bug #17146: Queue operations are allowed after it is frozen
- Indeed, sorry, I missed that somehow.
-
04:17 PM Bug #17146: Queue operations are allowed after it is frozen
- Eregon (Benoit Daloze) wrote in #note-9:
> OK, that `no benefit to changing the behavior.` was not reported here but I guess it's in the dev meeting log.
ko1 (Koichi Sasada) wrote in #note-5:
> ...
-
03:55 PM Bug #17146: Queue operations are allowed after it is frozen
- (an alternative would be to have some other way to freeze the Queue for the purpose of `deep_freeze`/`Immutable`, but I see no value to that, the way is called `freeze` and it already works for most objects).
-
03:53 PM Bug #17146: Queue operations are allowed after it is frozen
- OK, that `no benefit to changing the behavior.` was not reported here but I guess it's in the dev meeting log.
Benefit is consistency and being able to design deep freezing/immutable without making an exception for Queue.
Every time ... -
02:44 PM Bug #17146: Queue operations are allowed after it is frozen
- Eregon (Benoit Daloze) wrote in #note-7:
> Why was this closed?
Because there was no feedback after the last message from @ko1, and it was decided at the developer meeting last year that there was no benefit to changing the behavior.... -
02:23 PM Bug #17146 (Open): Queue operations are allowed after it is frozen
- Why was this closed?
I think there is only one rational answer here:
`Queue#freeze` should prevent mutations to the Queue just like for Array/Hash/etc.
There is no other "nested object" (i.e., the queue contents) exposed to user c... -
07:57 PM Revision 030b1892 (git): Update to ruby/spec@254c380
- 07:43 PM Revision 500ba248 (git): * 2021-10-21 [ci skip]
-
07:43 PM Revision 6aa1acb0 (git): Add extra files from ruby/spec which were skipped due to .gitignore
-
07:41 PM Revision a6c6eef0 (git): Update to ruby/spec@d6921ef
-
07:41 PM Revision 207a5a5b (git): Update to ruby/mspec@08e1275
-
04:02 PM Bug #18257: rb_mRubyVMFrozenCore is broken by GC run
- ~~~
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7d47ff8 in str_new_frozen_buffer (klass=klass@entry=4295795400, orig=orig@entry=4295625080, copy_encoding=copy_encoding@entry=1) at string.c:1329
1329 else if (STR_E... -
02:20 PM Bug #18257: rb_mRubyVMFrozenCore is broken by GC run
- My guess is that this is not really platform dependent, but instead, this is GC and it exhibits on different platforms just due to different memory layout. I think the issue is that the DTrace probe is trying to access some information w...
-
10:28 AM Bug #18257 (Closed): rb_mRubyVMFrozenCore is broken by GC run
- Testing Ruby with SystemTap on RHEL9 beta following these steps:
~~~
$ stap -v /usr/share/doc/ruby-doc/ruby-exercise.stp &
$ ruby -e '[1, 2, 3].push(4)'
~~~
I get the following error:
~~~
/usr/share/rubygems/rubygems/errors.... -
02:33 PM Feature #18035: Introduce general model/semantic for immutability.
- Some notes from the discussion on Slack:
In general shareable (from Ractor.make_shareable) != immutable, notably for special shareable objects like Ractor, and potentially Ractor::Array (which would share any element) or so. So the deep... -
02:25 PM Misc #18174: DevelopersMeeting20211021Japan
- * [Bug #17146] Queue operations are allowed after it is frozen. (eregon)
* This is an obvious inconsistency and it makes no sense whenever we discuss deep freezing object graphs. Let's fix it.
-
08:25 AM Misc #18174: DevelopersMeeting20211021Japan
- * [Feature #18254] Add an `offset` parameter to `String#unpack` and `String#unpack1`
- Binary protocol parsers currently have to slice their buffer repeatedly, this new argument would save a lot of string copying.
-
01:28 AM Misc #18174: DevelopersMeeting20211021Japan
- * [Feature #17795] Around `Process.fork` callbacks API (dan0042)
* A few naming suggestions have been made; does Matz like any of them?
* [Feature #17837] Add support for Regexp timeouts (dan0042)
* Adding this to ruby 3.1 with a ... -
11:13 AM Revision 5322745b (git): Added entries about default gems and bundled gems
-
10:56 AM Bug #18255: ioctl zeroes the last buffer byte
- `ptr` was reread just after the block, this is not a bug.
-
09:51 AM Bug #18255: ioctl zeroes the last buffer byte
- nobu (Nobuyoshi Nakada) wrote in #note-3:
> Found the bug.
> ...
Standby, I'm still setting up the environment to build for the embedded machine.
- 07:07 AM Revision ca989537 (git): Update bundled_gems at 2021-10-20
-
02:22 AM Revision 0c157525 (git): Use `RUBY_FUNCTION_NAME_STRING` for old Visual C++
- Probably `__func__` is supported since Visual C++ 2015 (= 14.0,
`_MSC_VER` = 1900). -
02:22 AM Revision 768ceb4e (git): Cast to void pointer for `%p` in commented out code [ci skip]
-
02:05 AM Revision 7c01cf49 (git): NEWS.md: Add error_highlight section
-
01:18 AM Revision 07b87f79 (git): add NEWS entries about debug.gem
-
12:50 AM Feature #18020: Introduce `IO::Buffer` for fiber scheduler.
- > In the description's code, there is lock and unlock. Are those supposed to be thread-safe? If yes I think you'd need to synchronize in almost every method, if it's possible to access the buffer without GVL.
No, instances of this class... -
12:45 AM Bug #18130 (Assigned): Showing exceptions from Ractor on console causes errors
- Thanks. I have another PR for the same issue in https://github.com/ruby/error_highlight/pull/11
I'm okay for the change, but I'd like @ko1 to review the change.
10/19/2021
-
10:57 PM Revision 8bf33a6f (git): Ensure the format argument of RUBY_DEBUG_LOG is a string literal
-
10:48 PM Revision 9b18f1bf (git): Supress `warning: data argument not used by format string [-Wformat-extra-args]`
-
09:29 PM Feature #17468: Deprecate RUBY_DEVEL
- I looked into this. If we removed `RUBY_DEVEL`, we would make it so `ruby_debug_log` was never defined, since it is only defined if `RUBY_DEVEL` is defined. Basically, removing `RUBY_DEVEL` is equivalent to removing the removing the en...
-
05:51 PM Feature #18083: Capture error in ensure block.
- ko1 (Koichi Sasada) wrote in #note-18:
> Another proposal is change `$!` semantics to `begin/rescue/ensure' clause local.
> ...
That seems elegant actually, because
```ruby
begin
...
rescue
foo($!)
end
```
would behave lik... -
04:46 AM Feature #18083: Capture error in ensure block.
- Another proposal is change `$!` semantics to `begin/rescue/ensure' clause local.
Does it solve the issues? - 05:00 PM Revision 79f9f832 (git): * 2021-10-20 [ci skip]
-
05:00 PM Revision 3e96b94e (git): Enhanced RDoc for Numeric (#4991)
- Treated:
#@-
#fdiv
#div
#abs
#zero?
#nonzero?
#to_int
#positive?
#negative? -
01:58 PM Bug #18255 (Open): ioctl zeroes the last buffer byte
- ~~Found the bug.
Does this patch fix it?~~
```diff
diff --git a/io.c b/io.c
index 50c9fea62c9..052155205d6 100644
--- a/io.c
+++ b/io.c
@@ -10143,8 +10143,8 @@ setup_narg(ioctl_req_t cmd, VALUE *argp, int io_p)
/* expand for data ... -
01:32 PM Bug #18255: ioctl zeroes the last buffer byte
- nobu (Nobuyoshi Nakada) wrote in #note-1:
>
> ...
"X"*364 is a request that makes ioctl fail and the SystemCallError is raised before the sanity check of the buffer.
However, given `req` as a proper request as a binary string:
```
> f... -
11:03 AM Bug #18255 (Feedback): ioctl zeroes the last buffer byte
- vihai (Daniele Orlandi) wrote:
> The ioctl sanity check is triggered as if the buffer was too small however the size of the buffer passed to ioctl is correct.
> ...
Do you mean that `fd.ioctl(GPIO_GET_LINEHANDLE_IOCTL, "X"*364)` raises... -
12:13 PM Revision 6b1efc54 (git): [ruby/racc] Bump up racc version to 1.6.0
- https://github.com/ruby/racc/commit/0c5fe2637c
-
12:08 PM Revision de68de87 (git): [ruby/logger] Bump up logger version to 1.4.4
- https://github.com/ruby/logger/commit/82a59c8d3f
-
11:55 AM Revision a7d07ee9 (git): [ruby/tempfile] Bump up tempfile version to 0.1.2
- https://github.com/ruby/tempfile/commit/e5ec902256
-
11:55 AM Revision 847eeafd (git): [ruby/etc] Bump up etc version to 1.3.0
- https://github.com/ruby/etc/commit/85ca541d0b
-
11:28 AM Revision b482a516 (git): [ruby/zlib] Bump up zlib version to 2.1.1
- https://github.com/ruby/zlib/commit/82e9a636a6
-
11:12 AM Bug #18187: Float#clamp() returns ArgumentError (comparison of Float with 1 failed)
- What about `Float#clamp`?
```diff
diff --git i/numeric.c w/numeric.c
index db2b2eb2793..12edb0f6006 100644
--- i/numeric.c
+++ w/numeric.c
@@ -2844,6 +2844,13 @@ num_step(int argc, VALUE *argv, VALUE from)
return from;
}
... -
04:48 AM Bug #18187: Float#clamp() returns ArgumentError (comparison of Float with 1 failed)
- I think it's OK to return NaN for all the cases of `Float::NAN.clamp`.
-
10:44 AM Feature #18256: Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- nobu (Nobuyoshi Nakada) wrote in #note-3:
> The current names have been moved from the top level, to make clarify the roles.
I don't understand this reasoning. What else could a Mutex/Queue/SizedQueue/ConditionVariable be for if for ... -
09:35 AM Feature #18256: Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- I’m against.
The current names have been moved from the top level, to make clarify the roles. -
09:25 AM Feature #18256: Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- Related, there is this PR by nobu to make ruby/spec use the `Thread::` prefix: https://github.com/ruby/spec/pull/867
I agree it makes sense to align the canonical name and specs hierarchy (although I think it's not too important either)... -
09:23 AM Feature #18256 (Open): Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable
- Currently these 4 classes are defined as both constants of `Object` and of `Thread`.
On CRuby 3.0.2, their `#inspect` shows they were first defined under `Thread` and then aliased in Object:
```
$ ruby -ve 'p [Mutex, Queue, SizedQue... -
10:27 AM Feature #18020: Introduce `IO::Buffer` for fiber scheduler.
- In the description's code, there is `lock` and `unlock`.
Are those supposed to be thread-safe? If yes I think you'd need to synchronize in almost every method, if it's possible to access the buffer without GVL.
I think it's better to o... -
05:30 AM Feature #18020: Introduce `IO::Buffer` for fiber scheduler.
- > mame: I cannot understand what is finally needed. Doesn’t String with ASCII-8BIT work?
String is both insufficient and inefficient. You can check how read and write on strings work with internal frozen copies, for example, it's both p... -
05:11 AM Feature #18020: Introduce `IO::Buffer` for fiber scheduler.
- Today we read the ticket (not all comments, sorry) and mame, ko1 has comment:
mame: I cannot understand what is finally needed. Doesn’t String with ASCII-8BIT work?
ko1: I can’t understand how to use it with IO? Only for scheduler? -
09:28 AM Misc #18174: DevelopersMeeting20211021Japan
- * [Feature #18256] Change the canonical name of Thread::Mutex, Thread::Queue, Thread::SizedQueue and Thread::ConditionVariable to just Mutex, Queue, SizedQueue and ConditionVariable (eregon)
* OK? (sorry for late addition for the meet... -
08:25 AM Revision ae25313e (git): [ruby/etc] Remove unnecessary declaration
- Fix https://github.com/ruby/etc/pull/12
https://github.com/ruby/etc/commit/7cbf03d22d -
08:09 AM Revision 8d6dbecc (git): Remove useless casts
-
08:08 AM Revision ec021e46 (git): Get rid of type-punning cast
-
07:41 AM Revision 1d9e1292 (git): Fill pid and error in the status
-
04:20 AM Feature #18035: Introduce general model/semantic for immutability.
- ioquatix (Samuel Williams) wrote in #note-17:
> @ko1 changed `Process::Status` to be frozen by default. What is the logic? What is the problem we are trying to solve by doing this? Is it to make things sharable by Ractor?
Yes.
10/18/2021
-
11:35 PM Revision 012cafa5 (git): Enhanced RDoc for numerics (#4982)
- Treats:
Numeric#coerce
Numeric#clone
Numeric#dup
Numeric#@+ (unary plus)
Numeric#i
Float#coerce -
09:47 PM Bug #18255 (Open): ioctl zeroes the last buffer byte
Hello,
I'm running ruby 2.7.4p191 on an armv7 linux and experimenting with GPIO_GET_LINEHANDLE_IOCTL ioctl.
The ioctl sanity check is triggered as if the buffer was too small however the size of the buffer passed to ioctl is corr...-
06:32 PM Feature #6210: load should provide a way to specify the top-level module
- I think this is a useful feature, and it can be implemented without any API changes/backwards compatibility issues. I submitted a pull request for it: https://github.com/ruby/ruby/pull/4986
-
04:09 PM Bug #17719 (Closed): Irregular evaluation order in hash literals
- Applied in changeset commit:git|fac2c0f73cafb5d65bfbba7aa8018fa427972d71.
----------
Fix evaluation order of hash values for duplicate keys
Fixes [Bug #17719]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Ivo A... - 04:09 PM Revision 8bc24438 (git): * 2021-10-19 [ci skip]
-
04:09 PM Revision fac2c0f7 (git): Fix evaluation order of hash values for duplicate keys
- Fixes [Bug #17719]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Ivo Anjo <ivo@ivoanjo.me> -
02:46 PM Revision 59bec48e (git): Remove declarations unused since a95262356ef5
-
02:26 PM Feature #18254: Add an `offset` parameter to String#unpack and String#unpack1
- I submitted a pull request for it, https://github.com/ruby/ruby/pull/4984.
-
08:32 AM Feature #18254: Add an `offset` parameter to String#unpack and String#unpack1
- Ah, I didn't know about it, but then you just allocated a string and converted an integer to string, so it's even slower than the `slice` pattern:
```ruby
# frozen_string_literal: true
require 'benchmark/ips'
STRING = Random.byte... -
08:24 AM Feature #18254: Add an `offset` parameter to String#unpack and String#unpack1
- You can use `unpack1("@#{pos + 24}N")`.
-
08:04 AM Feature #18254 (Closed): Add an `offset` parameter to String#unpack and String#unpack1
- When working with binary protocols it's common to have to first unpack some kind of header or type prefix, and then based on that unpack another part of the string.
For instance here's [a code snippet from Dalli, the most common Memca... -
08:41 AM Revision 57bf354c (git): Eliminate some redundant checks on `num` in `newhash`
- The `newhash` instruction was checking if `num` is greater than 0, but
so is [`rb_hash_new_with_size`](https://github.com/ruby/ruby/blob/82e2443d8b1e3edd2607c78dddf5aac79a13492d/hash.c#L1564)
as well as [`rb_hash_bulk_insert`](https://gi... - 08:40 AM Revision dfe944bf (git): haiku configure fix (again).
-
08:36 AM Revision 6c74976a (git): Remove `Test::Unit::TestCase.make_my_diffs_pretty!`
- `Test::Unit::CoreAssertions#mu_pp` is defined always using
`pretty_inspect`. -
08:36 AM Revision d1b8544b (git): Remove `Test::Unit::Assertions#exception_details`
- Never used since fa0f3eff228bb26de6d5b0e1238b1f358165dbd0.
- 07:11 AM Revision 9d2abb8e (git): Update bundled_gems at 2021-10-18
-
06:29 AM Feature #18253: `ID` in `rb_id_table_foreach_with_replace`
- A patch to remove unused arguments.
```diff
diff --git c/gc.c i/gc.c
index fdd4ac5eb38..595ce038cbc 100644
--- c/gc.c
+++ i/gc.c
@@ -9757,7 +9757,7 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
}
static enum rb_... -
06:22 AM Feature #18253 (Closed): `ID` in `rb_id_table_foreach_with_replace`
- `rb_id_table_foreach_with_replace` doesn't pass the `ID` to `func` and `replace`.
If this is intensional, `func` should be `rb_id_table_foreach_values_func_t` and `rb_id_table_update_callback_func_t` doesn't need the `id` argument?
... -
02:44 AM Revision 0bbfb6a3 (git): Fix error when srcdir not found
- So that `spec/mspec/bin/mspec --help` works at least.
-
02:43 AM Revision e1e36577 (git): Simplify srcdir fallback
10/17/2021
-
07:39 PM Feature #17795: Around `Process.fork` callbacks API
- Here's hoping that a name, any name, will get matz' approval so this can make it into ruby 3.1
`Process._fork`
A name begining with an underscore is often used to indicate an internal/private method.
`Process.fork!`
A bang to com... - 03:24 PM Revision 0381d105 (git): * 2021-10-18 [ci skip]
-
03:23 PM Revision 0871652f (git): Not all environment variables can be convertible to IBM-437
-
01:55 PM Feature #17837: Add support for Regexp timeouts
- So if we have 536870911 backtracks per 48.6898231/10 seconds, that comes out to roughly 110M backtracks per second.
How about fixing a safe limit of 60s -> 6600M backtracks?
Since it only stops the most pathological regexp after 60s, tha... -
01:40 PM Revision c7eac1be (git): Retry hung up tests verbosely
-
07:33 AM Revision 13716898 (git): Retry hung tests after parallel runs
-
07:33 AM Revision 478187e9 (git): Timeout parallel test worker processes
- 05:00 AM Revision 1831693c (git): haiku build update stack overflow check in libroot (haiku's libc) now
10/16/2021
- 04:34 PM Revision 82e2443d (git): * 2021-10-17 [ci skip]
-
03:48 PM Revision 5de6e251 (git): Replace unpack with unpack1
-
10:39 AM Revision cc8ff8b5 (git): [ruby/openssl] require Ruby 2.6 or later
- Drop support for Ruby 2.3, 2.4, and 2.5.
As of 2021-10, Ruby 2.6 is the oldest version that still receives
security fixes from the Ruby core team, so it doesn't make much sense
to keep code for those ancient versions.
https://github.co... -
09:57 AM Revision 4991dabd (git): [ruby/openssl] bump version number to 3.0.0.pre
- https://github.com/ruby/openssl/commit/baa83a8a57
-
09:34 AM Revision cea3c55d (git): [ruby/openssl] Ruby/OpenSSL 2.2.1
- https://github.com/ruby/openssl/commit/65e7207a07
-
09:34 AM Revision 75e72bab (git): [ruby/openssl] Ruby/OpenSSL 2.1.3
- https://github.com/ruby/openssl/commit/e8ee01b22c
-
09:34 AM Revision e36906f9 (git): [ruby/openssl] test/openssl/test_ssl: use TLS 1.2 for finished_messages on LibreSSL
- LibreSSL 2.2.x has a bug in the Finished message handling with TLS 1.3.
This is fixed by LibreSSL 3.3.2.
https://github.com/ruby/openssl/commit/0bea59d245 -
09:34 AM Revision c1147f7f (git): [ruby/openssl] ssl: avoid directly storing String object in NPN callback
- On the server side, the serialized list of protocols is stored in
SSL_CTX as a String object reference. We utilize a hidden instance
variable to prevent it from being GC'ed, but this is not enough because
it can also be relocated by GC.c... -
09:34 AM Revision f6612203 (git): [ruby/openssl] x509store: explicitly call rb_gc_mark() against Store/StoreContext
- We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().
https://github.com... -
09:34 AM Revision ca28545b (git): [ruby/openssl] ssl: explicitly call rb_gc_mark() against SSLContext/SSLSocket objects
- We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().
https://github.com... -
09:34 AM Revision c6c2190c (git): [ruby/openssl] digest: load digest library using Kernel#require
- The digest library is a default gem now, too. Therefore we can't simply
use rb_require() to load it, but we should use Kernel#require instead.
This change is based on the suggestion by David Rodríguez in
https://github.com/ruby/digest/c... -
09:34 AM Revision f88401f3 (git): [ruby/openssl] fix segv in Timestamp::{Request,Response,TokenInfo}.new
- prevent `ossl_ts_*_free()` from calling when `d2i_TS_*_bio()` failed.
https://github.com/ruby/openssl/commit/b29e215786 - 09:34 AM Revision 6dcc7415 (git): [ruby/openssl] ts: libressl build fix warning
- TS_time_cb on libressl expects an long long/time_t 64 bits long instead.
https://github.com/ruby/openssl/commit/4c99f577b2 -
09:34 AM Revision daeb914a (git): [ruby/openssl] ssl: temporary lock string buffer while reading
- Similarly to SSLSocket#syswrite, the blocking SSLSocket#sysread allows
context switches. We must prevent other threads from modifying the
string buffer.
We can use rb_str_locktmp() and rb_str_unlocktmp() to temporarily
prohibit modifica... -
09:25 AM Revision 58288076 (git): [ruby/openssl] ssl: create a temporary frozen string buffer when writing
- Since a blocking SSLSocket#syswrite call allows context switches while
waiting for the underlying socket to be ready, we must freeze the string
buffer to prevent other threads from modifying it.
Reference: https://github.com/ruby/openss... -
09:25 AM Revision ed7ea35d (git): [ruby/openssl] Fixed misspellings
- [ This is a backport to the 2.1 branch. ]
Fixed misspellings reported at [Bug #16437], for default gems.
(cherry picked from commit ruby/ruby@e68999c82c4863d33a6f893661fba1b7538c5671)
https://github.com/ruby/openssl/commit/0f43789503 -
09:19 AM Revision 6105ef76 (git): [ruby/openssl] ssl: add SSLContext#tmp_dh=
- Provide a wrapper of SSL_set0_tmp_dh_pkey()/SSL_CTX_set_tmp_dh(), which
sets the DH parameters used for ephemeral DH key exchange.
SSLContext#tmp_dh_callback= already exists for this purpose, as a
wrapper around SSL_CTX_set_tmp_dh_callb... -
09:19 AM Revision 49217086 (git): [ruby/openssl] ssl: remove private method SSLSocket#tmp_ecdh_callback
- Commit ee037e146037 ("ssl: remove SSL::SSLContext#tmp_ecdh_callback",
2020-08-12) forgot to remove the method.
https://github.com/ruby/openssl/commit/bef9ea84e4 -
08:41 AM Misc #18192 (Third Party's Issue): Advertise that OpenSSL 3.0 is not supported
- openssl gem version 2.1.3 and 2.2.1 have been released with this change in addition to other bug fixes/improvements.
Backport to ruby core is requested in [Bug #18251] and [Bug #18252]. -
08:36 AM Bug #18252 (Closed): Backport openssl 2.2.1 to ruby_3_0
- Please merge openssl 2.2.1 into ruby_3_0. ruby_3_0's openssl is currently at version 2.2.0 with local modifications.
openssl 2.2.1 incorporated these and includes some additional bug fixes: https://github.com/ruby/openssl/compare/v2.2... -
08:36 AM Bug #18251 (Closed): Backport openssl 2.1.3 to ruby_2_7
- Please merge openssl 2.1.3 into ruby_2_7. ruby_2_7's openssl is currently at version 2.1.2 with local modifications.
openssl 2.1.3 incorporated these and includes some additional bug fixes: https://github.com/ruby/openssl/compare/v2.1... -
04:56 AM Bug #18232: Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary
- ruby_3_0 a2fe4b75e4b236ad15778c59ace63006ace53889 merged revision(s) 217df51f0e5d9824ed712a4d175f555d932e44d8.
-
04:55 AM Bug #18023: Ractor#make_shareable changes the values of closured shareable objects
- ruby_3_0 5427b08381fb0d644ec69d5aa94234f90a4fbed1 merged revision(s) 76228191474c76810043b294a74bbb2f1808b3d9.
-
04:28 AM Revision 5427b083 (git): merge revision(s) 76228191474c76810043b294a74bbb2f1808b3d9: [Backport #18023]
- Fix Ractor.make_shareable changing locals for Procs
env_copy() uses rb_ary_delete_at() with a loop counting up while
iterating through the list of read only locals. rb_ary_delete_at() can
shift elements in the ar... -
04:26 AM Revision a2fe4b75 (git): merge revision(s) 217df51f0e5d9824ed712a4d175f555d932e44d8: [Backport #18232]
- Dump outer variables tables when dumping an iseq to binary
This commit dumps the outer variables table when dumping an iseq to
binary. This fixes a case where Ractors aren't able to tell what outer
variables bel... -
12:51 AM Feature #8780 (Closed): DBM#to_h alias for #to_hash
-
12:38 AM Feature #11758 (Closed): Add keyword assignment syntax
-
12:30 AM Feature #12010 (Closed): Exclude dot and dotdot from Dir#each
10/15/2021
-
10:47 PM Feature #12338 (Closed): bypass Exception.new
-
10:41 PM Feature #12996 (Closed): Optimize Range#===
-
09:55 PM Feature #14091 (Closed): Remove Time#succ
- `Time#succ` was removed in Ruby 3.0.
-
09:51 PM Feature #14098 (Closed): The HowToContribute guide can be improved
- I updated https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute to discuss testing and where to document changes. The guide already contained a statement to follow the style of the existing code, and I don't think we need to be ...
-
09:31 PM Revision 4ffc3fb0 (git): [ruby/rdoc] fix: alias to method with call-seq
- This change fixes alias call-seq to return nil if the method's
call-seq does not specify the alias.
Previously, the alias's call-seq would be an empty string in this case
which broke darkfish rendering.
This change also backfills test ... -
09:20 PM Revision 5d975684 (git): Enhanced RDoc for remainder (#4975)
- Treats Numeric#remainder and Integer#remainder.
-
09:00 PM Feature #14347 (Closed): Explain How Symbols Differ From Strings in Symbol's Rdoc
- Applied in changeset commit:git|2a5c3a4d0f693ad0fe7b76dd99155e57149d2cac.
----------
Update documentation for String and Symbol to discuss differences
Implements [Feature #14347] -
08:54 PM Revision 2a5c3a4d (git): Update documentation for String and Symbol to discuss differences
- Implements [Feature #14347]
-
06:56 PM Feature #14443 (Closed): Omit 'pattern' parameter in '(g)sub(!)' when 'hash' is given
-
06:49 PM Feature #14444 (Closed): MatchData: alias for #[]
-
06:47 PM Feature #14766 (Closed): Indicate `find_all` and `select` methods are aliases.
-
06:39 PM Feature #18124 (Closed): Hash shorthands (matching constructors functionality in JS)
-
06:34 PM Feature #14394: Class.descendants
- I'd like this feature to make 3.1, so I submitted a pull request for it, borrowing somewhat from @fatkodima's pull request: https://github.com/ruby/ruby/pull/4974
As @ko1 specified, the receiver is not included in the array, nor are s... -
05:51 PM Revision 37ea909f (git): Enhanced RDoc for divmod (#4973)
- Treats:
Integer#divmod
Float#divmod
Numeric#divmod -
05:16 PM Feature #17760: Where we should install a header file when `gem install --user`?
- > then it should bump the major version (or some other well-documented scheme).
I can hardly see something like this working in practice. Maybe for digest it would work as realistically it won't change much in the future. But if Rubyg... -
04:30 PM Feature #17760: Where we should install a header file when `gem install --user`?
- byroot (Jean Boussier) wrote in #note-8:
> e.g. I have `app1` with `digest 3.0.0` and `app2` with `digest 3.2.0`, both have `somegem-that-link-to-digest`, this means we'd need to compile that gem twice and link against different headers... -
04:25 PM Feature #17760: Where we should install a header file when `gem install --user`?
- byroot (Jean Boussier) wrote in #note-8:
> But then I suppose them that compile against `digest.h` would also need to know where to look, I'm really unsure how it's supposed to work. If I have 5 different versions of digest, which one s... -
11:01 AM Feature #17760: Where we should install a header file when `gem install --user`?
- Kind of yes. From my understanding the problem is that $INSTALL_FILES always install files in `site_ruby` https://github.com/ruby/digest/blob/1cb6bac1a6732a1415278b94fad2fdc695477dec/ext/digest/extconf.rb#L7-L9
So from my limited unde... -
08:05 AM Feature #17760: Where we should install a header file when `gem install --user`?
- Hi, no I wasn't, and I'm not sure how it should be fixed. If I understand correctly, this is about cases where rubygems does not have write access to the location where ruby itself is installed, while it does have write access to the loc...
-
07:44 AM Feature #17760: Where we should install a header file when `gem install --user`?
- @deivid are you aware of this issue? Any idea how we could fix this or what decision would need to be taken?
I fear that the `digest` extraction might cause major problem to people trying to upgrade to 3.1 next year, or trying to test... -
04:57 PM Revision 2043c2e7 (git): Enhanced RDoc for numeric.c (#4964)
- Treats Integer#% and Float#%.
-
04:40 PM Revision 4c42540d (git): [ruby/rdoc] Support linking #==
- See related commits:
- ebc66662 for #===
- 4943d208 for #[], #[]=, #<<, and #>>
https://github.com/ruby/rdoc/commit/8e47f7840a -
04:39 PM Revision 7aec65ad (git): [ruby/rdoc] feat: add support for :category: on C functions
- https://github.com/ruby/rdoc/commit/45c92005fe
- 04:39 PM Revision c322069a (git): * 2021-10-16 [ci skip]
-
04:39 PM Revision fbd0516a (git): [ruby/rdoc] fix: comments in C files use the global markup option
- Previously, Parser::C comments all defaulted to "rdoc" format, even
when the user had set a different default with the `--markup=<choice>`
option.
https://github.com/ruby/rdoc/commit/4643b08a26 -
04:39 PM Revision d4894e81 (git): [ruby/rdoc] extract Comment creation in Parser::C
- This is a prefactor for fixing comment format handling.
https://github.com/ruby/rdoc/commit/a3d366feed -
04:39 PM Revision 9225f3c1 (git): [ruby/rdoc] test: add coverage for comment format in a C file
- https://github.com/ruby/rdoc/commit/3b8334a796
-
12:35 PM Feature #15973: Let Kernel#lambda always return a lambda
- @jeremyevans added a test for this in https://github.com/ruby/ruby/commit/2188d6d160d3ba82432c87277310a4d417e136d5#diff-8b146f8f5073c5ee6526a128c3e9c05ae7a52d2cd496f601351470137f2a87a0
but it was removed by @nobu in https://github.com/r... -
11:09 AM Misc #18174: DevelopersMeeting20211021Japan
- - [Feature #17760] Where we should install a header file when `gem install --user`?
- `digest` have been gemified. However its `extconf.rb` have `$INSTALLFILES = { "digest.h" => "$(HDRDIR)" }` which fail for most people because ruby's ... -
10:59 AM Revision 19beb028 (git): Make explicit opening files
-
10:42 AM Revision 855db8e9 (git): Use `__dir__`
-
10:32 AM Feature #17873: Update of default gems in Ruby 3.1
- I figured the `digest` issue. It only happens if you have a `git` source gem as well in the Gemfile, because the git source does a MD5 of the repository URL.
I submitted a PR that could fix the problem: https://github.com/rubygems/rub... -
09:47 AM Revision 370fff98 (git): Prefer `require_relative`
- 06:31 AM Revision 027a3379 (git): [ruby/zlib] Fix a bug that GZipReader#gets may return incomplete line
- See also: https://github.com/ruby/csv/issues/117#issuecomment-933289373
How to reproduce with x.csv.gz in the issue comment:
Zlib::GzipReader.open("x.csv.gz") do |rio|
rio.gets(nil, 1024)
while line = rio.gets(nil, 8192... -
06:07 AM Revision 67905420 (git): Use `__dir__`
-
01:57 AM Bug #16953: Windows bash bin files removed in master
- @jeremyevans0
Thanks. Everything seems fine with master. I looked at a commit somewhat later than the version listed (2020-06-11), and all the bin stubs were contained in the `bin` folder. Today, they are generated in another manner;...