Re: question about upvalue bytecode encoding

  • From: Richard Hundt <richardhundt@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 26 Mar 2014 19:35:59 +0100

On 3/26/14 6:44 PM, Francesco Abbate wrote:
> Hi Richard,
>
> thank you very much this is going to help me, for the foment I'm
> working to obtain the same bytecode generated by luajit.
>
> I guess the flag gets defined during parsing in lj_parse.c, I'll give a look.
Yep, pretty much everything you need happens in lj_parse.c. If it were
me, I'd probably mark upvalues during `ctx:op_uset()` inside
bytecode.lua with a `uval.mutable = true` or something and then fix the
flags during `write_body` where it's being done now. Probably a 4 line
change in total ;-)


Other related posts: