Exemple #1
0
  const std::string UlamType::getUlamTypeMangledType()
  {
    // e.g. parsing overloaded functions, may not be complete.
    std::ostringstream mangled;
    s32 bitsize = getBitSize();
    s32 arraysize = getArraySize();

    if(isReference()) //includes ALT_ARRAYITEM (t3147); not isAltRefType (t3114)
      mangled << "r"; //e.g. t3114

    if(arraysize > 0)
      mangled << ToLeximitedNumber(arraysize);
    //    else if(arraysize == 0)
    //  mangled << ToLeximitedNumber(-1); //distinct from scalar
    else
      mangled << 10; //scalar NONARRAYSIZE

    if(bitsize > 0)
      mangled << ToLeximitedNumber(bitsize);
    else
      mangled << 10;

    std::string ecode(UlamType::getUlamTypeEnumCodeChar(getUlamTypeEnum()));
    mangled << ToLeximited(ecode).c_str();

    return mangled.str();
  } //getUlamTypeMangledType
Exemple #2
0
  const std::string UlamTypePrimitive::getUlamTypeMangledType()
  {
    // e.g. parsing overloaded functions, may not be complete.
    std::ostringstream mangled;
    s32 bitsize = getBitSize();
    s32 arraysize = getArraySize();

    if(isReference()) //includes ALT_ARRAYITEM (t3147)
      mangled << "r";

    if(arraysize > 0)
      mangled << ToLeximitedNumber(arraysize);
    else
      mangled << 10;

    if(bitsize > 0)
      mangled << ToLeximitedNumber(bitsize);
    else
      mangled << 10;

    std::string ecode(UlamTypePrimitive::getUlamTypeEnumCodeChar(getUlamTypeEnum()));
    mangled << ToLeximited(ecode).c_str();

    return mangled.str();
  } //getUlamTypeMangledType
Exemple #3
0
/*
 * helper for bfcode() to put register arguments on stack.
 */
static void
argmove(struct symtab *s, int regno)
{
	NODE *p, *r;

	s->sclass = AUTO;
	s->soffset = NOOFFSET;
	oalloc(s, &autooff);
	p = nametree(s);
	r = bcon(0);
	r->n_op = REG;
	r->n_rval = regno;
	r->n_type = p->n_type;
	r->n_sue = p->n_sue;
	r->n_df = p->n_df;
	ecode(buildtree(ASSIGN, p, r));
}