diff options
| author | Mike Pall <mike> | 2010-01-27 20:06:03 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2010-01-27 20:06:03 +0100 |
| commit | 09b8f67cd8d181fdb0f4af3b72b6030f5496cb8b (patch) | |
| tree | 418e199ae542e9cc7a0f222a91bb071c98acdfc2 /lib | |
| parent | 3aeb89226202439c0be07830ae6e71007a7b5dd3 (diff) | |
| download | luajit-09b8f67cd8d181fdb0f4af3b72b6030f5496cb8b.tar.gz luajit-09b8f67cd8d181fdb0f4af3b72b6030f5496cb8b.tar.bz2 luajit-09b8f67cd8d181fdb0f4af3b72b6030f5496cb8b.zip | |
Expose compressed snapshot map to reflection API.
Update jit.dump module and restore printing of frame separators.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dump.lua | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index fb40a8f8..b13e1a5a 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
| @@ -266,24 +266,21 @@ local function formatk(tr, idx) | |||
| 266 | end | 266 | end |
| 267 | 267 | ||
| 268 | local function printsnap(tr, snap) | 268 | local function printsnap(tr, snap) |
| 269 | for i=1,#snap do | 269 | local n = 2 |
| 270 | local ref = snap[i] | 270 | for s=0,snap[1] do |
| 271 | if not ref then | 271 | local sn = snap[n] |
| 272 | out:write("---- ") | 272 | if shr(sn, 24) == s then |
| 273 | elseif ref < 0 then | 273 | n = n + 1 |
| 274 | out:write(formatk(tr, ref), " ") | 274 | local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS |
| 275 | else | 275 | if ref < 0 then |
| 276 | local m, ot, op1, op2 = traceir(tr, ref) | 276 | out:write(formatk(tr, ref)) |
| 277 | local t = band(ot, 15) | 277 | else |
| 278 | local sep = " " | 278 | local m, ot, op1, op2 = traceir(tr, ref) |
| 279 | if t == 8 then | 279 | out:write(colorize(format("%04d", ref), band(ot, 15))) |
| 280 | local oidx = 6*shr(ot, 8) | ||
| 281 | local op = sub(vmdef.irnames, oidx+1, oidx+6) | ||
| 282 | if op == "FRAME " then | ||
| 283 | sep = "|" | ||
| 284 | end | ||
| 285 | end | 280 | end |
| 286 | out:write(colorize(format("%04d", ref), t), sep) | 281 | out:write(band(sn, 0x10000) == 0 and " " or "|") -- SNAP_FRAME |
| 282 | else | ||
| 283 | out:write("---- ") | ||
| 287 | end | 284 | end |
| 288 | end | 285 | end |
| 289 | out:write("]\n") | 286 | out:write("]\n") |
