aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-12 15:12:27 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-12 15:14:07 -0700
commitb5fb8933af283d2b873a03ded085e8b69f374e81 (patch)
tree5cf00c528eb339d5a9f4491652f8a9a0601d943b /core
parent0c9973ff0363e400d3d284339b77197c40c3f60c (diff)
Removed dependency on 'immutable' library. This lets LuaJIT do more
aggressive optimizations and generally helps performance. Some safety is lost, but I think the performance gains, reduced complexity, and reduced dependencies are worth it.
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index 83293c1..ec65f3e 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -94,14 +94,14 @@ immediately
return replacements[t.value]
elseif t.type == 'Var' then
return t.type.."("..repr(tostring(t.source))..", "..repr(t.value.."#"..tostring(MANGLE_INDEX))..")"
- elseif t.is_multi then
+ elseif t.value then
+ return t.type.."("..repr(tostring(t.source))..", "..repr(t.value)..")"
+ else
local bits = {repr(tostring(t.source))}
for i, entry in ipairs(t) do
bits[#bits+1] = make_tree(entry)
end
return t.type.."("..table.concat(bits, ", ")..")"
- else
- return t.type.."("..repr(tostring(t.source))..", "..repr(t.value)..")"
end
end
lua:append(")\n local tree = ", make_tree(\%longhand), "\n return nomsu:tree_to_lua(tree)\nend);")