()
| 303 | var jumpTable []engineOp |
| 304 | |
| 305 | func init() { |
| 306 | jumpTable = []engineOp{ |
| 307 | func(e *engine, i instruction) (engineOp, instruction) { // opMove |
| 308 | e.frame[i.a()] = e.frame[i.b()] |
| 309 | if e.hooked() { |
| 310 | e.hook() |
| 311 | } |
| 312 | i = e.callInfo.step() |
| 313 | return jumpTable[i.opCode()], i |
| 314 | }, |
| 315 | func(e *engine, i instruction) (engineOp, instruction) { // opLoadConstant |
| 316 | e.frame[i.a()] = e.constants[i.bx()] |
| 317 | if e.hooked() { |
| 318 | e.hook() |
| 319 | } |
| 320 | i = e.callInfo.step() |
| 321 | return jumpTable[i.opCode()], i |
| 322 | }, |
| 323 | func(e *engine, i instruction) (engineOp, instruction) { // opLoadConstantEx |
| 324 | e.frame[i.a()] = e.constants[e.expectNext(opExtraArg).ax()] |
| 325 | if e.hooked() { |
| 326 | e.hook() |
| 327 | } |
| 328 | i = e.callInfo.step() |
| 329 | return jumpTable[i.opCode()], i |
| 330 | }, |
| 331 | func(e *engine, i instruction) (engineOp, instruction) { // opLoadBool |
| 332 | e.frame[i.a()] = i.b() != 0 |
| 333 | if i.c() != 0 { |
| 334 | e.callInfo.skip() |
| 335 | } |
| 336 | if e.hooked() { |
| 337 | e.hook() |
| 338 | } |
| 339 | i = e.callInfo.step() |
| 340 | return jumpTable[i.opCode()], i |
| 341 | }, |
| 342 | func(e *engine, i instruction) (engineOp, instruction) { // opLoadNil |
| 343 | a, b := i.a(), i.b() |
| 344 | clear(e.frame[a : a+b+1]) |
| 345 | if e.hooked() { |
| 346 | e.hook() |
| 347 | } |
| 348 | i = e.callInfo.step() |
| 349 | return jumpTable[i.opCode()], i |
| 350 | }, |
| 351 | func(e *engine, i instruction) (engineOp, instruction) { // opGetUpValue |
| 352 | e.frame[i.a()] = e.closure.upValue(i.b()) |
| 353 | if e.hooked() { |
| 354 | e.hook() |
| 355 | } |
| 356 | i = e.callInfo.step() |
| 357 | return jumpTable[i.opCode()], i |
| 358 | }, |
| 359 | func(e *engine, i instruction) (engineOp, instruction) { // opGetTableUp |
| 360 | tmp := e.l.tableAt(e.closure.upValue(i.b()), e.k(i.c())) |
| 361 | e.frame = e.callInfo.frame |
| 362 | e.frame[i.a()] = tmp |
nothing calls this directly
no test coverage detected