finish typing variables

This commit is contained in:
Torsten Ruger
2015-09-27 16:06:48 +03:00
parent 26c6db17b1
commit 252c0ccdca
12 changed files with 81 additions and 40 deletions

View File

@ -13,8 +13,12 @@ module Bosl
if( index = method.has_arg(name))
method.source.add_code Virtual::Set.new( Virtual::ArgSlot.new(index,:int ) , ret)
else # or a local so it is in the frame
index = method.ensure_local( name )
method.source.add_code Virtual::Set.new(Virtual::FrameSlot.new(index,:int ) , ret )
index = method.has_local( name )
if(index)
method.source.add_code Virtual::Set.new(Virtual::FrameSlot.new(index,:int ) , ret )
else
raise "must define variable #{name} before using it"
end
end
return ret
end