1717-- SOFTWARE.
1818local M = {}
1919
20- local version = { 0 , 1 , 0 }
20+ local version = { 0 , 1 , 1 }
2121local default_port = 8888
2222
2323-- for performance reasons we cap the amount of items a table can render
@@ -94,9 +94,6 @@ local jit_off = is_luajit and rawget(_G, "jit").off or nil
9494-- forward declarations
9595local debug_hook
9696local remove_debug_hook
97- local saved_count
98- local saved_hook
99- local saved_mask
10097local uninstall_wrappers
10198
10299-- since we're overriding them later we should store them
@@ -4012,11 +4009,6 @@ local function absolute_depth()
40124009end
40134010
40144011debug_hook = function (event , line )
4015- -- dont fuck with prior hooks, just pass the event along
4016- if saved_hook then
4017- saved_hook (event , line , 3 )
4018- end
4019-
40204012 if session .restart_requested then
40214013 log .warning (" moonbug: restart requested" , 0 )
40224014 session_reset (true )
@@ -4126,13 +4118,6 @@ debug_hook = function(event, line)
41264118end
41274119
41284120local function setup_debug_hook ()
4129- local hook , mask , count = debug.gethook ()
4130- if hook ~= debug_hook then
4131- saved_hook = hook
4132- saved_mask = mask
4133- saved_count = count
4134- end
4135-
41364121 local handle = current_handle ()
41374122 local ctx = get_context (handle )
41384123
@@ -4144,13 +4129,9 @@ end
41444129
41454130remove_debug_hook = function ()
41464131 if debug.gethook () == debug_hook then
4147- debug.sethook (saved_hook , saved_mask , saved_count )
4132+ debug.sethook ()
41484133 end
41494134
4150- saved_hook = nil
4151- saved_mask = nil
4152- saved_count = nil
4153-
41544135 -- NOTE(luajit): luajit installs hooks on all threads, for others we have to do it one by one
41554136 if not is_luajit then
41564137 for handle in pairs (session .context ) do
0 commit comments