summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-20More simple bootstrap tests for kwargsKevin Newton
2021-10-20else if styleAlan Wu
2021-10-20Update yjit_codegen.cMaxime Chevalier-Boisvert
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2021-10-20Update yjit_codegen.cMaxime Chevalier-Boisvert
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2021-10-20Feedback, tests, and rebase for kwargsKevin Newton
2021-10-20Bail out if passing keyword arguments to only positional and/or optional methodsKevin Newton
2021-10-20Set up the callee stack pointer properly taking into account the bits objectKevin Newton
2021-10-20Correct for positional required argumentsKevin Newton
2021-10-20Push the unspecified_bits_value onto the stackKevin Newton
2021-10-20Reuse stack swapping logicKevin Newton
2021-10-20Get kwargs reordering workingKevin Newton
2021-10-20Get kwargs working for all passed in the correct orderKevin Newton
2021-10-20YJIT_STATS instead of RUBY_DEBUG for --yjit-stats in help printoutAlan Wu
2021-10-20Say YJIT is disabled by default in ruby --helpAlan Wu
2021-10-20Style fix in ruby.cAlan Wu
2021-10-20Enable leaked global tests in YJIT workflowsAlan Wu
2021-10-20Correct workflow name for YJIT UbuntuAlan Wu
2021-10-20Try turning off test-bundler-parallel to see if that fixes all the build errorsNoah Gibbs
2021-10-20Don't enable YJIT by default. More tests on both Ubuntu and MacOS.Noah Gibbs
Add RUBY_YJIT_ENABLE env var and YJIT_FORCE_ENABLE compile-time constant. Rename YJIT_STATS to RUBY_YJIT_STATS.
2021-10-20Cleanup diff against upstream. Add commentsAlan Wu
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.
2021-10-20Move YJIT internal macros away from yjit.h. Tweak styleAlan Wu
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.
2021-10-20Remove yjit_backend to help with upstreamingAlan Wu
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.
2021-10-20Cleanup iseq.c minimize diff with upstreamAlan Wu
Most of these are vestiges of our old setup where we hack into the interpreter loop.
2021-10-20Tweak mjit_exec() to remove YJIT symbol exportsAlan Wu
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().
2021-10-20Re-enable leaked global checkAlan Wu
YJIT should be able to pass this check now.
2021-10-20Put YJIT into a single compilation unitAlan Wu
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?
2021-10-20Remove unused functionAlan Wu
2021-10-20Fix gen_getclassvariableAlan Wu
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'
2021-10-20Fix counter names for getblockparamproxy. Print in --yjit-stats.Maxime Chevalier-Boisvert
2021-10-20Reduce line length for YJIT option descriptionsNoah Gibbs
2021-10-20Document YJIT options in --helpNoah Gibbs
2021-10-20Implement getclassvariable in yjiteileencodes
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2021-10-20Move Ruby's README back where it wasNoah Gibbs
2021-10-20Move YJIT's README into doc/yjit/yjit.mdNoah Gibbs
2021-10-20Incorporate feedback from the PR into yjit_hacking.mdNoah Gibbs
2021-10-20Add a YJIT hacking doc with some internals; change the README text a bit to ↵Noah Gibbs
reflect its current condition
2021-10-20Add counted side exit to getblockparamproxyeileencodes
This is so we know the specific reason we're exiting this instruction. Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
2021-10-20Fix changes from rebaseNoah Gibbs
2021-10-20style: line break before "else"Alan Wu
2021-10-20style: switch statements indentAlan Wu
Case labels get half an indent and the opening brace is on the same line as "switch".
2021-10-20style: align pointer "*" to the rightAlan Wu
2021-10-20Add optimized Thread.currentJohn Hawthorn
2021-10-20Use jit_guard_known_klass() for hashes in opt_arefAlan Wu
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.
2021-10-20Also do String#strAlan Wu
2021-10-20Comment edits and moving functions around in the fileAlan Wu
2021-10-20Add specialization for String#to_s on plain stringsAlan Wu
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
2021-10-20Try to get getblockparamproxy to support level > 0Maxime Chevalier-Boisvert
2021-10-20Reconstruct interpreter state before calling rb_ivar_get()Alan Wu
It could raise ractor exceptions. The included test didn't run properly before this change.
2021-10-20Remove a memory load in gen_send_iseqAlan Wu
Instead of loading from meory for REG_SP, do a register rename instead. It's cheaper.
2021-10-20Add counters for version invalidation reasonsAlan Wu
I noticed that there were two st_table iterators that do exactly the same thing so I merged them into one.