summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-20Compile out declaration for runtime stats on non stats buildsAlan Wu
Checked on default build, RUBY_DEBUG build, and YJIT_STATS build.
2021-10-20Don't store cfp->pc when doing iseq callsAlan Wu
We set it before calling routines and when we are exiting.
2021-10-20No need to do ec->cfp = reg_cfp on exitsAlan Wu
It's already up to date. We set it when we do iseq calls and it's set properly on entry. If it's not set properly exceptions wouldn't work.
2021-10-20Update suggested ./configure in READMEMaxime Chevalier-Boisvert
2021-10-20Fix warnings about redefining YJIT_STATSAlan Wu
Follow up for ecb5b383a0c17550b9b27663005049ddac871edb. Now that YJIT_STATS is defined in yjit.h, it shoudl be the only place that defines it.
2021-10-20Add missing percent sign in printoutMaxime Chevalier-Boisvert
2021-10-20Add tests against side exits for non-fixnumJohn Hawthorn
2021-10-20Check for comptime fixnum in gen_fixnum_cmpJohn Hawthorn
2021-10-20Check for comptime fixnums in opt_and and opt_orJohn Hawthorn
2021-10-20Check for comptime integers in opt_plus and opt_minusJohn Hawthorn
2021-10-20Move forward declaration upJohn Hawthorn
2021-10-20Fix misplaced ivar_set_method exit counterMaxime Chevalier-Boisvert
2021-10-20Include errno message in mmap failure outputJean Boussier
It might help figure out why it is failing.
2021-10-20Skip opt_case_dispatchJohn Hawthorn
2021-10-20Add comments to getspecialJohn Hawthorn
2021-10-20Add comments for new functionAaron Patterson
2021-10-20only compile for T_OBJECT typesAaron Patterson
2021-10-20Refactor attrset to use a functionAaron Patterson
This new function will do the write barrier / resize the object / check frozen for us
2021-10-20Fix opt_eq for overridden equalityJohn Hawthorn
2021-10-20Revert "disable yjit when testing mjit"Aaron Patterson
This reverts commit e8622ce5c0a09c7213e4d536ddd0ef3ea68377ef.
2021-10-20is this right?Aaron Patterson
2021-10-20Don't check MJIT if it's not enabledAaron Patterson
2021-10-20Disable YJIT by default if MJIT_FORCE_ENABLE is onAaron Patterson
Compile time flag seems pretty forceful, so let MJIT turn on by default if it is used.
2021-10-20disable MJIT when --enable-all is setAaron Patterson
2021-10-20Implement getspecialJohn Hawthorn
2021-10-20Fix avg_len_in_yjitAlan Wu
We weren't counting completing an entire method in YJIT as exits so the avg_len_in_yjit for ./miniruby --yjit-call-threshold=1 --yjit-stats -e'def foo; end; foo' was infinite.
2021-10-20Deduplicate side exitsAlan Wu
Send instructions currently generate the exact same side exit twice. Cache the exit the first time we generate it. Also add a comment explaining what side exits do. Closes GH-117.
2021-10-20Info for Fedora and choosing C compilerBenson Muite
2021-10-20Add rb_darray_clear() for Kevin. Fix some warnings.Maxime Chevalier-Boisvert
2021-10-20Add fixes for feedbackAaron Patterson
2021-10-20Use C_ARG_REGS earlierJohn Hawthorn
2021-10-20Add tests against opt_eq side exitsJohn Hawthorn
2021-10-20Remove rb_opt_equality_specializedJohn Hawthorn
2021-10-20String and fixnum equalityJohn Hawthorn
2021-10-20Use method dispatch for opt_eqJohn Hawthorn
2021-10-20Add jit_rb_obj_equalJohn Hawthorn
2021-10-20Count interpreter instructions when -DYJIT_STATS=1Alan Wu
The interpreter instruction count was enabled based on RUBY_DEBUG as opposed to YJIT_STATS. In builds with YJIT_STATS=1 but RUBY_DEBUG=0, the count was not available. Move YJIT_STATS in yjit.h where declarations are expoed to code outside of YJIT. Also reduce the changes made to the interpreter for calling into YJIT's instruction counting function.
2021-10-20Update README.mdMaxime Chevalier-Boisvert
2021-10-20disable yjit when testing mjitAaron Patterson
2021-10-20Update ruby.cMaxime Chevalier-Boisvert
2021-10-20Exit if YJIT and MJIT are both enabledAaron Patterson
YJIT and MJIT can't be running in the same process otherwise they'll clobber each other. We should show an error and exit if they're both enabled.
2021-10-20Prevent stats being enabled late at run-timeMaxime Chevalier-Boisvert
2021-10-20Exit when the object is frozenAaron Patterson
Exit when the object is frozen, also add tests
2021-10-20Add a write barrier to ivar setAaron Patterson
We need to fire the write barrier during ivar set. This function extracts the write barrier function then calls it. Co-Authored-By: John Hawthorn <john@hawthorn.email>
2021-10-20Implement setivar method callseileencodes
2021-10-20Allow calling variadic cfuncs with many argsJohn Hawthorn
We have a check to ensure we don't have to push args on the stack to call a cfunc with many args. However we never need to use the stack for variadic cfuncs, so we shouldn't care about the number of arguments.
2021-10-20Add codegen for rb_true and rb_falseJohn Hawthorn
These are used by .nil? and therefore opt_nil_p
2021-10-20Allow special case of expandarray with nilJohn Hawthorn
2021-10-20Shave a few instructions off of leaveAlan Wu
The code path for leave that returns to the interpreter (gen_leave() -> yjit_gen_leave_exit()) used to have the logic: ``` cfp->sp++; cfp->sp[-1] = return_val; cfp->sp--; return return_val; ``` The SP changes it made was unnecessary and this change removes it. After this change, `leave` doesn't adjust the `cfp->sp` of the caller and only writes `cfp->sp[0]`. To accomodate this in the JIT-to-JIT return case, return stubs have an `sp_offset` of 1. The change removes sp adjustment from the JIT-to-JIT return case, too, making it more efficient. Also, since the C method case of `send` has an `sp_offset` of 1 after the call, this change enables block version sharing.
2021-10-20Use reg1 in GEN_COUNTER_INC to avoid clobbering RAXAlan Wu