[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What does R(A) of JMP mean?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 6 Nov 2016 14:13:43 +0200
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) */