rubyx/lib/risc/instructions/function_call.rb
Torsten Ruger a350325b6b fix function call and simple call logic
Before creating DynamicJump, the FunctionCall got a register for a
possible jump address. Now that is handled by DynamicJump and
FunctionCall just needs the method, from which it determines the
binaryCode address
2018-05-19 12:21:20 +03:00

23 lines
460 B
Ruby

module Risc
# name says it all really
# only arg is the method object we want to call
# assembly takes care of the rest (ie getting the address)
class FunctionCall < Instruction
def initialize( source , method)
super(source)
@method = method
end
attr_reader :method
def to_s
class_source method.name
end
end
def self.function_call( source , method )
Risc::FunctionCall.new( source , method )
end
end