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

Method makeWrapper

types/wrappers.go:45–47  ·  view source on GitHub ↗

-- wrappers ----------------------------------------------------------- makeWrapper returns a synthetic method that delegates to the declared method denoted by meth.Obj(), first performing any necessary pointer indirections or field selections implied by meth. The resulting method's receiver type i

(sel *Selection)

Source from the content-addressed store, hash-verified

43// EXCLUSIVE_LOCKS_REQUIRED(prog.methodsMu)
44//
45func (prog *Program) makeWrapper(sel *Selection) *Function {
46 return prog.makeWrapperKey(sel.asKey())
47}
48
49func (prog *Program) makeWrapperKey(key selectionKey) *Function {
50 obj := key.obj.(*Func) // the declared function

Callers 1

addMethodMethod · 0.95

Calls 2

makeWrapperKeyMethod · 0.95
asKeyMethod · 0.80

Tested by

no test coverage detected