MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / RuntimeTypes

Method RuntimeTypes

types/methods.go:103–114  ·  view source on GitHub ↗

RuntimeTypes returns a new unordered slice containing all concrete types in the program for which a complete (non-empty) method set is required at run-time. Thread-safe. EXCLUSIVE_LOCKS_ACQUIRED(prog.methodsMu)

()

Source from the content-addressed store, hash-verified

101// EXCLUSIVE_LOCKS_ACQUIRED(prog.methodsMu)
102//
103func (prog *Program) RuntimeTypes() []Type {
104 prog.methodsMu.Lock()
105 defer prog.methodsMu.Unlock()
106
107 var res []Type
108 prog.methodSets.Iterate(func(T Type, v interface{}) {
109 if v.(*ssaMethodSet).complete {
110 res = append(res, T)
111 }
112 })
113 return res
114}
115
116// declaredFunc returns the concrete function/method denoted by obj.
117// Panic ensues if there is none.

Callers 2

TestRuntimeTypesFunction · 0.80
programMethod · 0.80

Calls 2

IterateMethod · 0.80
appendFunction · 0.50

Tested by 1

TestRuntimeTypesFunction · 0.64