Class: SFRP::Flat::FuncCallExp

Inherits:
Struct
  • Object
show all
Defined in:
lib/sfrp/flat/expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arg_expsObject

Returns the value of attribute arg_exps

Returns:

  • (Object)

    the current value of arg_exps



3
4
5
# File 'lib/sfrp/flat/expression.rb', line 3

def arg_exps
  @arg_exps
end

#func_strObject

Returns the value of attribute func_str

Returns:

  • (Object)

    the current value of func_str



3
4
5
# File 'lib/sfrp/flat/expression.rb', line 3

def func_str
  @func_str
end

#spObject

Returns the value of attribute sp

Returns:

  • (Object)

    the current value of sp



3
4
5
# File 'lib/sfrp/flat/expression.rb', line 3

def sp
  @sp
end

Instance Method Details

#alpha_convert(table, serial) ⇒ Object



9
10
11
12
# File 'lib/sfrp/flat/expression.rb', line 9

def alpha_convert(table, serial)
  args = arg_exps.map { |e| e.alpha_convert(table, serial) }
  FuncCallExp.new(func_str, args)
end

#lift_node_ref(collected_node_refs) ⇒ Object



4
5
6
7
# File 'lib/sfrp/flat/expression.rb', line 4

def lift_node_ref(collected_node_refs)
  args = arg_exps.map { |e| e.lift_node_ref(collected_node_refs) }
  FuncCallExp.new(func_str, args, sp)
end

#to_polyObject



14
15
16
# File 'lib/sfrp/flat/expression.rb', line 14

def to_poly
  P.call_e(func_str, *arg_exps.map(&:to_poly))
end