We observed that this test randomly fails in the ruby/ruby Travis ppc64le case.
This commit is to pend the test_generate if the assertion for the generated
file's modified time fails in a ppc64le environment.
Note that I didn't use the word "Travis CI" or Travis CI specific environment variables
such as `TRAVIS` and `TRAVIS_CPU_ARCH`[1] in the code. Because I wanted to prioritize the
rdoc's independence from the ruby/ruby.
[1] https://docs.travis-ci.com/user/environment-variables/#default-environment-variables42cdad1cf2
Previously emitting a call node with an argument followed by another
node would cause the argument to be mistakenly omitted from the argument
list causing a stack underflow.
```
PRISM: **************************************************
-- raw disasm--------
0000 putself ( 0)
0001 send <calldata:puts, 1>, nil ( 0)
* 0004 pop ( 0)
0005 putobject 1 ( 0)
0007 leave ( 0)
---------------------
```
Unfortunately, 84dfa0fa5e introduced
a bug where we were no longer testing the "popped" case because the
"; 1" meant to be appended to the source was no longer functioning
as intended.
This commit re-introduces the popped case, and comments out all
now failing tests.
Prior to this commit, KeywordParameterNode included both optional
and required keywords. With this commit, it is split in two, with
`OptionalKeywordParameterNode`s no longer having a value field.
89084d9af4
`remove_shape_recursive` wasn't considering that if we run out of
shapes, it might have to transition to SHAPE_TOO_COMPLEX.
When this happens, we now return with an error and the caller
initiates the evacuation.
We weren't taking in to account that objects with generic IV tables
could go "too complex" in the IV set code. This commit takes that in to
account and also ensures FL_EXIVAR is set when a geniv object
transitions to "too complex"
Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
For static analysis, it’s better to keep unused literal nodes.
If simply change `block_append` to fall through, both "unused literal ignored"
and "possibly useless use of a literal in void context" warnings
are shown for the same line. But it’s verbose then remove
"unused literal ignored" warning.
This kind of optimization is already implemented on compile.c.
`compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK
has next.
Add a new API rb_profile_thread_frames(), which is essentialy a
per-thread version of rb_profile_frames().
While the original rb_profile_frames() always returns results about the
current active thread obtained by GET_EC(), this new API takes a Thread
to be profiled as an argument.
This should come in handy when profiling I/O-bound programs such as
webapps, since this new API allows us to learn about Threads performing
I/O (which do not have the GVL).
Profiling worker threads (such as Sidekiq workers) may be another
application.
Implements [Feature #10602]
Co-authored-by: Mike Perham <mike@perham.net>