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)
()
| 101 | // EXCLUSIVE_LOCKS_ACQUIRED(prog.methodsMu) |
| 102 | // |
| 103 | func (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. |