Class: MilkTea::ControlFlow::ConstantPropagation::Result
- Inherits:
-
Data
- Object
- Data
- MilkTea::ControlFlow::ConstantPropagation::Result
- Defined in:
- lib/milk_tea/core/control_flow/constant_propagation.rb
Instance Attribute Summary collapse
-
#in_states ⇒ Object
readonly
Returns the value of attribute in_states.
-
#out_states ⇒ Object
readonly
Returns the value of attribute out_states.
Instance Method Summary collapse
Instance Attribute Details
#in_states ⇒ Object (readonly)
Returns the value of attribute in_states
13 14 15 |
# File 'lib/milk_tea/core/control_flow/constant_propagation.rb', line 13 def in_states @in_states end |
#out_states ⇒ Object (readonly)
Returns the value of attribute out_states
13 14 15 |
# File 'lib/milk_tea/core/control_flow/constant_propagation.rb', line 13 def out_states @out_states end |
Instance Method Details
#constant_at(node_id, key) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/milk_tea/core/control_flow/constant_propagation.rb', line 14 def constant_at(node_id, key) entry = in_states[node_id] return nil unless entry v = entry[key] v.is_a?(ConstVal) ? v.value : nil end |