`conv` proc is used before and after the `url` variable is updated. So
this script didn't seem to behave correctly for the "Close #xxx" syntax.
Reusing the same variable name for different things seems prone to errors.
These days we benchmark MJIT using yjit-bench. The warmup duration in
yjit-bench is very short, so compiling many methods comes at a cost even
while it's actually optimal for MJIT to compile everything / tens of
thousands of methods once it reaches the peak performance.
yjit-bench doesn't necessarily represent the peak performance on production.
It measures the performance of Ruby 30~60s after boot. If your JIT takes
more than 1 minute to warm up, there's no way for the JIT to make the numbers
good on yjit-bench.
Until we make MJIT's compilation much faster, we don't afford compiling
10,000 methods on yjit-bench.
This change alone makes MJIT's benchmark number on railsbench 2x better :p
Most tests in test_yjit.rb use a sub process, so we can run them even
when the parent process is not running with YJIT. Run them so simply
running `make check` tests YJIT a bit.
[Misc #19149]
Previously, for statically-linked extensions, we used
`vm->loading_table` to delay calling the init function until the
extensions are required. This caused the extensions to look like they
are in the middle of being loaded even before they're required.
(`rb_feature_p()` returned true with a loading path output.) Combined
with autoload, queries like `defined?(CONST)` and `Module#autoload?`
were confused by this and returned nil incorrectly. RubyGems uses
`defined?` to detect if OpenSSL is available and failed when OpenSSL was
available in builds using `--with-static-linked-ext`.
Use a dedicated table for the init functions instead of adding them to
the loading table. This lets us remove some logic from non-EXTSTATIC
builds.
[Bug #19115]
- Fix indents of `tokens`, to make the contents of Token a list
- Move the example of `tokens` to separate from the above list
- Markup keyword argument and method name
The following new debug context APIs are for implementing debugger's
`next` (step over) and similar functionality.
* `rb_debug_inspector_frame_depth(dc, index)` returns `index`-th
frame's depth.
* `rb_debug_inspector_current_depth()` returns current frame depth.
The frame depth is not related to the frame index because debug
context API skips some special frames but proposed `_depth()` APIs
returns the count of all frames (raw depth).
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.
In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError. However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.
Fixes [Bug #18931]
Beginless ranges previously raised TypeError for this case,
except for string ranges, which had unexpected behavior:
('a'..'z').include?('ww') # false
(..'z').include?('ww') # previously true, now TypeError
Use of include? with endless ranges could previously result
in an infinite loop.
This splits off a range_string_cover_internal function from
range_include_internal.
Fixes [Bug #18580]
We attempted to remove things like this and reverted all of them, but I
think nobody relies on this unlike the positional arguments of
`ERB#initialize`.
https://github.com/ruby/erb/commit/92fde7e403
(https://github.com/ruby/erb/pull/34)
There seems to be no way to fix this. It doesn't happen in an installed
directory, so it's likely a false positive and/or a bug in rubygems.
| <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: loading in progress, circular require considered harmful - /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb
| from /home/runner/work/erb/erb/libexec/erb:0:in `require'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb:3:in `<top (required)>'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/setup.rb:3:in `require_relative'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/shared_helpers.rb:8:in `<top (required)>'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/shared_helpers.rb:8:in `require_relative'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/rubygems_integration.rb:3:in `<top (required)>'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/bundler/rubygems_integration.rb:3:in `require'
| from /home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems.rb:1352:in `<top (required)>'
| from <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85:in `require'
| from <internal:/home/runner/.rubies/ruby-head/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85:in `require'
s/S, i/I, l/L, and q/Q had the same code in both cases, so
combine the cases.
Alternatively, we could actually the size of the unsigned type,
but I doubt there are any platforms where the unsigned type is
a different size than the signed type.
If the rescue clause has only exc_var and not exc_list, use the
exc_var position instead of the rescue body position.
This issue appears to have been introduced in
688169fd83b24564b653c03977c168cea50ccd35 when "opt_list" was split
into "exc_list exc_var".
Fixes [Bug #18974]
For people using Rosetta 2 on ARM Macs, it can happen that the
rustc in the PATH compiles for x86_64 while clang is targeting
ARM. We were enabling YJIT in these situations because the test
program compiled fine, but caused linking failure later due to
the architecture mismatch.
Adjust the test program to fail when rustc's target arch is different
from ruby's target arch.
[Bug #19146]
We frequently make branches that only have one target but we used to
always allocate space for two branch targets. This patch moves all the
information a branch target has into a struct and refer to them using
Option<Box<BranchTarget>>, this way when the second branch target is not
present it only takes 8 bytes.
Retained heap size on railsbench went from 16.17 MiB to 14.57 MiB, a
ratio of about 1.1.
We need to track this number in CI. It's important to know how changes
to the codebase impact the number of shapes in the system, so lets add
the number to the VM stat hash