fx ruby send args

This commit is contained in:
Torsten Ruger
2018-07-20 20:06:14 +03:00
parent d03592dfb1
commit 0238874c20
6 changed files with 13 additions and 9 deletions

View File

@ -15,5 +15,10 @@ module Vool
at_depth(depth , "#{@name} = #{@value}")
end
def chain_assign(assign , compiler)
return assign unless @value.is_a?(SendStatement)
@value.to_mom(compiler) << assign
end
end
end

View File

@ -8,11 +8,7 @@ module Vool
from = @value.slot_definition(compiler)
return chain_assign( Mom::SlotLoad.new(to,from) , compiler)
end
def chain_assign(assign , compiler)
return assign unless @value.is_a?(SendStatement)
@value.to_mom(compiler) << assign
end
end
end

View File

@ -27,6 +27,9 @@ module Vool
@statements << o
self
end
def prepend(o)
@statements = [o] + @statements
end
# create mom instructions
def to_mom( compiler )