MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / removelastlineinfo

Function removelastlineinfo

extlibs/lua/src/lcode.c:361–373  ·  view source on GitHub ↗

** Remove line information from the last instruction. ** If line information for that instruction is absolute, set 'iwthabs' ** above its max to force the new (replacing) instruction to have ** absolute line info, too. */

Source from the content-addressed store, hash-verified

359** absolute line info, too.
360*/
361static void removelastlineinfo (FuncState *fs) {
362 Proto *f = fs->f;
363 int pc = fs->pc - 1; /* last instruction coded */
364 if (f->lineinfo[pc] != ABSLINEINFO) { /* relative line info? */
365 fs->previousline -= f->lineinfo[pc]; /* correct last line saved */
366 fs->iwthabs--; /* undo previous increment */
367 }
368 else { /* absolute line information */
369 lua_assert(f->abslineinfo[fs->nabslineinfo - 1].pc == pc);
370 fs->nabslineinfo--; /* remove it */
371 fs->iwthabs = MAXIWTHABS + 1; /* force next line info to be absolute */
372 }
373}
374
375
376/*

Callers 2

removelastinstructionFunction · 0.85
luaK_fixlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected