Class: SFRP::Raw::FuncCallExp
- Inherits:
-
Struct
- Object
- Struct
- SFRP::Raw::FuncCallExp
- Defined in:
- lib/sfrp/raw/expression.rb
Instance Attribute Summary collapse
-
#arg_exps ⇒ Object
Returns the value of attribute arg_exps.
-
#effect ⇒ Object
Returns the value of attribute effect.
-
#func_ref ⇒ Object
Returns the value of attribute func_ref.
-
#sp ⇒ Object
Returns the value of attribute sp.
Instance Method Summary collapse
Instance Attribute Details
#arg_exps ⇒ Object
Returns the value of attribute arg_exps
3 4 5 |
# File 'lib/sfrp/raw/expression.rb', line 3 def arg_exps @arg_exps end |
#effect ⇒ Object
Returns the value of attribute effect
3 4 5 |
# File 'lib/sfrp/raw/expression.rb', line 3 def effect @effect end |
#func_ref ⇒ Object
Returns the value of attribute func_ref
3 4 5 |
# File 'lib/sfrp/raw/expression.rb', line 3 def func_ref @func_ref end |
#sp ⇒ Object
Returns the value of attribute sp
3 4 5 |
# File 'lib/sfrp/raw/expression.rb', line 3 def sp @sp end |
Instance Method Details
#blame_side_effect ⇒ Object
8 9 10 11 |
# File 'lib/sfrp/raw/expression.rb', line 8 def blame_side_effect raise IllegalSideEffectError.new(func_ref.to_s, sp) if effect arg_exps.each(&:blame_side_effect) end |
#to_flat(set, ns) ⇒ Object
13 14 15 16 17 |
# File 'lib/sfrp/raw/expression.rb', line 13 def to_flat(set, ns) ab_func_name = set.func(ns, func_ref, sp).absolute_name args = arg_exps.map { |e| e.to_flat(set, ns) } Flat::FuncCallExp.new(ab_func_name, args, sp) end |
#vconst_refs ⇒ Object
4 5 6 |
# File 'lib/sfrp/raw/expression.rb', line 4 def vconst_refs arg_exps.flat_map(&:vconst_refs) end |