summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/context.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-03-06 22:35:38 -0800
committerTakashi Kokubun <[email protected]>2023-03-06 23:44:01 -0800
commiteaccdc1941304d6273397b21c25213174d892185 (patch)
tree93a2ab9455ccf56c55cd01370007703d75b80627 /lib/ruby_vm/mjit/context.rb
parent854546fcc468fc6a49588bdbf6df77aa185493a1 (diff)
Rename MJIT filenames to RJIT
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7462
Diffstat (limited to 'lib/ruby_vm/mjit/context.rb')
-rw-r--r--lib/ruby_vm/mjit/context.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/ruby_vm/mjit/context.rb b/lib/ruby_vm/mjit/context.rb
deleted file mode 100644
index e834b42999..0000000000
--- a/lib/ruby_vm/mjit/context.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module RubyVM::MJIT
- class Context < Struct.new(
- :stack_size, # @param [Integer] The number of values on the stack
- :sp_offset, # @param [Integer] JIT sp offset relative to the interpreter's sp
- :chain_depth, # @param [Integer] jit_chain_guard depth
- )
- def initialize(stack_size: 0, sp_offset: 0, chain_depth: 0) = super
-
- def stack_push(size = 1)
- self.stack_size += size
- self.sp_offset += size
- stack_opnd(0)
- end
-
- def stack_pop(size = 1)
- opnd = stack_opnd(0)
- self.stack_size -= size
- self.sp_offset -= size
- opnd
- end
-
- def stack_opnd(depth_from_top)
- [SP, C.VALUE.size * (self.sp_offset - 1 - depth_from_top)]
- end
-
- def sp_opnd(offset_bytes = 0)
- [SP, (C.VALUE.size * self.sp_offset) + offset_bytes]
- end
- end
-end