In Files

  • typeprof-0.12.0/lib/typeprof/block.rb

Class/Module Index [+]

Quicksearch

TypeProf::SymbolBlock

Attributes

iseq[R]
outer_ep[R]

Public Class Methods

new(sym) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 104
def initialize(sym)
  @sym = sym
end
            

Public Instance Methods

consistent?(other) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 114
def consistent?(other)
  true # XXX
end
            
do_call(aargs, caller_ep, caller_env, scratch, replace_recv_ty:, &ctn) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 122
def do_call(aargs, caller_ep, caller_env, scratch, replace_recv_ty,, &ctn)
  if aargs.lead_tys.size >= 1
    recv = aargs.lead_tys[0]
    recv = Type.any if recv == Type.bot
    aargs = ActualArguments.new(aargs.lead_tys[1..], aargs.rest_ty, aargs.kw_tys, aargs.blk_ty)
  elsif aargs.rest_ty
    recv = aargs.rest_ty.elems.squash_or_any # XXX: need to shift
  else
    recv = Type.any
  end

  scratch.add_block_signature!(self, aargs.to_block_signature)

  recv.each_child do |recv|
    scratch.do_send(recv, @sym, aargs, caller_ep, caller_env, &ctn)
  end
end
            
inspect() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 110
def inspect
  "#<SymbolBlock: #{ @sym }>"
end
            
substitute(_subst, _depth) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 118
def substitute(_subst, _depth)
  self
end