From c2655313aeb8c6583272a38e75d699e9d5879c9f Mon Sep 17 00:00:00 2001 From: Tomas Kalibera Date: Mon, 10 Apr 2017 11:27:24 +0200 Subject: [PATCH] Print which builtins call errorcall/error. --- src/einfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/einfo.cpp b/src/einfo.cpp index ead78ab..590b9f9 100644 --- a/src/einfo.cpp +++ b/src/einfo.cpp @@ -1,6 +1,7 @@ #include "dofunc.h" #include "ftable.h" +#include "call.h" #include #include @@ -165,6 +166,13 @@ int main(int argc, char* argv[]) { errs() << nfo.str() << " " << dumpFunctionArities(uniqueFunctionArities(fun, funtab), nfo.effectiveArity) << (e.isSpecial() ? " SPECIAL" : " BUILTIN") << " " << (e.isPrimitive() ? "PRIMITIVE" : "INTERNAL"); + if (1) { + if (!e.isPrimitive()) { + if (mayCall(fun, m->getFunction("Rf_errorcall"), m->getFunction("Rf_error"))) errs() << "!!!errorcall"; + } else { + if (mayCall(fun, m->getFunction("Rf_error"), m->getFunction("Rf_errorcall"))) errs() << "!!!error"; + } + } errs() << " " << funLocation(fun) << "\n"; if (0) {