summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-cnf.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-08-24 20:03:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-08-24 20:03:53 +0200
commit89f7bbac9616406b3990b8608c17c542f5fb476d (patch)
tree9e487938454fd224025391d975ae85dff85a10f8 /tex/context/base/mkiv/luat-cnf.lua
parent4ba731dd6ff370a42984b4df050906fd9a884bc8 (diff)
downloadcontext-89f7bbac9616406b3990b8608c17c542f5fb476d.tar.gz
2020-08-24 19:49:00
Diffstat (limited to 'tex/context/base/mkiv/luat-cnf.lua')
-rw-r--r--tex/context/base/mkiv/luat-cnf.lua94
1 files changed, 64 insertions, 30 deletions
diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua
index c9ccc1b90..910ee5989 100644
--- a/tex/context/base/mkiv/luat-cnf.lua
+++ b/tex/context/base/mkiv/luat-cnf.lua
@@ -19,20 +19,70 @@ texconfig.shell_escape = 't'
luatex = luatex or { }
local luatex = luatex
-texconfig.error_line = 250 -- 79 -- frozen / large values can crash
-texconfig.expand_depth = 10000
-texconfig.half_error_line = 125 -- 50 -- frozen
-texconfig.hash_extra = 100000
-texconfig.max_in_open = 1000 -- frozen
-texconfig.max_print_line = 100000 -- frozen
-texconfig.max_strings = 500000
-texconfig.nest_size = 1000
-texconfig.param_size = 25000
-texconfig.save_size = 100000
-texconfig.stack_size = 10000
-texconfig.function_size = 32768
-texconfig.properties_size = 10000
-texconfig.fix_mem_init = 750000
+texconfig.error_line = 250
+texconfig.expand_depth = 10000
+texconfig.half_error_line = 125
+texconfig.max_print_line = 100000
+texconfig.max_strings = 500000
+texconfig.hash_extra = 200000
+texconfig.function_size = 32768
+texconfig.properties_size = 10000
+
+if CONTEXTLMTXMODE > 0 then
+
+texconfig.max_in_open = 2000
+texconfig.nest_size = 10000
+texconfig.param_size = 100000
+texconfig.save_size = 500000
+texconfig.stack_size = 100000
+texconfig.buffer_size = 10000000
+texconfig.token_size = 10000000
+texconfig.node_size = 20000000
+
+else
+
+texconfig.max_in_open = 1000
+texconfig.nest_size = 1000
+texconfig.param_size = 25000
+texconfig.save_size = 100000
+texconfig.stack_size = 10000
+texconfig.buf_size = 10000000
+texconfig.fix_mem_init = 1000000
+
+end
+
+local variablenames = CONTEXTLMTXMODE > 0 and {
+ error_line = false,
+ half_error_line = false,
+ max_print_line = false,
+ max_in_open = false,
+ expand_depth = true,
+ hash_extra = true,
+ nest_size = true,
+ max_strings = true,
+ param_size = true,
+ save_size = true,
+ stack_size = true,
+ function_size = true,
+ properties_size = true,
+ token_size = true,
+ node_size = true,
+} or {
+ error_line = false,
+ half_error_line = false,
+ max_print_line = false,
+ max_in_open = false,
+ expand_depth = true,
+ hash_extra = true,
+ nest_size = true,
+ max_strings = true,
+ param_size = true,
+ save_size = true,
+ stack_size = true,
+ function_size = true,
+ properties_size = true,
+ fix_mem_init = true,
+}
local stub = [[
@@ -201,22 +251,6 @@ end)
-- done, from now on input and callbacks are internal
]]
-local variablenames = {
- error_line = false,
- half_error_line = false,
- max_print_line = false,
- max_in_open = false,
- expand_depth = true,
- hash_extra = true,
- nest_size = true,
- max_strings = true,
- param_size = true,
- save_size = true,
- stack_size = true,
- function_size = true,
- properties_size = true,
-}
-
local function makestub()
name = name or (environment.jobname .. ".lui")
report("creating stub file %a using directives:",name)