void
c_unparser::emit_functionsig (functiondecl* v)
{
- o->newline() << "static void function_" << v->name
+ o->newline() << "static void " << c_funcname(v->name)
<< " (struct context * __restrict__ c);";
}
}
o->newline() << "{";
- o->newline(1) << ".lock = &global.s_" + v->name + "_lock,";
+ o->newline(1) << ".lock = &global." + c_globalname(v->name) + "_lock,";
o->newline() << ".write_p = " << (write_p ? 1 : 0) << ",";
o->newline() << "#ifdef STP_TIMING";
o->newline() << ".skipped = &global." << c_globalname (v->name) << "_lock_skip_count,";
string
c_unparser::c_globalname (const string& e)
{
+ // XXX uncomment to test custom mangling:
+ // return "s_" + e + "_" + lex_cast(do_hash(e.c_str()));
return "s_" + e;
}
string
c_unparser::c_funcname (const string& e)
{
+ // XXX uncomment to test custom mangling:
+ // return "function_" + e + "_" + lex_cast(do_hash(e.c_str()));
return "function_" + e;
}