Check GC after string.char
string.char may allocate strings so it should be followed with a GC check.
@@ -360,6 +360,7 @@ function ToIR:exp_to_assignment(cmds, dst, exp)
elseif bname == "string_char" then
assert(#xs == 1)
table.insert(cmds, ir.Cmd.BuiltinStringChar(loc, dst, xs[1]))
+ table.insert(cmds, ir.Cmd.CheckGC())
elseif bname == "tofloat" then
assert(#xs == 1)
table.insert(cmds, ir.Cmd.BuiltinToFloat(loc, dst, xs[1]))
