move function call instruction to register level and the pass to arm
This commit is contained in:
parent
1af66567fb
commit
a083c03b1d
12
lib/register/instructions/function_call.rb
Normal file
12
lib/register/instructions/function_call.rb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
module Register
|
||||||
|
# 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 method
|
||||||
|
@method = method
|
||||||
|
end
|
||||||
|
attr_reader :method
|
||||||
|
end
|
||||||
|
end
|
@ -18,11 +18,4 @@ module Virtual
|
|||||||
attr_reader :name , :me , :args
|
attr_reader :name , :me , :args
|
||||||
end
|
end
|
||||||
|
|
||||||
class FunctionCall < Instruction
|
|
||||||
def initialize method
|
|
||||||
@method = method
|
|
||||||
end
|
|
||||||
attr_reader :method
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user