79677 Commits

Author SHA1 Message Date
Peter Zhu
4c1e367039 Restore deleted .gitignore
It was deleted in 7fc73ab5f6fbe46655855079954b26dcc14576b3.
2023-09-19 19:33:48 -04:00
Takashi Kokubun
5b00314868 Ignore JRuby extension sync
Avoid alerting on failing with commits like
fb97d899c5
2023-09-19 14:10:38 -07:00
Jemma Issroff
7d306d55ce
[YARP] Minor linting [ci skip] (#8480) 2023-09-19 15:40:59 -04:00
Kevin Newton
3e4ccd6ddc [YARP] Use the static literal flag 2023-09-19 15:38:41 -04:00
Matt Valentine-House
7dee7e6116 [YARP] Implement GlobalVariableTargetNode 2023-09-19 19:52:32 +01:00
Peter Zhu
901d0b4125 Remove dead function Init_Method
Init_Method no longer has any code, so we can remove it.
2023-09-19 14:25:01 -04:00
Benoit Daloze
3fadb66bf1 [ruby/yarp] Only use Ripper on CRuby
https://github.com/ruby/yarp/commit/9c23f53d7b
2023-09-19 17:20:15 +00:00
Benoit Daloze
7fc73ab5f6 [ruby/yarp] Only keep semantic fields in Java, i.e. skip location fields
* Add $YARP_SERIALIZE_ONLY_SEMANTICS_FIELDS to control where to serialize location fields at templating time,
  this way there is no overhead for either case and nothing to check at runtime.
* Add a byte in the header to indicate whether location fields are included as expected.
* Fixes https://github.com/ruby/yarp/issues/807
* Simplify the build-java CI job now that the FFI backend is available so JRuby can serialize.
* Support keeping some location fields which are still needed until there is a replacement

https://github.com/ruby/yarp/commit/fc5cf2df12
2023-09-19 17:20:01 +00:00
Kevin Newton
4da53fd3a7 [ruby/yarp] Better Node#pretty_print
Respect the current indentation

https://github.com/ruby/yarp/commit/068333ef49
2023-09-19 16:57:46 +00:00
Jemma Issroff
a71001d341 [ruby/yarp] Ignore parseing specific files on TruffleRuby to make CI green
CI is currently failing due to an issue with Ripper on the latest
TruffleRuby version. This commit removes the offending tests from
running, to ensure CI is green again.

https://github.com/ruby/yarp/commit/dae2c80c42
2023-09-19 16:43:24 +00:00
Mike Dalessio
0cda3ac454 [ruby/yarp] fix: handling escaped whitespace in a %w list
Introduces a new flavor of unescaping, YP_UNESCAPE_WHITESPACE, which
is the same as MINIMAL but also unescapes whitespace.

Note that a spanning_heredoc.txt fixture test is updated to be less
wrong, but YARP's behavior doesn't yet fully match Ruby in this case.

Fixes https://github.com/ruby/yarp/pull/1505

https://github.com/ruby/yarp/commit/0af69bdeb1
2023-09-19 16:14:31 +00:00
Kevin Newton
ffc1fc7a6d [ruby/yarp] Explicitly use u32 for constant pool
https://github.com/ruby/yarp/commit/32b173e6c8
2023-09-19 16:13:39 +00:00
Kevin Newton
2531ba4ba0 [ruby/yarp] Consistently place block arguments on block slot for call
https://github.com/ruby/yarp/commit/fe208302e5
2023-09-19 16:13:08 +00:00
Nathan Froyd
c7875340be [ruby/yarp] fix computation of memsize for constant id lists
https://github.com/ruby/yarp/commit/df72517fd1
2023-09-19 16:11:27 +00:00
Nathan Froyd
18622403ac [ruby/yarp] fix computation of memsize for node lists
https://github.com/ruby/yarp/commit/02aab8b026
2023-09-19 16:11:27 +00:00
Matt Valentine-House
5c5391f444 [YARP] Implement ClassVariableTargetNode 2023-09-19 14:54:15 +01:00
Matt Valentine-House
2f8daa5f51 [YARP] Implement InstanceVariableTargetNode, LocalVariableTargetNode 2023-09-19 14:53:58 +01:00
Matt Valentine-House
91b10c0b77 [YARP] Implement ConstantTargetNode 2023-09-19 14:53:39 +01:00
Nobuyoshi Nakada
8f1b688177
Revert vcpkg.exe to previous release [ci skip]
The latest fails to extract downloaded zip files.
2023-09-19 18:52:21 +09:00
Samuel Giddins
4023637d20 [rubygems/rubygems] Reduce allocations for stub specifications
This helps with memory usage during application boot time

```
==> memprof.after.txt <==
Total allocated: 1.43 MB (18852 objects)
Total retained:  421.12 kB (4352 objects)

==> memprof.before.txt <==
Total allocated: 2.43 MB (28355 objects)
Total retained:  469.69 kB (5425 objects)
```

See https://bugs.ruby-lang.org/issues/19890 about the readline
allocations

https://github.com/rubygems/rubygems/commit/d7eb66eee3
2023-09-19 07:25:51 +00:00
Samuel Giddins
cea7e6ecca [rubygems/rubygems] Lazily construct fetcher debug messages
Avoids constructing several strings

https://github.com/rubygems/rubygems/commit/8a322dbe11
2023-09-19 07:14:53 +00:00
Nobuyoshi Nakada
6473903082
[Bug #18257] Register the class path of FrozenCore to mark
ICLASS does not have the path usually, so it needs to be registered
separately.
2023-09-19 14:09:53 +09:00
Nobuyoshi Nakada
4634405f7c
Stop exposing FrozenCore in headers
Revert commit "Directly allocate FrozenCore as an ICLASS",
813a5f4fc46a24ca1695d23c159250b9e1080ac7.
2023-09-19 14:08:05 +09:00
Hiroshi SHIBATA
b33e9f637d [ruby/securerandom] Removed extra argument for build failure of ruby/ruby
https://github.com/ruby/ruby/actions/runs/6230184763/job/16909829150

https://github.com/ruby/securerandom/commit/f60582432c
2023-09-19 02:22:15 +00:00
nick evans
dfb2b4cbc9 [ruby/securerandom] Add support for UUID version 7
Although the specification for UUIDv7 is still in draft, the UUIDv7
algorithm has been relatively stable as it progresses to completion.

Version 7 UUIDs can be very useful, because they are lexographically
sortable, which can improve e.g: database index locality.  See section
6.10 of the draft specification for further explanation:

  https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/

The specification allows up to 12 bits of extra timestamp precision, to
make UUID generation closer to monotonically increasing.  This provides
between 1ms and ~240ns of timestamp precision.  At the cost of some code
complexity and a small performance penalty, a kwarg may specify any
arbitrary precision between 0 and 12 extra bits.  Any stronger
guarantees of monotonicity have considerably larger tradeoffs, so
nothing more is implemented.  This limitation is documented.

Ruby issue: https://bugs.ruby-lang.org/issues/19735

https://github.com/ruby/securerandom/commit/34ed1a2ec3
2023-09-19 01:55:27 +00:00
0x1eef
e77c766b7a [ruby/net-http] No longer neccessary to call String#freeze on string literals.
See #144

https://github.com/ruby/net-http/commit/5a986c13d3
2023-09-19 01:32:18 +00:00
Yoshiki Takagi
465c222ef1 [rubygems/rubygems] Bump actions/checkout to v4 in bundler gem template
https://github.com/rubygems/rubygems/commit/5ed4c600da
2023-09-19 01:06:35 +00:00
Jeremy Evans
230834d9bb [ruby/base64] Bump required_ruby_version to 2.4.0
The gem depends on String#unpack1, which was introduced in Ruby 2.4.

https://github.com/ruby/base64/commit/9f0e4ba155
2023-09-19 01:04:54 +00:00
Takashi Kokubun
0a2c4a6091
[DOC] Add production performance tips to yjit.md (#8472)
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2023-09-18 16:27:18 -07:00
Kevin Newton
1636f6abd6 [ruby/yarp] Use compact_child_nodes where possible
https://github.com/ruby/yarp/commit/c1911fa9b1
2023-09-18 17:48:52 +00:00
Jemma Issroff
54e676a88b
[YARP] Restructure tests to compare YARP evaluation to CRuby evaluation (#8467)
Previously, we were hardcoding the expected evaluation value. Now,
instead, we structure it so that we compare the YARP evaluation value
against CRuby's evaluation value.
2023-09-18 12:34:20 -04:00
Matt Valentine-House
ec37636ab3 Only sort the heap on platforms with compaction 2023-09-18 14:34:38 +01:00
Matt Valentine-House
8792e421ce Allow pages to be sorted by pinned slot count
By compacting into slots with pinned objects first, we improve the
efficiency of compaction. As it is less likely that there will exist
pages containing only pinned objects after compaction. This will
increase the number of free pages left after compaction and enable us to
free them.

This used to be the default compaction method before it was removed
(inadvertently?) during the introduction of auto_compaction.

This commit will sort the pages by the pinned slot count at the start of
a major GC that has been triggered by explicitly calling GC.compact (and
thus setting objspace->flags.during_compaction).

It works using the same method by which we sort the heap by empty slot
count during GC.verify_compaction_references.
2023-09-18 14:34:38 +01:00
Matt Valentine-House
404a1c032a Move heap sorting into the main GC loop
Previously it was only being sorted during the verify compaction
references stage - so would only happen during testing.

This commit allows us to sort the heap prior to each explicit GC.compact
run
2023-09-18 14:34:38 +01:00
Matt Valentine-House
d3852f71e4 Enable different heap sort methods during compaction
pass the sorting function in as a function pointer so we don't always
sort by how empty a page is
2023-09-18 14:34:38 +01:00
Jemma Issroff
c492a7f877
[YARP] Miscellaneous bug fixes (#8453)
Miscellaneous bug fixes
2023-09-18 09:29:52 -04:00
Nobuyoshi Nakada
c87f2a4f15
[Bug #19887] RUBYOPT should work without leading - 2023-09-18 10:14:46 +09:00
Nobuyoshi Nakada
5c6e00b090
Simplify restoring ENV 2023-09-18 09:55:07 +09:00
tomoya ishida
8b4e54f979 [ruby/irb] Test should not depend on user's irbrc file specified by
ENV['IRBRC']
(https://github.com/ruby/irb/pull/717)

https://github.com/ruby/irb/commit/1d2d35dd33
2023-09-17 21:25:49 +00:00
Nobuyoshi Nakada
88262875fd
Fix git cat-file condition
When multiple files changed in the same directory to be removed, the
first file only was removed from changed set.
2023-09-18 02:23:59 +09:00
Nobuyoshi Nakada
8d219a9bd7
Refactor test_sync_default_gems.rb 2023-09-18 02:11:48 +09:00
Nobuyoshi Nakada
5c94f3fe9d [ruby/fiddle] Suppress -Wundef warnings on arm64 macOS and Windows
(https://github.com/ruby/fiddle/pull/134)

```
In file included from ../../../../ext/fiddle/fiddle.h:46:
/opt/local/include/ffi.h:477:5: warning: 'FFI_GO_CLOSURES' is not defined, evaluates to 0 [-Wundef]
    ^
```

c.f. https://github.com/libffi/libffi/pull/796

https://github.com/ruby/fiddle/commit/d4feb57098
2023-09-17 22:42:50 +09:00
Nobuyoshi Nakada
72772a3caa [DOC] Mention "-" in ARGF 2023-09-17 22:05:58 +09:00
Nobuyoshi Nakada
2dffd36504
Move special patterns to the common pattern 2023-09-17 21:11:54 +09:00
Nobuyoshi Nakada
bcb3247072
[Bug #19778] Pass additional include options to INCFLAGS in common.mk 2023-09-17 19:18:23 +09:00
Nobuyoshi Nakada
e9a36f8abe
Tag p_lparen and p_lbracket as tbl
Remove tagging to the component for each reference.
2023-09-17 16:22:01 +09:00
Nobuyoshi Nakada
69d7871b02
ripper: Preprocess ripper-dispatchable types only
Keep the other types, which not having setter macros for ripper.
2023-09-17 16:22:01 +09:00
yui-knk
df316be401 nd_aid of NODE_OP_ASGN_OR is not used then no need to set it 2023-09-17 16:04:42 +09:00
tomoya ishida
cd67c0d204 [ruby/irb] Test should not depend on user's irbrc file
(https://github.com/ruby/irb/pull/714)

https://github.com/ruby/irb/commit/02703c46f9
2023-09-16 22:27:04 +00:00
John Hawthorn
380b42fe6a Fix comment for rb_enc_str_new [ci skip] 2023-09-16 11:29:40 -07:00