Module: YTLJit::VM::Node::NodeUtil

Instance Method Summary collapse

Instance Method Details

#search_class_topObject



652
653
654
655
656
657
658
659
660
661
# File 'lib/ytljit/vm.rb', line 652

def search_class_top
  cnode = @parent

  # ClassTopNode include TopTopNode
  while !cnode.is_a?(ClassTopNode)
    cnode = cnode.parent
  end

  cnode
end

#search_endObject



674
675
676
677
678
679
680
681
682
683
# File 'lib/ytljit/vm.rb', line 674

def search_end
  cnode = @parent

  # ClassTopNode include TopTopNode
  while !cnode.is_a?(MethodEndNode)
    cnode = cnode.body
  end

  cnode
end

#search_frame_infoObject



685
686
687
688
689
690
691
692
693
694
# File 'lib/ytljit/vm.rb', line 685

def search_frame_info
  cnode = @parent

  # ClassTopNode include TopTopNode
  while !cnode.is_a?(LocalFrameInfoNode)
    cnode = cnode.parent
  end

  cnode
end

#search_topObject



663
664
665
666
667
668
669
670
671
672
# File 'lib/ytljit/vm.rb', line 663

def search_top
  cnode = @parent

  # ClassTopNode include TopTopNode
  while !cnode.is_a?(TopNode)
    cnode = cnode.parent
  end

  cnode
end