Debian Codegraph @

vendor/github.com/ugorji/go/codec/fast-path.not.go

raw
1 // +build notfastpath
2
3 package codec
4
5 import "reflect"
6
7 const fastpathEnabled = false
8
9 // The generated fast-path code is very large, and adds a few seconds to the build time.
10 // This causes test execution, execution of small tools which use codec, etc
11 // to take a long time.
12 //
13 // To mitigate, we now support the notfastpath tag.
14 // This tag disables fastpath during build, allowing for faster build, test execution,
15 // short-program runs, etc.
16
17 func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false }
18 func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false }
19 func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false }
20 func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false }
21 func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { return false }
22
23 type fastpathT struct{}
24 type fastpathE struct {
25 rtid uintptr
26 rt reflect.Type
27 encfn func(*Encoder, *codecFnInfo, reflect.Value)
28 decfn func(*Decoder, *codecFnInfo, reflect.Value)
29 }
30 type fastpathA [0]fastpathE
31
32 func (x fastpathA) index(rtid uintptr) int { return -1 }
33
34 var fastpathAV fastpathA
35 var fastpathTV fastpathT