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

Method needMethodsOf

types/methods.go:142–146  ·  view source on GitHub ↗

needMethodsOf ensures that runtime type information (including the complete method set) is available for the specified type T and all its subcomponents. needMethodsOf must be called for at least every type that is an operand of some MakeInterface instruction, and for the type of every exported pack

(T Type)

Source from the content-addressed store, hash-verified

140// EXCLUSIVE_LOCKS_ACQUIRED(prog.methodsMu)
141//
142func (prog *Program) needMethodsOf(T Type) {
143 prog.methodsMu.Lock()
144 prog.needMethods(T, false)
145 prog.methodsMu.Unlock()
146}
147
148// Precondition: T is not a method signature (*Signature with Recv()!=nil).
149// Recursive case: skip => don't create methods for T.

Callers 2

buildMethod · 0.80
emitConvMethod · 0.80

Calls 1

needMethodsMethod · 0.95

Tested by

no test coverage detected