diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4112 -> 4109 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24778 -> 24775 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.log | 2 | ||||
-rw-r--r-- | tex/context/base/util-tab.lua | 48 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
7 files changed, 41 insertions, 15 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 4b542c0d8..d3166cb24 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2013.09.19 17:08} +\newcontextversion{2013.09.19 19:21} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 8aca2aa54..bb4f0a3c8 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 8866ecfe9..2a8ad345c 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.09.19 17:08} +\edef\contextversion{2013.09.19 19:21} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 26abecfb3..f161d6fe9 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log index 51d51e0b0..55c30fb89 100644 --- a/tex/context/base/status-lua.log +++ b/tex/context/base/status-lua.log @@ -1,6 +1,6 @@ (cont-yes.mkiv -ConTeXt ver: 2013.09.19 17:08 MKIV beta fmt: 2013.9.19 int: english/english +ConTeXt ver: 2013.09.19 19:21 MKIV beta fmt: 2013.9.19 int: english/english system > 'cont-new.mkiv' loaded (cont-new.mkiv) diff --git a/tex/context/base/util-tab.lua b/tex/context/base/util-tab.lua index 06c374c67..f04e2a300 100644 --- a/tex/context/base/util-tab.lua +++ b/tex/context/base/util-tab.lua @@ -301,11 +301,19 @@ local f_hashed_number = formatters["[%q]=%s,"] local f_hashed_boolean = formatters["[%q]=%l,"] local f_hashed_table = formatters["[%q]="] -local f_indexed_string = formatters["%q,"] -local f_indexed_number = formatters["%s,"] -local f_indexed_boolean = formatters["%l,"] +local f_indexed_string = formatters["[%s]=%q,"] +local f_indexed_number = formatters["[%s]=%s,"] +local f_indexed_boolean = formatters["[%s]=%l,"] -function table.fastserialize(t,prefix) -- so prefix should contain the = | not sorted +local f_ordered_string = formatters["%q,"] +local f_ordered_number = formatters["%s,"] +local f_ordered_boolean = formatters["%l,"] + +function table.fastserialize(t,prefix) + + -- prefix should contain the = + -- not sorted + -- only number and string indices (currently) local r = { prefix or "return" } local m = 1 @@ -315,22 +323,36 @@ function table.fastserialize(t,prefix) -- so prefix should contain the = | not s m = m + 1 r[m] = "{" if n > 0 then - for i=1,n do + for i=0,n do local v = t[i] local tv = type(v) if tv == "string" then - m = m + 1 r[m] = f_indexed_string(v) + m = m + 1 r[m] = f_ordered_string(v) elseif tv == "number" then - m = m + 1 r[m] = f_indexed_number(v) + m = m + 1 r[m] = f_ordered_number(v) elseif tv == "table" then fastserialize(v) elseif tv == "boolean" then - m = m + 1 r[m] = f_indexed_boolean(v) + m = m + 1 r[m] = f_ordered_boolean(v) end end - else - for k, v in next, t do - local tv = type(v) + end + for k, v in next, t do + local tk = type(k) + local tv = type(v) + if tk == "number" then + if k > n or k < 0 then + if tv == "string" then + m = m + 1 r[m] = f_indexed_string(k,v) + elseif tv == "number" then + m = m + 1 r[m] = f_indexed_number(k,v) + elseif tv == "table" then + fastserialize(v) + elseif tv == "boolean" then + m = m + 1 r[m] = f_indexed_boolean(k,v) + end + end + else if tv == "string" then m = m + 1 r[m] = f_hashed_string(k,v) elseif tv == "number" then @@ -520,6 +542,10 @@ local spaces = utilities.strings.newrepeater(" ") local serialize = table.serialize -- the extensive one, the one we started with +-- there is still room for optimization: index run, key run, but i need to check with the +-- latest lua for the value of #n (with holes) .. anyway for tracing purposes we want +-- indices / keys being sorted, so it will never be real fast + function table.serialize(root,name,specification) if type(specification) == "table" then diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index b90de920f..b4950080a 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 09/19/13 17:08:32 +-- merge date : 09/19/13 19:21:31 do -- begin closure to overcome local limits and interference |