From baa120ee8008a30c11066daa30cb03fcedc2e02f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 11 Dec 2022 21:32:24 -0800 Subject: Prepare a JIT buffer --- lib/ruby_vm/mjit/compiler.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/ruby_vm/mjit') diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb index 7aea23595c..cb2930246a 100644 --- a/lib/ruby_vm/mjit/compiler.rb +++ b/lib/ruby_vm/mjit/compiler.rb @@ -1,7 +1,12 @@ class RubyVM::MJIT::Compiler + C = RubyVM::MJIT.const_get(:C, false) INSNS = RubyVM::MJIT.const_get(:INSNS, false) - def initialize = freeze + # @param mem_block [Integer] JIT buffer address + def initialize(mem_block) + @mem_block = mem_block + @write_pos = 0 + end # @param iseq [RubyVM::MJIT::CPointer::Struct] def compile(iseq) -- cgit v1.2.3