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

Method createMethodSet

types/methods.go:61–68  ·  view source on GitHub ↗

Precondition: !isInterface(T). EXCLUSIVE_LOCKS_REQUIRED(prog.methodsMu)

(T Type)

Source from the content-addressed store, hash-verified

59// Precondition: !isInterface(T).
60// EXCLUSIVE_LOCKS_REQUIRED(prog.methodsMu)
61func (prog *Program) createMethodSet(T Type) *ssaMethodSet {
62 mset, ok := prog.methodSets.At(T).(*ssaMethodSet)
63 if !ok {
64 mset = &ssaMethodSet{mapping: make(map[string]*Function)}
65 prog.methodSets.Set(T, mset)
66 }
67 return mset
68}
69
70// EXCLUSIVE_LOCKS_REQUIRED(prog.methodsMu)
71func (prog *Program) addMethod(mset *ssaMethodSet, sel *Selection) *Function {

Callers 2

MethodValueMethod · 0.95
needMethodsMethod · 0.95

Calls 2

SetMethod · 0.65
AtMethod · 0.45

Tested by

no test coverage detected