summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/application.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
committerKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
commita960e44eb527236f39aec81babc0474911a86078 (patch)
tree9950eca71791d90820a80a521a7cc252c0955db5 /Build/source/utils/asymptote/application.cc
parent6443467452320c296faa1f43f0606a9457bd4463 (diff)
asy 1.96
git-svn-id: svn://tug.org/texlive/trunk@18817 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/application.cc')
-rw-r--r--Build/source/utils/asymptote/application.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/application.cc b/Build/source/utils/asymptote/application.cc
index 551ab70e80e..5a287bf2559 100644
--- a/Build/source/utils/asymptote/application.cc
+++ b/Build/source/utils/asymptote/application.cc
@@ -243,6 +243,10 @@ bool application::matchSignature(env &e, types::signature *source,
arglist &al) {
formal_vector &f=source->formals;
+#if 0
+ cout << "num args: " << f.size() << endl;
+#endif
+
// First, match all of the named (non-rest) arguments.
for (size_t i=0; i<f.size(); ++i)
if (f[i].name)
@@ -326,14 +330,27 @@ app_list multimatch(env &e,
app_list l;
+#if DEBUG_GETAPP
+ bool perfect=false;
+#endif
+
for(ty_vector::iterator t=o->sub.begin(); t!=o->sub.end(); ++t) {
if ((*t)->kind==ty_function) {
+#if DEBUG_GETAPP
+ function *ft = dynamic_cast<function *>(*t);
+ if (equivalent(ft->getSignature(), source))
+ perfect = true;
+#endif
application *a=application::match(e, (function *)(*t), source, al);
if (a)
l.push_back(a);
}
}
+#if DEBUG_GETAPP
+ cout << (perfect ? "PERFECT" : "IMPERFECT") << endl;
+#endif
+
if (l.size() > 1) {
// Return the most specific candidates.
maximizer m;