class CodeTools::AST::And
Attributes
left[RW]
right[RW]
Public Class Methods
new(line, left, right)
click to toggle source
# File lib/rubinius/code/ast/operators.rb, line 7 def initialize(line, left, right) @line = line @left = left @right = right end
Public Instance Methods
bytecode(g, use_gif=true)
click to toggle source
# File lib/rubinius/code/ast/operators.rb, line 13 def bytecode(g, use_gif=true) @left.bytecode(g) g.dup lbl = g.new_label if use_gif g.goto_if_false lbl else g.goto_if_true lbl end g.pop @right.bytecode(g) lbl.set! end
defined(g)
click to toggle source
# File lib/rubinius/code/ast/operators.rb, line 29 def defined(g) g.push_literal "expression" g.string_dup end
sexp_name()
click to toggle source
# File lib/rubinius/code/ast/operators.rb, line 34 def sexp_name :and end
to_sexp()
click to toggle source
# File lib/rubinius/code/ast/operators.rb, line 38 def to_sexp [sexp_name, @left.to_sexp, @right.to_sexp] end