lib/capuchin/generator.rb
def gnz(label, src=nil)
    if src && bool_safe?(src)
      git label
    else
      do_pop = new_label
      the_end = new_label

      dup
      gif do_pop
      send :js_truthy?, 0
      gif the_end
      goto label

      do_pop.set!
      pop
      the_end.set!
    end
  end
# Nodes that are guaranteed to leave a VM true or false (or nil) on
# the stack, meaning we don't need to do a full truthiness check.
Nodes that are guaranteed to leave a VM true or false (or nil) on
the stack, meaning we don't need to do a full truthiness check.
Nodes that are guaranteed to leave a VM true or false ( or nil ) on the stack meaning we don ' t need to do a full truthiness check .
def gnz(label, src=nil)
    if src && bool_safe?(src)
      git label
    else
      do_pop = new_label
      the_end = new_label
      dup
      gif do_pop
      send :js_truthy?, 0
      gif the_end
      goto label
      do_pop.set!
      pop
      the_end.set!
    end
  end
def gnz ( label , src = nil ) if src && bool_safe? ( src ) git label else do_pop = new_label the_end = new_label dup gif do_pop send :js_truthy? , 0 gif the_end goto label do_pop . set! pop the_end . set! end end
Nodes that are guaranteed to leave a VM true or false (or nil) on
the stack, meaning we don't need to do a full truthiness check.
Nodes that are guaranteed to leave a VM true or false ( or nil ) on the stack meaning we don ' t need to do a full truthiness check .
label
src