From 5ff408d2189c6c24fdf8908db4a31432bbdd6f15 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 6 Jan 2020 11:38:31 -0300 Subject: Changed internal representation of booleans Instead of an explicit value (field 'b'), true and false use different tag variants. This avoids reading an extra field and results in more direct code. (Most code that uses booleans needs to distinguish between true and false anyway.) --- ldebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 6e16b0fb..c229f759 100644 --- a/ldebug.c +++ b/ldebug.c @@ -306,7 +306,7 @@ static void collectvalidlines (lua_State *L, Closure *f) { Table *t = luaH_new(L); /* new table to store active lines */ sethvalue2s(L, L->top, t); /* push it on stack */ api_incr_top(L); - setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ + setbtvalue(&v); /* boolean 'true' to be the value of all indices */ for (i = 0; i < p->sizelineinfo; i++) { /* for all lines with code */ currentline = nextline(p, currentline, i); luaH_setint(L, t, currentline, &v); /* table[line] = true */ -- cgit v1.2.3-55-g6feb