summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-01-21 20:00:26 +0200
committerMarius <mariausol@gmail.com>2013-01-21 20:00:26 +0200
commit4d27cc671b4add8a51b6e8196512625419b4080a (patch)
tree02971a0c04536e94f1512910401bcafa403e0f14 /scripts
parent3346c745a354c0726c1ec68fb1f2d04e5bc85a9b (diff)
downloadcontext-4d27cc671b4add8a51b6e8196512625419b4080a.tar.gz
beta 2013.01.21 18:18
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua13
-rw-r--r--scripts/context/lua/mtxrun.lua10
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua10
-rw-r--r--scripts/context/stubs/unix/mtxrun10
4 files changed, 24 insertions, 19 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index e3aac141f..37e5e77d4 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -50,6 +50,9 @@ local basicinfo = [[
--arrange run extra imposition pass, given that the style sets up imposition
--noarrange ignore imposition specifications in the style
+--jit use luajittex with jit turned off (only use the faster virtual machine)
+--jiton use luajittex with jit turned on (in most cases not faster, even slower)
+
--once only run once (no multipass data file is produced)
--batchmode run without stopping and don't show messages on the console
--nonstopmode run without stopping
@@ -148,7 +151,7 @@ scripts.context = scripts.context or { }
-- for the moment here
-if getargument("jit") then
+if getargument("jit") or getargument("jiton") then
-- bonus shortcut, we assume than --jit also indicates the engine
-- although --jit and --engine=luajittex are independent
setargument("engine","luajittex")
@@ -564,7 +567,7 @@ function scripts.context.run(ctxdata,filename)
local a_backend = getargument("backend")
local a_arrange = getargument("arrange")
local a_noarrange = getargument("noarrange")
- local a_jit = getargument("jit")
+ local a_jiton = getargument("jiton")
--
for i=1,#filelist do
--
@@ -654,6 +657,8 @@ function scripts.context.run(ctxdata,filename)
end
end
--
+ a_jiton = a_jiton or toboolean(analysis.jiton,true)
+ --
local l_flags = {
["interaction"] = (a_batchmode and "batchmode") or (a_nonstopmode and "nonstopmode") or nil,
["synctex"] = a_synctex and 1 or nil,
@@ -663,7 +668,7 @@ function scripts.context.run(ctxdata,filename)
["fmt"] = formatfile,
["lua"] = scriptfile,
["jobname"] = jobname,
- ["jiton"] = a_jit and true or false,
+ ["jiton"] = a_jiton and true or false,
}
--
if a_synctex then
@@ -873,7 +878,7 @@ function scripts.context.make(name)
end
local list = (name and { name }) or (environment.files[1] and environment.files) or defaultformats
local engine = getargument("engine") or "luatex"
- if getargument("jit") then
+ if getargument("jit") or getargument("jiton") then
engine = "luajittex"
end
for i=1,#list do
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 303f699e8..61419d633 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -5713,7 +5713,7 @@ end -- of closure
do -- create closure to overcome 200 locals limit
--- original size: 6389, stripped down to: 5110
+-- original size: 6380, stripped down to: 5101
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -5776,11 +5776,11 @@ local function stoptiming(instance,report)
return 0
end
local function elapsed(instance)
- if type(instance)=="table" then
+ if type(instance)=="number" then
+ return instance or 0
+ else
local timer=timers[instance or "notimer"]
return timer and timer.loadtime or 0
- else
- return tonumber(instance) or 0
end
end
local function elapsedtime(instance)
@@ -14679,7 +14679,7 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-tab.lua util-sto.lua util-str.lua util-mrg.lua util-lua.lua util-prs.lua util-fmt.lua util-deb.lua trac-inf.lua trac-set.lua trac-log.lua trac-pro.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-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 luat-sta.lua luat-fmt.lua util-tpl.lua
-- skipped libraries : -
--- original bytes : 589598
+-- original bytes : 589589
-- stripped bytes : 198309
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 303f699e8..61419d633 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -5713,7 +5713,7 @@ end -- of closure
do -- create closure to overcome 200 locals limit
--- original size: 6389, stripped down to: 5110
+-- original size: 6380, stripped down to: 5101
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -5776,11 +5776,11 @@ local function stoptiming(instance,report)
return 0
end
local function elapsed(instance)
- if type(instance)=="table" then
+ if type(instance)=="number" then
+ return instance or 0
+ else
local timer=timers[instance or "notimer"]
return timer and timer.loadtime or 0
- else
- return tonumber(instance) or 0
end
end
local function elapsedtime(instance)
@@ -14679,7 +14679,7 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-tab.lua util-sto.lua util-str.lua util-mrg.lua util-lua.lua util-prs.lua util-fmt.lua util-deb.lua trac-inf.lua trac-set.lua trac-log.lua trac-pro.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-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 luat-sta.lua luat-fmt.lua util-tpl.lua
-- skipped libraries : -
--- original bytes : 589598
+-- original bytes : 589589
-- stripped bytes : 198309
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 303f699e8..61419d633 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -5713,7 +5713,7 @@ end -- of closure
do -- create closure to overcome 200 locals limit
--- original size: 6389, stripped down to: 5110
+-- original size: 6380, stripped down to: 5101
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -5776,11 +5776,11 @@ local function stoptiming(instance,report)
return 0
end
local function elapsed(instance)
- if type(instance)=="table" then
+ if type(instance)=="number" then
+ return instance or 0
+ else
local timer=timers[instance or "notimer"]
return timer and timer.loadtime or 0
- else
- return tonumber(instance) or 0
end
end
local function elapsedtime(instance)
@@ -14679,7 +14679,7 @@ end -- of closure
-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-tab.lua util-sto.lua util-str.lua util-mrg.lua util-lua.lua util-prs.lua util-fmt.lua util-deb.lua trac-inf.lua trac-set.lua trac-log.lua trac-pro.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-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 luat-sta.lua luat-fmt.lua util-tpl.lua
-- skipped libraries : -
--- original bytes : 589598
+-- original bytes : 589589
-- stripped bytes : 198309
-- end library merge