diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-03-15 16:04:31 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-03-15 16:04:31 +0100 |
commit | a4e07f30e880ab27c2918f81f136e257475b7729 (patch) | |
tree | 02db002d3001a49777a049f9a98fdc872a5e1ad1 /tex/context/base/mkiv/luat-cnf.lua | |
parent | cbc37c39432e0ebe38e0922fc6d14c2955ab3ba2 (diff) | |
download | context-a4e07f30e880ab27c2918f81f136e257475b7729.tar.gz |
2018-03-15 15:36:00
Diffstat (limited to 'tex/context/base/mkiv/luat-cnf.lua')
-rw-r--r-- | tex/context/base/mkiv/luat-cnf.lua | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua index 4f2c6569e..b6ee15083 100644 --- a/tex/context/base/mkiv/luat-cnf.lua +++ b/tex/context/base/mkiv/luat-cnf.lua @@ -19,7 +19,7 @@ texconfig.shell_escape = 't' luatex = luatex or { } local luatex = luatex -texconfig.error_line = 79 -- frozen +texconfig.error_line = 79 -- frozen / large values can crash texconfig.expand_depth = 10000 texconfig.half_error_line = 50 -- frozen texconfig.hash_extra = 100000 @@ -67,7 +67,7 @@ function texconfig.init() "gzip", "zip", "zlib", "lfs", "ltn12", "mime", "socket", "md5", "fio", "unicode", "utf", }, extratex = { - "epdf", "fontloader", "kpse", "mplib", + "epdf", "kpse", "mplib", -- "fontloader", }, obsolete = { "fontloader", -- can be filled by luat-log @@ -119,16 +119,21 @@ function texconfig.init() -- shortcut and helper - local bytecode = lua.bytecode + local setbytecode = lua.setbytecode + local getbytecode = lua.getbytecode local function init(start) local i = start local t = os.clock() - while bytecode[i] do - bytecode[i]() ; - bytecode[i] = nil ; - i = i + 1 - -- collectgarbage('step') + while true do + local b = getbytecode(i) + if b then + b() ; + setbytecode(i,nil) ; + i = i + 1 + else + break + end end return i - start, os.clock() - t end |