74915 Commits

Author SHA1 Message Date
Peter Zhu
4b29eb17f2 Fix indentation of switch statement in shape.c 2022-11-17 14:43:46 -05:00
Takashi Kokubun
3f3a539197
YJIT: Add missing key for non-stats build 2022-11-17 11:31:56 -08:00
Takashi Kokubun
0446d961a0
YJIT: Fix typo in stats references (#6753) 2022-11-17 10:58:56 -08:00
TSUYUSATO Kitsune
189e3c0ada Add default cases for cache point finding function 2022-11-17 23:19:17 +09:00
TSUYUSATO Kitsune
90bfac296e Add OP_CCLASS_MB case 2022-11-17 23:19:17 +09:00
Nobuyoshi Nakada
a145a204ec
[DOC] Update about sec argument of Time.new 2022-11-17 21:52:50 +09:00
Lars Kanis
7b1d23fd29
Windows: Readlink improvements (#6745)
* Windows: Use readlink emulation for File.readlink

This fixes readlink emulation for the ERROR_MORE_DATA case and general error reporting.
It now releases GVL while readlink IO operation.

The dedicated rb_readlink was introduced in commit 2ffb87995a33cdc7ba609a4b867f03f18da0c3b3
in order to improve encoding and buffer allocation.
However the encoding issues are solved since ruby-3.0 switched to UTF-8
and the buffer allocation will be improved in a later commit.

* Windows: Increase the default buffer size for reparse point info

So far nearly all queries of reparse points needed two attempts to get enough buffer.

* Windows: Remove declaration of rb_w32_wreadlink

It was removed in commit 2f6fdd3aebdee2ce04d003b206f6da78120e8235
2022-11-17 01:57:52 -08:00
git
71e668e633 Update default gems list at c76909e551f0f60b7a354ab748ef1a [ci skip] 2022-11-17 04:53:46 +00:00
Hiroshi SHIBATA
c76909e551 [ruby/irb] Bump up 1.4.3
https://github.com/ruby/irb/commit/1bddbbf602
2022-11-17 04:52:50 +00:00
st0012
923c1aaed7
Drop Ruby 2.5 support
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
2022-11-17 13:06:32 +09:00
Patrick Plenefisch
e61b3e6f43 [ruby/irb] Fix https://github.com/ruby/irb/pull/295: Ignore Java
package reference objects in
JRuby

https://github.com/ruby/irb/commit/84d030182d
2022-11-17 03:39:04 +00:00
Takashi Kokubun
a777ec0d85
YJIT: Shrink version lists after mutation (#6749) 2022-11-16 16:30:39 -08:00
Takashi Kokubun
3259aceb35
YJIT: Pack BlockId and CodePtr (#6748) 2022-11-16 15:48:46 -08:00
Takashi Kokubun
1b8236acc2
YJIT: Add compiled_branch_count stats (#6746) 2022-11-16 15:31:13 -08:00
Takashi Kokubun
6de4032e40
YJIT: Stop wrapping CmePtr with CmeDependency (#6747)
* YJIT: Stop wrapping CmePtr with CmeDependency

* YJIT: Fix an outdated comment [ci skip]
2022-11-16 15:30:29 -08:00
Takashi Kokubun
3eb7a6521c
YJIT: Shrink the vectors of Block after mutation (#6739) 2022-11-16 10:09:15 -08:00
Takashi Kokubun
05af417587
YJIT: Show YJIT build option in RUBY_DESCRIPTION (#6738)
YJIT: Show YJIT profile in RUBY_DESCRIPTION
2022-11-16 10:08:52 -08:00
Nobuyoshi Nakada
24cbc50c76 Remove duplicate .rbinc on .rb dependencies 2022-11-16 20:47:23 +09:00
S-H-GAMELINKS
1f4f6c9832 Using UNDEF_P macro 2022-11-16 18:58:33 +09:00
Nobuyoshi Nakada
dc1c4e4675 Clean extension build directories and exts.mk file 2022-11-16 18:42:46 +09:00
Nobuyoshi Nakada
be65cf5325 Remove -j option from MFLAGS for sub-makes 2022-11-16 18:42:46 +09:00
Takashi Kokubun
fca50abb7c
Let mjit-bindgen use BASERUBY and bundle/inline (#6740) 2022-11-15 23:42:41 -08:00
Takashi Kokubun
cd2da09410 MJIT: Refactor BitField dereference a little 2022-11-15 21:59:38 -08:00
Takashi Kokubun
e7443dbbca
Rewrite Symbol#to_sym and #intern in Ruby (#6683) 2022-11-15 21:34:30 -08:00
Takashi Kokubun
41b0f641ef
YJIT: Always encode Opnd::Value in 64 bits on x86_64 for GC offsets (#6733)
* YJIT: Always encode Opnd::Value in 64 bits on x86_64

for GC offsets

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>

* Introduce heap_object_p

* Leave original mov intact

* Remove unneeded branches

* Add a test for movabs

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2022-11-15 15:23:20 -08:00
Takashi Kokubun
0d384ce6e6
YJIT: Include actual memory region size in stats (#6736) 2022-11-15 15:20:02 -08:00
Takashi Kokubun
d1fb659547
YJIT: Count getivar side exits by receiver flag changes (#6735) 2022-11-15 14:50:12 -08:00
Takashi Kokubun
1125274c4e
YJIT: Invalidate redefined methods only through cme (#6734)
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2022-11-15 12:57:43 -08:00
Stan Lo
9751b54971 [ruby/irb] Improve testing infra
(https://github.com/ruby/irb/pull/442)

* Add test_in_isolation task to run tests in isolation

This simulates how tests are run in Ruby CI and can detect some issues
before they're merged and break Ruby CI later.

* Run test_in_isolation task on CI

* Fix TestRaiseNoBacktraceException's setup

https://github.com/ruby/irb/commit/51f23c58b0
2022-11-15 17:26:51 +00:00
Nobuyoshi Nakada
ac063fd4c4
Depending on revision.h with VPATH 2022-11-16 00:44:34 +09:00
Peter Zhu
5dcbe58833 Fix buffer overrun in ivars when rebuilding shapes
In rb_shape_rebuild_shape, we need to increase the capacity when
capacity == next_iv_index since the next ivar will be writing at index
next_iv_index.

This bug can be reproduced when assertions are turned on and you run the
following code:

    class Foo
      def initialize
        @a1 = 1
        @a2 = 1
        @a3 = 1
        @a4 = 1
        @a5 = 1
        @a6 = 1
        @a7 = 1
      end

      def add_ivars
        @a8 = 1
        @a9 = 1
      end
    end

    class Bar < Foo
    end

    foo = Foo.new
    foo.add_ivars
    bar = Bar.new
    GC.start
    bar.add_ivars
    bar.clone

You will get the following crash:

    Assertion Failed: object.c:301:rb_obj_copy_ivar:src_num_ivs <= shape_to_set_on_dest->capacity
2022-11-15 08:53:46 -05:00
Hiroshi SHIBATA
36dc99af5a
Added empty class for test methods in TestIRB cases 2022-11-15 20:19:43 +09:00
st0012
aecb7f6efc [ruby/irb] Deprecate USE_RELINE and USE_REIDLINE
Based on this commit: 93f87ec653

It appears that the maintainer @aycabta wanted to deprecate any `USE_*LINE` configs in favor of
`USE_MULTILINE`. So we should deprecate `USE_RELINE` as well.

https://github.com/ruby/irb/commit/478f19f3ae
2022-11-15 10:08:30 +00:00
st0012
34320d883f [ruby/irb] Deprecate reidline flags
https://github.com/ruby/irb/commit/9957e83f7d
2022-11-15 10:08:29 +00:00
st0012
4f348e482c [ruby/irb] Rename leftover Reidline references
https://github.com/ruby/irb/commit/0ed8b103ed
2022-11-15 10:08:28 +00:00
st0012
1eae15142f [ruby/irb] Remove duplicated TestInputMethod definitions
https://github.com/ruby/irb/commit/4b831d02e1
2022-11-15 10:07:32 +00:00
Takashi Kokubun
1a9e87fe3a
MJIT: Fix vm_cc_cme(cc).def.type to use bit field
access properly. Because the libclang node had two children, it wasn't
handled well by the pattern matching for the bit field case.

In addition to that, this bit field has a non-1 width. Because we're
returning true/false for a width-1 bit field, I added another behavior
that works like a char value for bit fields with width 2-8.
2022-11-15 00:34:00 -08:00
Takashi Kokubun
f500ca9b8a
Handle more MJIT compilation failures
NotImplementedError is not part StandardError, for example. When that
kind of exception happens, current_cc_unit remains not NULL, and
mjit_finish ends up waiting for 5 seconds, which is inconvenient.
2022-11-15 00:18:13 -08:00
Johnny Willemsen
2652bc3578 [ruby/racc] Update racc.gemspec
Updated homepage to https://github.com/ruby/racc
2022-11-15 08:15:19 +00:00
Takashi Kokubun
69e47b7fa6
MJIT: Remove reference to ROBJECT_EMBED_LEN_MAX
maybe not used since some shape changes?
2022-11-14 23:39:38 -08:00
Takashi Kokubun
d15d1c01c2
Rename --mjit-min-calls to --mjit-call-threshold (#6731)
for consistency with YJIT
2022-11-14 23:38:52 -08:00
Kenta Murata
c75de1e330 [ruby/bigdecimal] Add fallback definition of MAYBE_UNUSED
https://github.com/ruby/bigdecimal/commit/b2123faa52
2022-11-15 06:59:11 +00:00
David Rodríguez
c925a2ee91
Update RSpec gems 2022-11-15 14:45:51 +09:00
Kenta Murata
3c60e030b5 [ruby/bigdecimal] Replace sprintf by snprintf
https://github.com/ruby/bigdecimal/commit/d6f5bb40c7
2022-11-15 04:02:01 +00:00
Aaron Patterson
e74d82f674 Implement LDURH on Aarch64
When RUBY_DEBUG is enabled, shape ids are 16 bits.  I would like to do
16 bit comparisons, so I need to load halfwords sometimes.  This commit
adds LDURH so that I can load halfwords.

  https://developer.arm.com/documentation/ddi0596/2021-12/Base-Instructions/LDURH--Load-Register-Halfword--unscaled--?lang=en

I verified the bytes using clang:

```
$ cat asmthing.s
.global _start
.align 2

_start:
  ldurh w10, [x1]
  ldurh w10, [x1, #123]
$ as asmthing.s -o asmthing.o && objdump --disassemble asmthing.o

asmthing.o:	file format mach-o arm64

Disassembly of section __TEXT,__text:

0000000000000000 <ltmp0>:
       0: 2a 00 40 78  	ldurh	w10, [x1]
       4: 2a b0 47 78  	ldurh	w10, [x1, #123]
```
2022-11-14 17:04:50 -08:00
Takashi Kokubun
9228ae97c5
Try to let dependabot maintain the version comment
It seems like dependabot supports updating the `# vX.Y.Z` comment.
The reason why I disabled this was that it failed to update this, but
maybe it was because it had `, checking sha`. Let me try it again with
that removed.
2022-11-14 16:53:14 -08:00
Kenta Murata
3147a3900f [ruby/bigdecimal] Mark some functions MAYBE_UNUSED
https://github.com/ruby/bigdecimal/commit/d70a4d53e5
2022-11-15 00:34:23 +00:00
Nobuyoshi Nakada
5c3dba83fa
Re-order checks for colons in UTC offset 2022-11-15 09:01:29 +09:00
Aaron Patterson
b7d591643a Remove USE_RVARGC code
We don't need this constant to be exposed anymore, so remove it
2022-11-14 15:42:11 -08:00
Shohei YOSHIDA
6cd0553ab7 [rubygems/rubygems] Update comment by the review comment
https://github.com/rubygems/rubygems/commit/7c54dc56f6
2022-11-14 23:39:32 +00:00