summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-21Move the test fileNobuyoshi Nakada
2021-10-21Fix for out-of-place buildNobuyoshi Nakada
2021-10-21Suppress warningsNobuyoshi Nakada
2021-10-20Fix tests with cppflags=-DYJIT_FORCE_ENABLETakashi Kokubun
https://github.com/ko1/build-ruby/commit/0dbd95c6250594b6ddadc3c4424b071704083187
2021-10-20Add bit about YJIT to NEWS.mdMaxime Chevalier-Boisvert
Notes: Merged: https://github.com/ruby/ruby/pull/4997
2021-10-21* append newline at EOF. [ci skip]git
2021-10-20YJIT: Show GCC that the mmap probing loop runs at least onceAlan Wu
Fixes: ./src/yjit_asm.c:196:8: warning: 'mem_block' may be used uninitialized [-Wmaybe-uninitialized]
2021-10-20Fix non RUBY_DEBUG build warningsAlan Wu
On non RUBY_DEBUG builds, assert() compiles to nothing and the compiler warns about uninitialized variables in those code paths. Replace those asserts with rb_bug() to fix the warnings and do the assert in all builds. Since yjit_asm_tests.c compiles outside of Ruby, it needed a distinct version of rb_bug(). Also put YJIT_STATS check for function delcaration that is only defined in YJIT_STATS builds.
2021-10-20Do kwarg shuffle after checking for interruptsAlan Wu
Previously, we were shuffling keyword arguments before checking for interrupts. In the case that we side exit in the interrupt check, we left the interpreter with an already-shuffled argument list for the call, resulting in a double shuffle, leaving the locals in the wrong order for the callee. Do keyword shuffling after all the possible side exits. Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2021-10-20YJIT: check machine arch before enablingAlan Wu
So we don't try to run x64 on ARM.
2021-10-20Extract yjit_force_iv_index and make it work when object is frozenAlan Wu
In an effort to simplify the logic YJIT generates for accessing instance variable, YJIT ensures that a given name-to-index mapping exists at compile time. In the case that the mapping doesn't exist, it was created by using rb_ivar_set() with Qundef on the sample object we see at compile time. This hack isn't fine if the sample object happens to be frozen, in which case YJIT would raise a FrozenError unexpectedly. To deal with this, make a new function that only reserves the mapping but doesn't touch the object. This is rb_obj_ensure_iv_index_mapping(). This new function superceeds the functionality of rb_iv_index_tbl_lookup() so it was removed. Reported by and includes a test case from John Hawthorn <john@hawthorn.email> Fixes: GH-282
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Doc: remove outdated note about hooking into the interpreterAlan Wu
DAE remember MicroJIT?
2021-10-20Move test_yjit_asm.sh into miscAlan Wu
Since conventionally scripts don't live at the top level of the repo.
2021-10-20Add comments about special runtime routines YJIT callsAlan Wu
When YJIT make calls to routines without reconstructing interpreter state through jit_prepare_routine_call(), it relies on the routine to never allocate, raise, and push/pop control frames. Comment about this on the routines that YJTI calls. This is probably something we should dynamically verify on debug builds. It's hard to statically verify this as it requires verifying all functions in the call tree. Maybe something to look at in the future.
2021-10-20Actually, tabs are okay in MakefileAlan Wu
2021-10-20Expand tabsAlan Wu
2021-10-20Update dependenciesAlan Wu
2021-10-20Match the main-branch location of yjit in inits.cNoah Gibbs
2021-10-20Fix indentation in ruby.cAlan Wu
2021-10-20Warn when trying to use YJIT in --disable-jit-support buildsAlan Wu
2021-10-20Show --yjit in help messageAlan Wu
2021-10-20Improve YJIT command line option parsingAlan Wu
Previously, options such as "--yjit123" would enable YJIT. Additionally, the error message for argument parsing mentioned "--jit-..." instead of "--yjit-...".
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Revert "Disable YJIT while running MJIT tests (#62)"Alan Wu
This reverts commit 60f3f25cc421b75b3dbf02fef759c4857bf3ef46. We don't need to pass --disable-yjit when running MJIT tests anymore because we are off by default.
2021-10-20Simplify code for YJIT const cache in compile.cAlan Wu
Since opt_getinlinecache and opt_setinlinecache point to the same cache struct, there is no need to track the index of the get instruction and then store it on the cache struct later when processing the set instruction. Setting it when processing the get instruction works just as well. This change reduces our diff.
2021-10-20Mention YJIT in Capstone autoconf checkAlan Wu
2021-10-20Minimize diff in existing workflow filesAlan Wu
2021-10-20Add String#bytesizeeileencodes
Fixes: https://github.com/Shopify/yjit/issues/258 Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
2021-10-20Use env var to turn on YJIT for test-bundled-gemsAlan Wu
tool/test-bundled-gems.rb use sub processes for testing bundled gems and doesn't support RUN_OPTS. We weren't enabling YJIT for these tests. Use an include config with RUBY_YJIT_ENABLE to turn on YJIT for these tests. Note that we only test with the default call threshold in this setup, which is the same as before YJIT was off by defauft. The --yjit-call-threshold command line was never passed to the tests.
2021-10-20Remove YJIT CI configs for tests make check runsAlan Wu
"make check" runs "make test-spec" and "make test-all", so they don't need to be individual elements of the matrix.
2021-10-20Turn on YJIT for repeat-count=2 runs through env varAlan Wu
It wasn't on at all before... Since it's a snowflake "include" matrix element, might as well test the env var with it.
2021-10-20Turn on YJIT in macOS workflowAlan Wu
It wasn't on at all and the printout of RUBY_DESCRIPTION at the end of `make check` wasn't saying +YJIT.
2021-10-20Show +YJIT in version string and RUBY_DESCRIPTIONAlan Wu
There might be code out there that expect `ruby -v` to print only one line. Since MJIT shows +JIT in `ruby -v` and RUBY_DESCRIPTION, let's show +YJIT. The crash report doesn't show anything about MJIT, so adjust the test. The "test_ruby_version" test was unaware of RUBY_YJIT_ENABLE and so was failing when the variable is set and inherited into the children processes it spawns. Explicitly unset the variable in the test.
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