fixed while instruciton linking after change in method add
This commit is contained in:
@ -15,7 +15,8 @@ module Ast
|
||||
raise part.inspect if last.nil?
|
||||
end
|
||||
# unconditionally brnach to the start
|
||||
method.add start
|
||||
merge.next = method.current.next
|
||||
method.current.next = start
|
||||
# here we add the end of while that the branch jumps to
|
||||
#but don't link it in (not using add)
|
||||
method.current = merge
|
||||
|
@ -52,7 +52,7 @@ module Virtual
|
||||
def set_var name , var
|
||||
v = has_var name
|
||||
if( v )
|
||||
puts "resetting local #{v}"
|
||||
puts "resetting local #{v.inspect}"
|
||||
else
|
||||
v = Local.new(name , var)
|
||||
@locals << v
|
||||
|
Reference in New Issue
Block a user