summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-cnf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/luat-cnf.lua')
-rw-r--r--tex/context/base/mkiv/luat-cnf.lua17
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