aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-01-06 11:38:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-01-06 11:38:31 -0300
commit5ff408d2189c6c24fdf8908db4a31432bbdd6f15 (patch)
treebcd83d7547dab0d5418116eb10f9c601f2f2d3b9 /ldebug.c
parente3c83835e7b396ab7db538fb3b052f02d7807dee (diff)
downloadlua-5ff408d2189c6c24fdf8908db4a31432bbdd6f15.tar.gz
lua-5ff408d2189c6c24fdf8908db4a31432bbdd6f15.tar.bz2
lua-5ff408d2189c6c24fdf8908db4a31432bbdd6f15.zip
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.)
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c2
1 files changed, 1 insertions, 1 deletions
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) {
306 Table *t = luaH_new(L); /* new table to store active lines */ 306 Table *t = luaH_new(L); /* new table to store active lines */
307 sethvalue2s(L, L->top, t); /* push it on stack */ 307 sethvalue2s(L, L->top, t); /* push it on stack */
308 api_incr_top(L); 308 api_incr_top(L);
309 setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ 309 setbtvalue(&v); /* boolean 'true' to be the value of all indices */
310 for (i = 0; i < p->sizelineinfo; i++) { /* for all lines with code */ 310 for (i = 0; i < p->sizelineinfo; i++) { /* for all lines with code */
311 currentline = nextline(p, currentline, i); 311 currentline = nextline(p, currentline, i);
312 luaH_setint(L, t, currentline, &v); /* table[line] = true */ 312 luaH_setint(L, t, currentline, &v); /* table[line] = true */