lua-users home
lua-l archive

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


I overlooked it. Thank you!

On Sun, Nov 6, 2016 at 9:13 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
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)  */




--
Kawahara Satoru
College of Information Science
University of Tsukuba