add FunctionCall instruction and the missing puts (stub)
This commit is contained in:
@ -34,7 +34,7 @@ module Virtual
|
||||
end
|
||||
|
||||
# replace a code with an array of new codes. This is what happens in passes all the time
|
||||
def replace_with code , new_codes
|
||||
def replace code , new_codes
|
||||
index = @codes.index code
|
||||
raise "Code not found #{code} in #{self}" unless index
|
||||
@codes.delete_at(index)
|
||||
|
@ -75,6 +75,13 @@ module Virtual
|
||||
attr_reader :name , :me , :args
|
||||
end
|
||||
|
||||
class FunctionCall < Instruction
|
||||
def initialize method
|
||||
@method = method
|
||||
end
|
||||
attr_reader :method
|
||||
end
|
||||
|
||||
# class for Set instructions, A set is basically a mem move.
|
||||
# to and from are indexes into the known objects(frame,message,self and new_message), or from may be a constant
|
||||
class Set < Instruction
|
||||
|
Reference in New Issue
Block a user