Class: SFRP::Flat::VConstCallExp

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



19
20
21
# File 'lib/sfrp/flat/expression.rb', line 19

def arg_exps
  @arg_exps
end

#spObject

Returns the value of attribute sp

Returns:

  • (Object)

    the current value of sp



19
20
21
# File 'lib/sfrp/flat/expression.rb', line 19

def sp
  @sp
end

#vconst_strObject

Returns the value of attribute vconst_str

Returns:

  • (Object)

    the current value of vconst_str



19
20
21
# File 'lib/sfrp/flat/expression.rb', line 19

def vconst_str
  @vconst_str
end

Instance Method Details

#alpha_convert(table, serial) ⇒ Object



25
26
27
28
# File 'lib/sfrp/flat/expression.rb', line 25

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

#lift_node_ref(collected_node_refs) ⇒ Object



20
21
22
23
# File 'lib/sfrp/flat/expression.rb', line 20

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

#to_polyObject



30
31
32
# File 'lib/sfrp/flat/expression.rb', line 30

def to_poly
  P.vc_call_e(vconst_str, *arg_exps.map(&:to_poly))
end