fix locals scope in method and blocks
methods used to gobble up any locals of included scope. fixed Blocks now create frame_type correctly and don't include and locals that are in fact method scope
This commit is contained in:
@ -47,8 +47,14 @@ module Vool
|
||||
private
|
||||
|
||||
def make_frame
|
||||
nodes = []
|
||||
@body.each { |node| nodes << node }
|
||||
nodes.dup.each do |node|
|
||||
next unless node.is_a?(BlockStatement)
|
||||
node.each {|block_scope| nodes.delete(block_scope)}
|
||||
end
|
||||
type_hash = {}
|
||||
@body.each do |node|
|
||||
nodes.each do |node|
|
||||
next unless node.is_a?(LocalVariable) or node.is_a?(LocalAssignment)
|
||||
type_hash[node.name] = :Object
|
||||
end
|
||||
|
Reference in New Issue
Block a user