summaryrefslogtreecommitdiff
path: root/lib/mjit
AgeCommit message (Collapse)Author
2023-03-05Fix broken rebaseTakashi Kokubun
2023-03-05Implement --mjit-statsTakashi Kokubun
2023-03-05Implement asm commentsTakashi Kokubun
2023-03-05Check interrupts on leaveTakashi Kokubun
2023-03-05Define constants for magic registersTakashi Kokubun
2023-03-05Implement callee-saved registersTakashi Kokubun
2023-03-05Consider stack_size on side exitsTakashi Kokubun
2023-03-05Rename InsnCompiler to CodegenTakashi Kokubun
because I'm not gonna limit this to insns anymore.
2023-03-05Implement initial side exitTakashi Kokubun
2023-03-05Properly return a value from the stack as wellTakashi Kokubun
2023-03-05Compile putnil properlyTakashi Kokubun
2023-03-05Encode add insn properlyTakashi Kokubun
2023-03-05Implement mov encoding properlyTakashi Kokubun
2023-03-05Split responsibilities differentlyTakashi Kokubun
2023-03-05Move modules aroundTakashi Kokubun
2023-03-05Compile a real return valueTakashi Kokubun
2023-03-05Implement --mjit-dump-disasmTakashi Kokubun
2023-03-05Implement a no-op JIT compilerTakashi Kokubun
2023-01-02Remove lib/mjit/instruction.rbTakashi Kokubun
This was accidentally re-introduced in f6620037ba1477d2c337d7b511f094d6d0fbb69c. [Bug #19298]
2022-12-24Merge RubyGems-3.4.0 and Bundler-2.4.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6987
2022-12-21Put RubyVM::MJIT::Compiler under ruby_vm directory (#6989)Takashi Kokubun
[Misc #19250] Notes: Merged-By: k0kubun <[email protected]>
2022-12-20MJIT: Refactor Compiler#cast_offset (#6967)Mau Magnaguagno
Subtract max value from offset when sign bit is set, without string operations. Notes: Merged-By: k0kubun <[email protected]>
2022-12-17MJIT: Refactor BitField dereference byte and bitmask (#6955)Mau Magnaguagno
Prefer Array#unpack1 and Enumerable#sum. I think the bitmask formula ``2 ** @width - 1`` would be clearer, but not faster for such small integers. Notes: Merged-By: k0kubun <[email protected]>
2022-12-08MJIT: Clarify jit_unit is only for MJITTakashi Kokubun
2022-12-06MJIT: Remove obsoleted MJIT countersTakashi Kokubun
2022-11-29MJIT: Revert FL_EXIVAR check optimizationTakashi Kokubun
It seems to slow down optcarrot. I'll revisit this later.
2022-11-29MJIT: Refactor CDHASH handlingTakashi Kokubun
Converting a CDHASH into a safe Hash is a lot of work, but retrieving just values is much easier.
2022-11-28MJIT: Merge exivar guards as wellTakashi Kokubun
obviating status->merge_ivar_guards_p as refactoring
2022-11-28MJIT: Get rid of is_entries copyTakashi Kokubun
MJIT worker no longer exists, so we don't need this safeguard anymore.
2022-11-28MJIT: Make it parsable by Solargraph (#6827)Takashi Kokubun
* Revert "Revert "MJIT: Make it parsable by Solargraph"" This reverts commit 8e18761da1932df88bfb6505acbda4740e1b2930. * Call rb_gc_register_mark_object Notes: Merged-By: k0kubun <[email protected]>
2022-11-28Revert "MJIT: Make it parsable by Solargraph"Takashi Kokubun
This reverts commit ccd8dd6ad395bbd9f5290e0fcb7929e5e5d36767. Revert "MJIT: Fix miniruby with MJIT_FORCE_ENABLE" This reverts commit b033775ed9d9226ba73c1d4a197e55ba89575142. GitHub Actions is failing. I ran out of time today to investigate it. will try it again tomorrow.
2022-11-27MJIT: Make it parsable by SolargraphTakashi Kokubun
2022-11-27MJIT: Do not document a dynamic type [ci skip]Takashi Kokubun
Solargraph complains about it
2022-11-27MJIT: Get rid of C.fprintfTakashi Kokubun
Faster code generation and cleaner code.
2022-11-27MJIT: Refactor invokebuiltin_delegate_leaveTakashi Kokubun
You shouldn't assume bf->compiler is always non-zero. While struct aref/aset is no longer a builtin function since https://github.com/ruby/ruby/pull/5131, it seems like you could still load such an iseq binary. The refactored code fallbacks to compile_insn_default correctly when bf->compiler is zero.
2022-11-27MJIT: Use a String buffer in builtin compilersTakashi Kokubun
instead of FILE*. Using C.fprintf is slower than String manipulation on memory. I'm going to change the way MJIT writes files, and this is a prerequisite for it.
2022-11-27MJIT: Move some private declarationsTakashi Kokubun
and clean up legacy comments for the Ruby migration
2022-11-26MJIT: Remove a duplicated rescueTakashi Kokubun
`#compile` has a catch-call rescue, so compile_insn_entry shouldn't do that. It was a temporary code needed during the migration.
2022-11-25MJIT: Refactor source_shape_id extractionTakashi Kokubun
I'm not comfortable indenting code that deeply.
2022-11-25MJIT: Remove obsoleted variableTakashi Kokubun
no longer used after 4ea9d7d7c223ff92365c4a013fc1bd073d67a3a5
2022-11-25MJIT: Remove the code to optimize shape transitionTakashi Kokubun
because this code crashes on railsbench. I'll try adding a repro for it later, but I don't know shapes enough to craft it right away.
2022-11-15MJIT: Refactor BitField dereference a littleTakashi Kokubun
2022-11-15MJIT: Fix vm_cc_cme(cc).def.type to use bit fieldTakashi Kokubun
access properly. Because the libclang node had two children, it wasn't handled well by the pattern matching for the bit field case. In addition to that, this bit field has a non-1 width. Because we're returning true/false for a width-1 bit field, I added another behavior that works like a char value for bit fields with width 2-8.
2022-11-15Handle more MJIT compilation failuresTakashi Kokubun
NotImplementedError is not part StandardError, for example. When that kind of exception happens, current_cc_unit remains not NULL, and mjit_finish ends up waiting for 5 seconds, which is inconvenient.
2022-11-14MJIT: Remove reference to ROBJECT_EMBED_LEN_MAXTakashi Kokubun
maybe not used since some shape changes?
2022-11-14Remove USE_RVARGC codeAaron Patterson
We don't need this constant to be exposed anymore, so remove it Notes: Merged: https://github.com/ruby/ruby/pull/6728
2022-11-13Fix invokebuiltin in Ruby MJITTakashi Kokubun
https://github.com/ruby/ruby/blob/45fe7f757522ed7d1d3ec754da59d41d45dd6bab/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb#L21 has not been ported correctly.
2022-11-10Remove numiv from RObjectJemma Issroff
Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-10-13Only expose Ruby Shape API if VM_CHECK_MODE is enabledAaron Patterson