summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/mjit/context.rb')
-rw-r--r--lib/ruby_vm/mjit/context.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ruby_vm/mjit/context.rb b/lib/ruby_vm/mjit/context.rb
index 2bc499cd4e..8433cc5f95 100644
--- a/lib/ruby_vm/mjit/context.rb
+++ b/lib/ruby_vm/mjit/context.rb
@@ -1,8 +1,15 @@
class RubyVM::MJIT::Context < Struct.new(
- :stack_size, # @param [Integer]
+ :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 stack_push(size)
+ self.stack_size += size
+ self.sp_offset += size
end
end