Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge commits from ruby/master into yjit_backend_ir #406

Merged
merged 45 commits into from
Aug 16, 2022

Conversation

maximecb
Copy link

No description provided.

jeremyevans and others added 30 commits August 10, 2022 13:02
This reverts commit 2727815 and
58dc8bf.

Visibility is an attribute of the method entry in a class, not an
attribute of the Method object.

Fixes [#18729]
Fixes [#18751]
Fixes [#18435]
Since `RUBY_DEVEL` in cppflags has no effect in the configure script
and makefiles.
exts.mk files are one level under the top of extension directories.
Clean built directories by `make distclean`, and then clean leftover
makefiles for skipped extensions.
* Fix Array#[] with ArithmeticSequence with negative steps

Previously, Array#[] when called with an ArithmeticSequence
with a negative step did not handle all cases correctly,
especially cases involving infinite ranges, inverted ranges,
and/or exclusive ends.

Fixes [Bug #18247]

* Add Array#slice tests for ArithmeticSequence with negative step to test_array

Add tests of rb_arithmetic_sequence_beg_len_step C-API function.

* Fix ext/-test-/arith_seq/beg_len_step/depend

* Rename local variables

* Fix a variable name

Co-authored-by: Kenta Murata <[email protected]>
This is an inelegant hack, by manually checking for this specific
code point in rb_str_inspect.  Some testing indicates that this is
the only code point affected.

It's possible a better fix would be inside of lower-level encoding
code, such that rb_enc_isprint would return false and not true for
codepoint 0x85.

Fixes [Bug #16842]
`RbInstall::GemInstaller#build_extensions` has nothing to do.
As commented in include/ruby/internal/abi.h, since teeny versions of
Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role
in released versions of Ruby.
This patch is suggested by nobu.

Benchmark result:

```
require 'benchmark'

n = 10 ** 7

Benchmark.bm do |x|
  x.report("Fixnum/Fixnum") { a, b = 5, 2; n.times { a.ceildiv(b) } }
  x.report("Bignum/Bignum") { a, b = 10**100, 10**99 - 1; n.times { a.ceildiv(b) } }
  x.report("Bignum/Fixnum") { a, b = 10**100, 3; n.times { a.ceildiv(b) } }
end
```

Original:

```
       user     system      total        real
Fixnum/Fixnum  3.340009   0.043029   3.383038 (  3.384022)
Bignum/Bignum  8.229500   0.118543   8.348043 (  8.349574)
Bignum/Fixnum  8.328971   0.097842   8.426813 (  8.426952)
```

Improved:

```
       user     system      total        real
Fixnum/Fixnum  0.699140   0.000961   0.700101 (  0.700199)
Bignum/Bignum  5.076165   0.083160   5.159325 (  5.159360)
Bignum/Fixnum  5.548684   0.115372   5.664056 (  5.666735)
```
`Ripper::Lexer#parse` re-parses the source code with syntax errors
when `raise_errors: false`.

Co-Authored-By: tompng <[email protected]>
@maximecb
Copy link
Author

@XrXr the test if YJIT is supported or not got messed up in the merge since the upstream changes touched that too 🤔

@k0kubun
Copy link
Member

k0kubun commented Aug 16, 2022

I think Nobu's change makes sense, and we could just fix the build failure like this 0e74ffe.

Though, looking at the original code, I'm not sure if we've supported (defined(_WIN32) && defined(_M_AMD64). Do we support the ABI of Windows as of today?

#if (defined(__x86_64__) && !defined(_WIN32)) || (defined(_WIN32) && defined(_M_AMD64)) // x64 platforms without mingw/msys

@maximecb maximecb enabled auto-merge (squash) August 16, 2022 20:17
@maximecb maximecb merged commit fcda66f into yjit_backend_ir Aug 16, 2022
@maximecb maximecb deleted the yjit_ir_merge branch August 16, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.