Commit 5af7ced6 authored by Laszlo Domoszlai's avatar Laszlo Domoszlai

do not set arguments unnecessarily in tr calls

parent 08442bf5
......@@ -582,6 +582,8 @@ where
builtin = 'DM'.get (unpackVar name) s.cs_builtins
make_tr_app args s a
# (tr_function_args, args) = unzip (filter (not o isSame) (zip2 tr_function_args args))
= a <++ "var " <++ mta_1 tr_function_args args 0 s <++ ";"
<++ mta_2 tr_function_args 0 s <++ "continue;"
where
......@@ -597,6 +599,9 @@ where
= a <++ escapeName s.cs_prefix (unpackVar fa) <++ "=t" <++ i <++ ";" <++ mta_2 fargs (i+1) s // skip level information for TR!
mta_2 [] i s a = a
isSame (TypedVar var1 _, SVar var2) = unpackVar var1 == unpackVar var2
isSame _ = False
forceTermCoder (SApplication sel=:(SSelect _ _ _) args) s a
= a <++ "Sapl.fapp(" <++ forceTermCoder sel s <++ ",["
<++ termArrayCoder args "," s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment