From a0ae246b7e860a70cf01c9412c19d2128504d709 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 29 Jul 2020 14:33:33 +0200 Subject: 2020-07-29 14:05:00 --- scripts/context/lua/mtxrun.lua | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'scripts/context/lua/mtxrun.lua') diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 4f5a11f7e..9a6812697 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -852,7 +852,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-package"] = package.loaded["l-package"] or true --- original size: 11605, stripped down to: 8299 +-- original size: 11793, stripped down to: 8387 if not modules then modules={} end modules ['l-package']={ version=1.001, @@ -1122,19 +1122,22 @@ function helpers.loaded(name) level=level+1 for i=1,#sequence do local method=sequence[i] - if helpers.trace then - helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name) - end - local result,rest=methods[method](name) - if type(result)=="function" then + local lookup=method and methods[method] + if type(lookup)=="function" then if helpers.trace then - helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name) + helpers.report("%s, level '%s', method '%s', name '%s'","locating",level,method,name) end - if helpers.traceused then - used[#used+1]={ level=level,name=name } + local result,rest=lookup(name) + if type(result)=="function" then + if helpers.trace then + helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name) + end + if helpers.traceused then + used[#used+1]={ level=level,name=name } + end + level=level-1 + return result,rest end - level=level-1 - return result,rest end end level=level-1 @@ -26228,8 +26231,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1042226 --- stripped bytes : 411343 +-- original bytes : 1042414 +-- stripped bytes : 411443 -- end library merge -- cgit v1.2.3