void InitialStateVisitController::visit_assignment(assignment *a)
{
    const parameter_symbol_list& psl = *a->getFTerm()->getArgs();
    //const string& fname = a->getFTerm()->getFunction()->getName();
    VecInt intArgs(psl.size()+1);
    intArgs[0] = proc->funcHeadTbl[a->getFTerm()->getFunction()->getName()];
    //cout << "INIT:GettingPredHeadId: " << intArgs[0] << "\n";
    // Process the l-value
    int i = 1;
    for (parameter_symbol_list::const_iterator itr = psl.begin(); itr != psl.end(); ++itr, ++i) {
      if ((*itr)->isConstant()) {
	intArgs[i] =  proc->objectTbl[(*itr)->getName()];
	assert(intArgs[i] >= 0);
      } else {
  	assert(false);
      }
    }
    // process the rvalue
    a->getExpr()->visit(this);
    ws.setValue(FunctionKey(intArgs),this->rValue);
}
Beispiel #2
0
CodeCache::FunctionKey CodeCache::makeFunctionKey(const SourceCode& source, const String& name)
{
    return FunctionKey(source.toString(), name);
}