summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/context.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-01-02 22:53:14 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commita8dec34961d7734ad975e44efa8aae361a1c4f5a (patch)
tree5849c716f37c959d9276ddb8c598fe1142a7f6fa /lib/ruby_vm/mjit/context.rb
parent21696ad81ec40cf9cd146836dc8c945f1e485774 (diff)
Implement initial opt_lt
Diffstat (limited to 'lib/ruby_vm/mjit/context.rb')
-rw-r--r--lib/ruby_vm/mjit/context.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ruby_vm/mjit/context.rb b/lib/ruby_vm/mjit/context.rb
index 8433cc5f95..2799b63eb3 100644
--- a/lib/ruby_vm/mjit/context.rb
+++ b/lib/ruby_vm/mjit/context.rb
@@ -2,14 +2,14 @@ class RubyVM::MJIT::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
)
- def initialize(*)
- super
- self.stack_size ||= 0
- self.sp_offset ||= 0
- end
+ def initialize(stack_size: 0, sp_offset: 0) = super
def stack_push(size)
self.stack_size += size
self.sp_offset += size
end
+
+ def stack_pop(size)
+ stack_push(-size)
+ end
end