Class: CodeTools::AST::DynamicOnceRegex

Inherits:
DynamicRegex show all
Defined in:
lib/rubinius/code/ast/literals.rb

Instance Attribute Summary

Attributes inherited from DynamicString

#array, #options

Attributes inherited from StringLiteral

#string

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from DynamicRegex

#initialize, #to_sexp

Methods inherited from DynamicString

#defined, #initialize, #to_sexp

Methods inherited from StringLiteral

#defined, #initialize, #to_sexp

Methods inherited from Node

#ascii_graph, #attributes, #children, #defined, #initialize, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

This class inherits a constructor from CodeTools::AST::DynamicRegex

Instance Method Details

#bytecode(g) ⇒ Object



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/rubinius/code/ast/literals.rb', line 601

def bytecode(g)
  pos(g)

  build = g.new_label
  done = g.new_label

  g.push_nil

  build.set!
  g.push_memo nil
  g.dup
  g.goto_if_not_nil done

  g.pop
  super(g)
  g.goto build

  done.set!
end

#sexp_nameObject



621
622
623
# File 'lib/rubinius/code/ast/literals.rb', line 621

def sexp_name
  :dregx_once
end