(o value)
| 254 | } |
| 255 | |
| 256 | func (g *globalState) metaTable(o value) *table { |
| 257 | var t Type |
| 258 | switch o.(type) { |
| 259 | case nil: |
| 260 | t = TypeNil |
| 261 | case bool: |
| 262 | t = TypeBoolean |
| 263 | // TODO TypeLightUserData |
| 264 | case float64: |
| 265 | t = TypeNumber |
| 266 | case string: |
| 267 | t = TypeString |
| 268 | case *table: |
| 269 | t = TypeTable |
| 270 | case *goFunction: |
| 271 | t = TypeFunction |
| 272 | case closure: |
| 273 | t = TypeFunction |
| 274 | case *userData: |
| 275 | t = TypeUserData |
| 276 | case *State: |
| 277 | t = TypeThread |
| 278 | default: |
| 279 | return nil |
| 280 | } |
| 281 | return g.metaTables[t] |
| 282 | } |
| 283 | |
| 284 | func (l *State) adjustResults(resultCount int) { |
| 285 | if resultCount == MultipleReturns && l.callInfo.top < l.top { |
no outgoing calls
no test coverage detected