16 lines
1.1 KiB
Lua
16 lines
1.1 KiB
Lua
-- Read constants of three already loaded Lua functions, one per heartbeat.
|
|
do local function capture()
|
|
local s=_G.__gacGachaConstants1 or {index=1};_G.__gacGachaConstants1=s
|
|
local names={'_create_pools_panel','_on_tab_change','_refresh'}
|
|
if s.index>#names then return end
|
|
local m=package.loaded['Ui.Gacha.GachaMainPage'];if type(m)~='table'then return end
|
|
local name=names[s.index];s.index=s.index+1
|
|
local fn=m[name];local log=function(x)CS.UnityEngine.Debug.Log('[GAC_GACHA_CONST] '..tostring(x))end
|
|
if type(fn)~='function'then log(name..' missing');return end
|
|
local ok,util=pcall(require,'jit.util')
|
|
if not ok then log('NO_JIT_UTIL '..tostring(util));return end
|
|
local info=util.funcinfo(fn);log('FUNCTION '..name..' constants='..tostring(info.gcconsts))
|
|
for i=1,math.min(info.gcconsts or 0,96)do local value=util.funck(fn,-i);if type(value)=='string'then log('STRING '..value)end end
|
|
if s.index>#names then log('END')end
|
|
end;local ok,e=pcall(capture);if not ok then _G.__gacGachaConstants1={index=99};CS.UnityEngine.Debug.Log('[GAC_GACHA_CONST] ERROR '..tostring(e))end end
|