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



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/rubinius/code/ast/literals.rb', line 570

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



590
591
592
# File 'lib/rubinius/code/ast/literals.rb', line 590

def sexp_name
  :dregx_once
end