summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2022-12-11 21:32:24 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commitbaa120ee8008a30c11066daa30cb03fcedc2e02f (patch)
tree691f9d7a3fc0be02ad74c64566f0772d1842eb60 /lib/ruby_vm/mjit/compiler.rb
parent9c2f61201786d13c08d25aafe6f150dd50819145 (diff)
Prepare a JIT buffer
Diffstat (limited to 'lib/ruby_vm/mjit/compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/compiler.rb7
1 files changed, 6 insertions, 1 deletions
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)