(k value)
| 99 | } |
| 100 | |
| 101 | func (t *table) at(k value) value { |
| 102 | switch k := k.(type) { |
| 103 | case nil: |
| 104 | return nil |
| 105 | case float64: |
| 106 | if i := int(k); float64(i) == k { // OPT: Inlined copy of atInt. |
| 107 | if 0 < i && i <= len(t.array) { |
| 108 | return t.array[i-1] |
| 109 | } |
| 110 | return t.hash[k] |
| 111 | } |
| 112 | case string: |
| 113 | return t.hash[k] |
| 114 | } |
| 115 | return t.hash[k] |
| 116 | } |
| 117 | |
| 118 | func (t *table) put(l *State, k, v value) { |
| 119 | switch k := k.(type) { |
no outgoing calls
no test coverage detected