Age | Commit message (Collapse) | Author |
|
This commit reintroduces finer-grained constant cache invalidation.
After 8008fb7 got merged, it was causing issues on token-threaded
builds (such as on Windows).
The issue was that when you're iterating through instruction sequences
and using the translator functions to get back the instruction structs,
you're either using `rb_vm_insn_null_translator` or
`rb_vm_insn_addr2insn2` depending if it's a direct-threading build.
`rb_vm_insn_addr2insn2` does some normalization to always return to
you the non-trace version of whatever instruction you're looking at.
`rb_vm_insn_null_translator` does not do that normalization.
This means that when you're looping through the instructions if you're
trying to do an opcode comparison, it can change depending on the type
of threading that you're using. This can be very confusing. So, this
commit creates a new translator function
`rb_vm_insn_normalizing_translator` to always return the non-trace
version so that opcode comparisons don't have to worry about different
configurations.
[Feature #18589]
Notes:
Merged: https://github.com/ruby/ruby/pull/5716
|
|
[Feature #17837]
Notes:
Merged: https://github.com/ruby/ruby/pull/5703
|
|
This reverts commits for [Feature #18589]:
* 8008fb7352abc6fba433b99bf20763cf0d4adb38
"Update formatting per feedback"
* 8f6eaca2e19828e92ecdb28b0fe693d606a03f96
"Delete ID from constant cache table if it becomes empty on ISEQ free"
* 629908586b4bead1103267652f8b96b1083573a8
"Finer-grained inline constant cache invalidation"
MSWin builds on AppVeyor have been crashing since the merger.
Notes:
Merged: https://github.com/ruby/ruby/pull/5715
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Current behavior - caches depend on a global counter. All constant mutations cause caches to be invalidated.
```ruby
class A
B = 1
end
def foo
A::B # inline cache depends on global counter
end
foo # populate inline cache
foo # hit inline cache
C = 1 # global counter increments, all caches are invalidated
foo # misses inline cache due to `C = 1`
```
Proposed behavior - caches depend on name components. Only constant mutations with corresponding names will invalidate the cache.
```ruby
class A
B = 1
end
def foo
A::B # inline cache depends constants named "A" and "B"
end
foo # populate inline cache
foo # hit inline cache
C = 1 # caches that depend on the name "C" are invalidated
foo # hits inline cache because IC only depends on "A" and "B"
```
Examples of breaking the new cache:
```ruby
module C
# Breaks `foo` cache because "A" constant is set and the cache in foo depends
# on "A" and "B"
class A; end
end
B = 1
```
We expect the new cache scheme to be invalidated less often because names aren't frequently reused. With the cache being invalidated less, we can rely on its stability more to keep our constant references fast and reduce the need to throw away generated code in YJIT.
Notes:
Merged: https://github.com/ruby/ruby/pull/5433
|
|
This commit implements arrays on Variable Width Allocation. This allows
longer arrays to be embedded (i.e. contents directly follow the object
header) which improves performance through better cache locality.
Notes:
Merged: https://github.com/ruby/ruby/pull/5660
|
|
`AC_HEADER_STDBOOL` rejects stdbool.h in c2x, which is not
conforming to C99.
Notes:
Merged: https://github.com/ruby/ruby/pull/5666
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Make ruby_abi_version have C linkage so that the symbol can be found
in the shared object.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5534
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5599
|
|
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which
is the ABI version. This value should be bumped whenever an ABI
incompatible change is introduced.
When loading dynamic libraries, Ruby will compare its own
`ruby_abi_version` and the `ruby_abi_version` of the loaded library. If
these two values don't match it will raise a `LoadError`. This feature
can also be turned off by setting the environment variable
`RUBY_RUBY_ABI_CHECK=0`.
This feature will prevent cases where previously installed native gems
fail in unexpected ways due to incompatibility of changes in header
files. This will force the developer to recompile their gems to use the
same header files as the built Ruby.
In Ruby, the ABI version is exposed through
`RbConfig::CONFIG["ruby_abi_version"]`.
Notes:
Merged: https://github.com/ruby/ruby/pull/5474
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5577
|
|
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just
a flag now, and redefined in ruby/backward/2/assume.h then.
Notes:
Merged: https://github.com/ruby/ruby/pull/5577
|
|
In the past, many internal functions are declared in intern.h
under include/ruby directory, because there were no headers for
internal use.
|
|
Configuration for mingw32 can't detect 'shutdown' due to wrong -l
option even though it's available (this has been going on for a while,
and it needs to be fixed).
In this situation, include/ruby/missing.h declares a stub shutdown
function since 7ee786388a, and another shutdown decl is came from
system header. They are incompatible at stdcall attribute, so it
causes compilation failure.
This change defines a HAVE_SHUTDOWN to guard a newly introduced stub
decl in include/ruby/missing.h
Notes:
Merged: https://github.com/ruby/ruby/pull/5465
|
|
0x003 is not suitable as a bit mask, and it's ok just to be 0 to avoid
setting unsupported bit.
Notes:
Merged: https://github.com/ruby/ruby/pull/5461
|
|
RB_WAITFD_PRI uses POLLPRI for other platforms, but wasi-libc doesn't
have POLLPRI for now.
Notes:
Merged: https://github.com/ruby/ruby/pull/5407
|
|
This implementation does nothing around preemptive context switching
because there is no native thread.
Notes:
Merged: https://github.com/ruby/ruby/pull/5407
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5407
|
|
At least OpenBSD/sparc64 doesn't appear to define them, and possibly
some other OpenBSD GCC platforms don't (most OpenBSD platforms have
already switched to clang).
|
|
IA64 support was dropped in ticket #15894, so we can drop support for
HP-UX.
Notes:
Merged: https://github.com/ruby/ruby/pull/5457
|
|
Notes:
Merged-By: kateinoigakukun
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5435
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5432
|
|
A short (2 bytes) will cause unaligned struct accesses when strings are
used as a buffer to directly store binary data.
Notes:
Merged: https://github.com/ruby/ruby/pull/5432
|
|
This reverts commit c365c5921ea26e31c03a85b01ff4c04629abfc10.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5415
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5413
|
|
This reverts commit d4a95428bb244ca8c4a97ad50f3837f191f1f0c3.
Notes:
Merged: https://github.com/ruby/ruby/pull/5405
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5399
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5378
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5377
|
|
|
|
|
|
- prerequisite of supporting YJIT with VC++.
- note that now can specfily `--yjit` on mswin64, but not enabled
YJIT'ed code because of YJIT requires `OPT_DIRECT_THREADED_CODE`
or `OPT_CALL_THREADED_CODE` in `rb_yjit_compile_iseq`.
|
|
Also enable the warning for T_DATA allocator.
Notes:
Merged: https://github.com/ruby/ruby/pull/5348
|
|
Already these had been announced to be removed in 3.2.
Notes:
Merged: https://github.com/ruby/ruby/pull/5348
|
|
|
|
|
|
implementation. (#5340)
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5249
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5314
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5301
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5300
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5287
Merged-By: ioquatix <samuel@codeotaku.com>
|