FFI: Add IR_CNEW/IR_CNEWI to allocate/init cdata objects.

This commit is contained in:
Mike Pall
2010-12-11 19:32:12 +01:00
parent 6947493687
commit cdac0fa2cb
5 changed files with 143 additions and 10 deletions

View File

@@ -418,10 +418,16 @@ local function dump_ir(tr, dumpsnap, dumpreg)
band(ot, 64) == 0 and " " or "+",
irtype[t], op))
local m1 = band(m, 3)
if sub(op, 1, 4) == "CALL" then
local op4 = sub(op, 1, 4)
if op4 == "CALL" then
out:write(format("%-10s (", vmdef.ircall[op2]))
if op1 ~= -1 then dumpcallargs(tr, op1) end
out:write(")")
elseif op4 == "CNEW" then
out:write(formatk(tr, op2))
if op1 ~= -1 then
out:write(" ("); dumpcallargs(tr, op1); out:write(")")
end
elseif m1 ~= 3 then -- op1 != IRMnone
if op1 < 0 then
out:write(formatk(tr, op1))