Kaydet (Commit) 3d47e860 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Be more informative

Change-Id: I58cd259055b87cd78d7c6936b2e479ff2cd1ed40
üst 8c291bb1
...@@ -77,6 +77,42 @@ namespace sc { namespace opencl { ...@@ -77,6 +77,42 @@ namespace sc { namespace opencl {
namespace { namespace {
std::string StackVarEnumToString(StackVarEnum e)
{
switch (e)
{
#define CASE(x) case sv##x: return #x
CASE(Byte);
CASE(Double);
CASE(String);
CASE(SingleRef);
CASE(DoubleRef);
CASE(Matrix);
CASE(Index);
CASE(Jump);
CASE(External);
CASE(FAP);
CASE(JumpMatrix);
CASE(RefList);
CASE(EmptyCell);
CASE(MatrixCell);
CASE(HybridCell);
CASE(HybridValueCell);
CASE(ExternalSingleRef);
CASE(ExternalDoubleRef);
CASE(ExternalName);
CASE(SingleVectorRef);
CASE(DoubleVectorRef);
CASE(Subroutine);
CASE(Error);
CASE(Missing);
CASE(Sep);
CASE(Unknown);
#undef CASE
}
return std::to_string(static_cast<int>(e));
}
#ifdef SAL_DETAIL_ENABLE_LOG_INFO #ifdef SAL_DETAIL_ENABLE_LOG_INFO
std::string linenumberify(const std::string s) std::string linenumberify(const std::string s)
{ {
...@@ -2553,7 +2589,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments( ...@@ -2553,7 +2589,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(
} }
else else
{ {
throw UnhandledToken(pChild, "unknown operand for ocPush"); throw UnhandledToken(pChild, ("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str());
} }
break; break;
case ocDiv: case ocDiv:
......
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