MCPcopy Index your code
hub / github.com/google/codesearch / cache

Method cache

regexp/match.go:266–278  ·  view source on GitHub ↗
(z *nstate)

Source from the content-addressed store, hash-verified

264}
265
266func (m *matcher) cache(z *nstate) *dstate {
267 enc := z.enc()
268 d := m.dstate[enc]
269 if d != nil {
270 return d
271 }
272
273 d = &dstate{enc: enc}
274 m.dstate[enc] = d
275 d.matchNL = m.computeNext(d, '\n') == &dmatch
276 d.matchEOT = m.computeNext(d, endText) == &dmatch
277 return d
278}
279
280func (m *matcher) match(b []byte, beginText, endText bool) (end int) {
281 // fmt.Printf("%v\n", m.prog)

Callers 2

initMethod · 0.95
computeNextMethod · 0.95

Calls 2

computeNextMethod · 0.95
encMethod · 0.80

Tested by

no test coverage detected