diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-11-07 12:49:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-11-07 12:49:36 +0100 |
commit | 75fbb107b15d01179a4b772844144e0661240e77 (patch) | |
tree | c5210f4f9ade25c89a540f755912a52966404792 /tex/context/base/mkiv/luat-cnf.lua | |
parent | 7830451577b876020de2a26bbfbf069625ab4d6f (diff) | |
download | context-75fbb107b15d01179a4b772844144e0661240e77.tar.gz |
2017-11-07 11:43:00
Diffstat (limited to 'tex/context/base/mkiv/luat-cnf.lua')
-rw-r--r-- | tex/context/base/mkiv/luat-cnf.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua index 416ae34fa..46294741f 100644 --- a/tex/context/base/mkiv/luat-cnf.lua +++ b/tex/context/base/mkiv/luat-cnf.lua @@ -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 |