Class: FastRuby::LvarType

Inherits:
Object show all
Defined in:
lib/fastruby/builder/lvar_type.rb,
lib/fastruby/modules/lvar_type/call.rb,
lib/fastruby/modules/lvar_type/defn.rb,
lib/fastruby/modules/lvar_type/lasgn.rb,
lib/fastruby/modules/lvar_type/recursive.rb

Instance Method Summary collapse

Constructor Details

#initialize(inferencer) ⇒ LvarType

Returns a new instance of LvarType.



28
29
30
31
# File 'lib/fastruby/builder/lvar_type.rb', line 28

def initialize(inferencer)
  @infer_lvar_map = Hash.new
  @inferencer = inferencer
end

Instance Method Details

#call(*args) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/fastruby/builder/lvar_type.rb', line 33

def call(*args)
  if args.first.find_tree{|tree| tree.node_type == :call && tree[2] == :lvar_type}
    process *args
  else
    args.first
  end
end