Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/luajit/src/lib_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ LJLIB_CF(jit_attach)
return 0;
}

/* Calling this forces a trace stitch. */
LJLIB_CF(jit_tracebarrier)
{
return 0;
}

LJLIB_PUSH(top-5) LJLIB_SET(os)
LJLIB_PUSH(top-4) LJLIB_SET(arch)
LJLIB_PUSH(top-3) LJLIB_SET(version_num)
Expand Down
2 changes: 2 additions & 0 deletions src/core/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ end
-- Run app:methodname() in protected mode (pcall). If it throws an
-- error app will be marked as dead and restarted eventually.
function with_restart (app, method)
jit.tracebarrier() -- don't mix engine and apps in traces
local status, result
if use_restart then
-- Run fn in protected mode using pcall.
Expand All @@ -95,6 +96,7 @@ function with_restart (app, method)
else
status, result = true, method(app)
end
jit.tracebarrier()
return status, result
end

Expand Down