Class: MilkTea::ControlFlow::NullabilityFlow::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/milk_tea/core/control_flow/nullability_flow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#in_statesObject (readonly)

Returns the value of attribute in_states

Returns:

  • (Object)

    the current value of in_states



6
7
8
# File 'lib/milk_tea/core/control_flow/nullability_flow.rb', line 6

def in_states
  @in_states
end

#out_statesObject (readonly)

Returns the value of attribute out_states

Returns:

  • (Object)

    the current value of out_states



6
7
8
# File 'lib/milk_tea/core/control_flow/nullability_flow.rb', line 6

def out_states
  @out_states
end

#stmt_to_node_idObject (readonly)

Returns the value of attribute stmt_to_node_id

Returns:

  • (Object)

    the current value of stmt_to_node_id



6
7
8
# File 'lib/milk_tea/core/control_flow/nullability_flow.rb', line 6

def stmt_to_node_id
  @stmt_to_node_id
end

Instance Method Details

#nonnull_before(stmt) ⇒ Object



7
8
9
10
11
12
# File 'lib/milk_tea/core/control_flow/nullability_flow.rb', line 7

def nonnull_before(stmt)
  node_id = stmt_to_node_id[stmt.object_id]
  return Set.new unless node_id

  in_states[node_id] || Set.new
end