Show name of NYI bytecode in -jv and -jdump.

Suggested by Sergey Kaplun. #1176 #567
This commit is contained in:
Mike Pall
2024-04-19 00:12:22 +02:00
parent b8b49bf395
commit d2fe2a6d46
3 changed files with 14 additions and 4 deletions

View File

@@ -552,7 +552,12 @@ local recdepth = 0
local function fmterr(err, info)
if type(err) == "number" then
if type(info) == "function" then info = fmtfunc(info) end
err = format(vmdef.traceerr[err], info)
local fmt = vmdef.traceerr[err]
if fmt == "NYI: bytecode %s" then
local oidx = 6 * info
info = sub(vmdef.bcnames, oidx+1, oidx+6)
end
err = format(fmt, info)
end
return err
end