aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/dump.lua18
-rw-r--r--src/lj_trace.c18
2 files changed, 18 insertions, 18 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
496end 502end
497 503
diff --git a/src/lj_trace.c b/src/lj_trace.c
index 7b366d54..8cbbf0f3 100644
--- a/src/lj_trace.c
+++ b/src/lj_trace.c
@@ -475,18 +475,12 @@ static TValue *trace_state(lua_State *L, lua_CFunction dummy, void *ud)
475 475
476 case LJ_TRACE_RECORD: 476 case LJ_TRACE_RECORD:
477 setvmstate(J2G(J), RECORD); 477 setvmstate(J2G(J), RECORD);
478 if (J->pt) 478 lj_vmevent_send(L, RECORD,
479 lj_vmevent_send(L, RECORD, 479 setintV(L->top++, J->curtrace);
480 setintV(L->top++, J->curtrace); 480 setfuncV(L, L->top++, J->fn);
481 setfuncV(L, L->top++, J->fn); 481 setintV(L->top++, J->pt ? (int32_t)proto_bcpos(J->pt, J->pc) : -1);
482 setintV(L->top++, proto_bcpos(J->pt, J->pc)); 482 setintV(L->top++, J->framedepth);
483 setintV(L->top++, J->framedepth); 483 );
484 if (bcmode_mm(bc_op(*J->pc)) == MM_call) {
485 cTValue *o = &L->base[bc_a(*J->pc)];
486 if (bc_op(*J->pc) == BC_ITERC) o -= 3;
487 copyTV(L, L->top++, o);
488 }
489 );
490 lj_record_ins(J); 484 lj_record_ins(J);
491 break; 485 break;
492 486