Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

annotate.lua translates bytecodes in abort reasons

  • Loading branch information...
commit d0d6154d310a87ea31118baea823fc17cead705e 1 parent 24280f4
@geoffleyland geoffleyland authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lua/jit/annotate.lua
View
7 lua/jit/annotate.lua
@@ -56,7 +56,12 @@ end
function trace_callbacks.abort(tr, func, pc, code, reason)
local t = traces[tr][#traces[tr]]
- t.abort = { info=jit.util.funcinfo(func, pc), code=code, reason=fmterr(code, reason) }
+ local reason=fmterr(code, reason)
+ reason = reason:gsub("bytecode (%d+)", function(c)
+ c = tonumber(c) * 6
+ return "bytecode "..vmdef.bcnames:sub(c, c+6):gsub(" ", "")
+ end)
+ t.abort = { info=jit.util.funcinfo(func, pc), code=code, reason=reason }
t.stop = t.abort.info
end
Please sign in to comment.
Something went wrong with that request. Please try again.