diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dump.lua | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index c12b0ba8..ccd43d72 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
@@ -483,15 +483,21 @@ local function dump_record(tr, func, pc, depth, callee) | |||
483 | recdepth = depth | 483 | recdepth = depth |
484 | recprefix = rep(" .", depth) | 484 | recprefix = rep(" .", depth) |
485 | end | 485 | end |
486 | local line = bcline(func, pc, recprefix) | 486 | local line |
487 | if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end | 487 | if pc >= 0 then |
488 | if type(callee) == "function" then | 488 | line = bcline(func, pc, recprefix) |
489 | out:write(sub(line, 1, -2), " ; ", fmtfunc(callee), "\n") | 489 | if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end |
490 | else | ||
491 | line = "0000 "..recprefix.." FUNCC \n" | ||
492 | callee = func | ||
493 | end | ||
494 | if pc <= 0 then | ||
495 | out:write(sub(line, 1, -2), " ; ", fmtfunc(func), "\n") | ||
490 | else | 496 | else |
491 | out:write(line) | 497 | out:write(line) |
492 | end | 498 | end |
493 | if band(funcbc(func, pc), 0xff) < 16 then -- Write JMP for cond. ORDER BC | 499 | if pc >= 0 and band(funcbc(func, pc), 0xff) < 16 then -- ORDER BC |
494 | out:write(bcline(func, pc+1, recprefix)) | 500 | out:write(bcline(func, pc+1, recprefix)) -- Write JMP for cond. |
495 | end | 501 | end |
496 | end | 502 | end |
497 | 503 | ||