fix and test basic and name expressions

This commit is contained in:
Torsten Ruger
2015-07-19 13:20:34 +03:00
parent 48d090f19c
commit 31d825df7b
5 changed files with 19 additions and 5 deletions

View File

@ -64,7 +64,7 @@ module Virtual
raise "oh noo, nil from where #{expression.right.inspect}" unless r
index = method.has_arg(expression.left.name.to_sym)
if index
method.source.add_code Set.new(MessageSlot.new(index , r,type , r ) , Return.new)
method.source.add_code Set.new(ArgSlot.new(index , r.type , r ) , Return.new)
else
index = method.ensure_local(expression.left.name.to_sym)
method.source.add_code Set.new(FrameSlot.new(index , r.type , r ) , Return.new)