lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2016-11-05 21:15 GMT+02:00 Satoru Kawahara <s1311350@coins.tsukuba.ac.jp>:

> At lua vm instruction, I sometimes find `R(A)` of `JMP` instruction is not
> zero.
> I think `JMP A B` is jump from the address to the address + B, A is not
> used.
> Does the vm use `A`?

It is used to determine how many upvalues to close. From lopcodes.h:

OP_JMP,/*       A sBx   pc+=sBx; if (A) close all upvalues >= R(A - 1)  */