()
| 194 | } |
| 195 | |
| 196 | func (t *table) length() int { |
| 197 | j := len(t.array) |
| 198 | if j > 0 && t.array[j-1] == nil { |
| 199 | i := 0 |
| 200 | for j-i > 1 { |
| 201 | m := (i + j) / 2 |
| 202 | if t.array[m-1] == nil { |
| 203 | j = m |
| 204 | } else { |
| 205 | i = m |
| 206 | } |
| 207 | } |
| 208 | return i |
| 209 | } else if t.hash == nil { |
| 210 | return j |
| 211 | } |
| 212 | return t.unboundSearch(j) |
| 213 | } |
| 214 | |
| 215 | func arrayIndex(k value) int { |
| 216 | if n, ok := k.(float64); ok { |
no test coverage detected