Change handling of nil value markers in template tables.

Reported by Bernhard M. Wiedemann. #1348 #1155
This commit is contained in:
Mike Pall
2025-03-09 14:44:57 +01:00
parent a4f56a459a
commit 5eb9509468
6 changed files with 23 additions and 24 deletions

View File

@@ -233,7 +233,9 @@ static TRef fwd_ahload(jit_State *J, IRRef xref)
return lj_ir_knum_u64(J, tv->u64);
else if (tvisint(tv))
return lj_ir_kint(J, intV(tv));
else if (tvisgcv(tv))
else if (tvistab(tv)) /* Template table nil value marker. */
return TREF_NIL;
else if (tvisstr(tv))
return lj_ir_kstr(J, strV(tv));
}
/* Othwerwise: don't intern as a constant. */