* This is also faster than calling pm_encoding_utf_8_alpha_char/pm_encoding_utf_8_alnum_char
as those compute the character width and do extra checks.
https://github.com/ruby/prism/commit/4cb276ac4c
Previously, this would push the provided keywords onto the argument
splat. Add ruby2_keywords to the list of other checks for whether
it is safe for treating a given splat as mutable when the called
method accepts an anonymous splat.
Before this commit, we were mixing a lot of concerns with the prism
compile between RubyVM::InstructionSequence and the general entry
points to the prism parser/compiler.
This commit makes all of the various prism-related APIs mirror
their corresponding APIs in the existing parser/compiler. This means
we now have the correct frame naming, and it's much easier to follow
where the logic actually flows. Furthermore this consolidates a lot
of the prism initialization, making it easier to see where we could
potentially be raising errors.
with these guards in YJIT.
The previous commit was to fix "conflict" between two PRs, but I
actually wanted to use it here, which is why I filed the other one.
* YJIT: Add jit_prepare_for_gc function
* s/jit_prepare_routine_call/jit_prepare_non_leaf_call/
* s/jit_prepare_for_gc/jit_prepare_call_with_gc/
* Use jit_prepare_call_with_gc for leaf builtin
This reverts commit 7ded31d36dc78c1495b03a45ec1a3235fdd81f1e.
I was told from Travis CI support that their infra team has deployed a fix for
the issue we encountered with the s390x build environment.
File.expand_path leaks the dir if the encodings are not compatible.
For example:
Encoding.default_external = Encoding::UTF_16BE
10.times do
100_000.times do
File.expand_path("./a")
rescue
end
puts `ps -o rss= -p #{$$}`
end
Before:
12288
15488
18656
21872
25056
28240
31392
34688
37856
41056
After:
9680
9728
9728
9792
9792
9792
9792
9792
9792
* YJIT: Specialize splatkw on T_HASH
* Fix a typo
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Fix a few more comments
---------
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Previously, this would use newarray followed by concattoarray.
This now uses pushtoarray instead, avoiding the unnecessary
array allocation.
This is implemented by making compile_array take a first_chunk
argument, passing in 1 in the normal array case, and 0 in the
ARGSCAT with LIST body case.
Previously the code assigns `handler` function pointer, which accepts
one argument, to `sigact.sa_sigaction`, which accepts three argument.
This mismatch is not allowed in Wasm.
I don't see the reason to use `sa_sigaction` here, so this change
assigns to `sa_handler`, which accepts one argument, in Wasm.