| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
|
|
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add RUBY_YJIT_ENABLE env var and YJIT_FORCE_ENABLE compile-time constant.
Rename YJIT_STATS to RUBY_YJIT_STATS.
|
|
I did a `git diff --stat` against upstream and looked at all the files
that are outside of YJIT to come up with these minor changes.
|
|
Since this file is exposed to the rest of the codebase and they don't
really need to know about things like PLATFORM_SUPPORTED_P.
|
|
The new backend isn't used at the moment and adds to our diff against
upstream so remove it for now. We can reverse the removal later with git
history.
|
|
Most of these are vestiges of our old setup where we hack into the
interpreter loop.
|
|
We were exporting a couple of symbols in yjit.h because they could be
used by code generated by MJIT. We don't want MJIT calling into YJIT
code anyways so let's stop exporting them to libruby.so.
Also adjust indentation and comments in mjit_exec().
|
|
YJIT should be able to pass this check now.
|
|
For upstreaming, we want functions we export either prefixed with "rb_"
or made static. Historically we haven't been following this rule, so we
were "leaking" a lot of symbols as `make leak-globals` would tell us.
This change unifies everything YJIT into a single compilation unit,
yjit.o, and makes everything unprefixed static to pass `make leak-globals`.
This manual "unified build" setup is similar to that of vm.o.
Having everything in one compilation unit allows static functions to
be visible across YJIT files and removes the need for declarations in
headers in some cases. Unnecessary declarations were removed.
Other changes of note:
- switched to MJIT_SYMBOL_EXPORT_BEGIN which indicates stuff as being
off limits for native extensions
- the first include of each YJIT file is change to be "internal.h"
- undefined MAP_STACK before explicitly redefining it since it
collide's with a definition in system headers. Consider renaming?
|
|
|
|
We need to reconstruct interpreter state before calling into the
routines to be able to raise exceptions. I'm getting a crash in
debug build with:
make test-all 'TESTS=test/ruby/variable.rb' RUN_OPTS='--yjit-call-threshold=1 --yjit-max-versions=1'
|
|
|
|
|
|
|
|
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
|
|
|
reflect its current condition
|
|
This is so we know the specific reason we're exiting this instruction.
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
|
|
|
|
|
|
Case labels get half an indent and the opening brace is on the same line
as "switch".
|
|
|
|
|
|
The old heap object check is not as efficient as the one in
jit_guard_known_klass(). Also, the old code saves cfp->sp after popping
the operands off the stack, which might cause the operands to be not
marked by the GC in some circumstances.
|
|
|
|
|
|
When calling "to_s" on an instance of String, the method simply returns
self. In this situation most of the work comes from setting up the
method call. It turns out that both railsbench and liquid-render do this
a lot.
When generating code for opt_send_without_block, we already generate a
known class guard, so we can detect when the receiver is a String
instance. Since gen_send_cfunc() is also used for gen_invokesuper(), and
gen_invokesuper() doesn't generate a known class guard, a new nullable
parameter for specialized codegen function is added.
Closes GH-245
|
|
|
|
It could raise ractor exceptions. The included test didn't run properly
before this change.
|
|
Instead of loading from meory for REG_SP, do a register rename instead.
It's cheaper.
|
|
I noticed that there were two st_table iterators that do exactly the
same thing so I merged them into one.
|