MCPcopy Index your code
hub / github.com/Shopify/go-lua / unboundSearch

Method unboundSearch

tables.go:175–194  ·  view source on GitHub ↗
(j int)

Source from the content-addressed store, hash-verified

173}
174
175func (t *table) unboundSearch(j int) int {
176 i := j
177 for j++; nil != t.atInt(j); {
178 i = j
179 if j *= 2; j < 0 {
180 for i = 1; nil != t.atInt(i); i++ {
181 }
182 return i - 1
183 }
184 }
185 for j-i > 1 {
186 m := (i + j) / 2
187 if nil == t.atInt(m) {
188 j = m
189 } else {
190 i = m
191 }
192 }
193 return i
194}
195
196func (t *table) length() int {
197 j := len(t.array)

Callers 1

lengthMethod · 0.95

Calls 1

atIntMethod · 0.95

Tested by

no test coverage detected