Class: SFRP::Mono::VConstCallExp
Instance Attribute Summary
Attributes inherited from Exp
Instance Method Summary collapse
- #comp ⇒ Object
-
#initialize(type_str, vconst_str, arg_exps, id = nil) ⇒ VConstCallExp
constructor
A new instance of VConstCallExp.
- #memory(set) ⇒ Object
- #to_low(set, env) ⇒ Object
Methods inherited from Exp
Constructor Details
#initialize(type_str, vconst_str, arg_exps, id = nil) ⇒ VConstCallExp
Returns a new instance of VConstCallExp.
81 82 83 84 85 86 |
# File 'lib/sfrp/mono/expression.rb', line 81 def initialize(type_str, vconst_str, arg_exps, id = nil) @type_str = type_str @vconst_str = vconst_str @arg_exps = arg_exps @id = id end |
Instance Method Details
#comp ⇒ Object
88 89 90 |
# File 'lib/sfrp/mono/expression.rb', line 88 def comp [@type_str, @vconst_strs, @arg_exps] end |
#memory(set) ⇒ Object
97 98 99 100 101 |
# File 'lib/sfrp/mono/expression.rb', line 97 def memory(set) @arg_exps.reduce(Memory.one(@type_str)) do |m, e| m.and(e.memory(set)) end end |
#to_low(set, env) ⇒ Object
92 93 94 95 |
# File 'lib/sfrp/mono/expression.rb', line 92 def to_low(set, env) low_arg_exps = @arg_exps.map { |e| e.to_low(set, env) } set.vconst(@vconst_str).low_constructor_call_exp(low_arg_exps) end |