rubyx/lib/mom/instruction/simple_call.rb

23 lines
562 B
Ruby
Raw Normal View History

module Mom
# A SimpleCall is just that, a simple call. This could be called a function call too,
# meaning we managed to resolve the function at compile time and all we have to do is
# actually call it.
#
# As the call setup is done beforehand (for both simple and cached call), the
# calling really means just jumping to the address. Simple.
#
class SimpleCall < Instruction
attr_reader :method
2018-03-14 15:55:21 +01:00
def initialize(method)
@method = method
end
2018-03-14 15:55:21 +01:00
def to_risc(context)
Risc::Label.new(self,"SimpleCall")
end
end
end