Re: string.dump the same function is not equal?
[
Date Prev][
Date Next][
Thread Prev][Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: string.dump the same function is not equal?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2019年1月31日 20:23:39 -0200
> local f1 = string.dump(function(x) x=x+1 return x end,true)
> local f2 = string.dump(function(x) x=x+1 return x end,true)
If you save f1 and f2 to files and run luac on them you get:
function <?:1,1> (3 instructions at 0x7fc92ac03c20)
function <?:3,3> (3 instructions at 0x7fe052c03c20)
and that's the only difference.
In other words. even if you strip debug information. the line where
the function is defined is still saved.