diff options
author | Takashi Kokubun <[email protected]> | 2023-04-02 23:34:57 -0700 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-04-02 23:37:15 -0700 |
commit | d876c008ecb823a042021bebdb6667ff0c8ff028 () | |
tree | 4a66d1addd5f7fa51218648cf31e5daf97096b3b | |
parent | 3bacc3877a8d61a2e66f6b9d874a60f3be0e7f53 (diff) |
RJIT: Limit the number of versions per block
-rw-r--r-- | lib/ruby_vm/rjit/compiler.rb | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -34,6 +34,10 @@ module RubyVM::RJIT # Mark objects in this Array during GC GC_REFS = [] class Compiler attr_accessor :write_pos @@ -277,6 +281,7 @@ module RubyVM::RJIT # @param asm [RubyVM::RJIT::Assembler] def compile_block(asm, jit:, pc:, ctx: Context.new) # Mark the block start address and prepare an exit code storage block = Block.new(iseq: jit.iseq, pc:, ctx: ctx.dup) jit.block = block asm.block(block) @@ -346,6 +351,32 @@ module RubyVM::RJIT end end def list_blocks(iseq, pc) rjit_blocks(iseq)[pc] end |