diff options
| author | Mike Pall <mike> | 2010-02-11 20:59:00 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2010-02-11 20:59:00 +0100 |
| commit | 2e5d3740aeae0c5f0f1d2f853cbac145fe52469b (patch) | |
| tree | d75eb017a87ad6a9e6c972abaf6c3ba90341ef0b /lib | |
| parent | b2067236c5e1f9bfddeb5232f78865f72faef494 (diff) | |
| download | luajit-2e5d3740aeae0c5f0f1d2f853cbac145fe52469b.tar.gz luajit-2e5d3740aeae0c5f0f1d2f853cbac145fe52469b.tar.bz2 luajit-2e5d3740aeae0c5f0f1d2f853cbac145fe52469b.zip | |
Fix dump of bytecode instructions with missing operands.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bc.lua | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -74,12 +74,13 @@ local function bcline(func, pc, prefix) | |||
| 74 | pc, prefix or " ", sub(bcnames, oidx+1, oidx+6), ma == 0 and "" or a) | 74 | pc, prefix or " ", sub(bcnames, oidx+1, oidx+6), ma == 0 and "" or a) |
| 75 | local d = shr(ins, 16) | 75 | local d = shr(ins, 16) |
| 76 | if mc == 13*128 then -- BCMjump | 76 | if mc == 13*128 then -- BCMjump |
| 77 | if ma == 0 then | ||
| 78 | return format("%s=> %04d\n", sub(s, 1, -3), pc+d-0x7fff) | ||
| 79 | end | ||
| 80 | return format("%s=> %04d\n", s, pc+d-0x7fff) | 77 | return format("%s=> %04d\n", s, pc+d-0x7fff) |
| 81 | end | 78 | end |
| 82 | if mb ~= 0 then d = band(d, 0xff) end | 79 | if mb ~= 0 then |
| 80 | d = band(d, 0xff) | ||
| 81 | elseif mc == 0 then | ||
| 82 | return s.."\n" | ||
| 83 | end | ||
| 83 | local kc | 84 | local kc |
| 84 | if mc == 10*128 then -- BCMstr | 85 | if mc == 10*128 then -- BCMstr |
| 85 | kc = funck(func, -d-1) | 86 | kc = funck(func, -d-1) |
