class TypeProf::Core::Source
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 73 def initialize(*tys) types = {} tys.each do |ty| raise ty.inspect unless ty.is_a?(Type) types[ty] = true end super(types) end
Calls superclass method
TypeProf::Core::BasicVertex::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 95 def add_edge(genv, nvtx) nvtx.on_type_added(genv, self, @types.keys) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 89 def new_vertex(genv, origin) nvtx = Vertex.new(origin) add_edge(genv, nvtx) nvtx end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 82 def on_type_added(genv, src_var, added_types) # TODO: need to report error? end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 86 def on_type_removed(genv, src_var, removed_types) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 99 def remove_edge(genv, nvtx) nvtx.on_type_removed(genv, self, @types.keys) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/graph/vertex.rb, line 103 def show Fiber[:show_rec] ||= Set[] if Fiber[:show_rec].include?(self) "...(recursive)..." else begin Fiber[:show_rec] << self @types.empty? ? "untyped" : @types.keys.map {|ty| ty.show }.sort.join(" | ") ensure Fiber[:show_rec].delete(self) || raise end end end