Sha256: 753a2c5d2c4d9a8e64582ed1503c8407f2dae76d9eaf280b3e1804e51165740c

Contents?: true

Size: 327 Bytes

Versions: 11

Compression:

Stored size: 327 Bytes

Contents

class <%=@instname%> < Instruction
  
  def preconditions?
    needs :<%=@type%>, 2
  end
  
  def setup
    @arg1 = @context.pop_value(:<%=@type%>)
    @arg2 = @context.pop_value(:<%=@type%>)
  end
  
  def derive
    @result = ValuePoint.new("bool", @arg1 == @arg2)
  end
  
  def cleanup
    pushes :bool, @result
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nudge-0.2.9 templates/nudge_equal_q_instruction.erb
nudge-0.2.8 templates/nudge_equal_q_instruction.erb
nudge-0.2.7 templates/nudge_equal_q_instruction.erb
nudge-0.2.6 templates/nudge_equal_q_instruction.erb
nudge-0.2.5 templates/nudge_equal_q_instruction.erb
nudge-0.2.4 templates/nudge_equal_q_instruction.erb
nudge-0.2.3 templates/nudge_equal_q_instruction.erb
nudge-0.2.2 templates/nudge_equal_q_instruction.erb
nudge-0.2.1 templates/nudge_equal_q_instruction.erb
nudge-0.2.0 templates/nudge_equal_q_instruction.erb
nudge-0.1.3 templates/nudge_equal_q_instruction.erb