MCPcopy Index your code
hub / github.com/segmentio/encoding / constructCachedCodec

Function constructCachedCodec

json/codec.go:87–96  ·  view source on GitHub ↗
(t reflect.Type, cache map[unsafe.Pointer]codec)

Source from the content-addressed store, hash-verified

85}
86
87func constructCachedCodec(t reflect.Type, cache map[unsafe.Pointer]codec) codec {
88 c := constructCodec(t, map[reflect.Type]*structType{}, t.Kind() == reflect.Ptr)
89
90 if inlined(t) {
91 c.encode = constructInlineValueEncodeFunc(c.encode)
92 }
93
94 cacheStore(t, c, cache)
95 return c
96}
97
98func constructCodec(t reflect.Type, seen map[reflect.Type]*structType, canAddr bool) (c codec) {
99 switch t {

Callers 2

AppendFunction · 0.85
ParseFunction · 0.85

Calls 5

constructCodecFunction · 0.85
cacheStoreFunction · 0.85
inlinedFunction · 0.70
KindMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…