AMEMWORD,
BADWIDTH = -1000000000,
- MAXWIDTH = 1<<30
+ MAXWIDTH = 1<<30
};
/*
Node* left;
Node* right;
Type* type;
+ Type* realtype; // as determined by typecheck
NodeList* list;
NodeList* rlist;
*
* typedef struct
* { // must not move anything
- * uchar array[8]; // pointer to data
- * uchar nel[4]; // number of elements
- * uchar cap[4]; // allocated number of elements
+ * uchar array[8]; // pointer to data
+ * uchar nel[4]; // number of elements
+ * uchar cap[4]; // allocated number of elements
* } Array;
*/
EXTERN int Array_array; // runtime offsetof(Array,array) - same for String
*
* typedef struct
* { // must not move anything
- * uchar array[8]; // pointer to data
- * uchar nel[4]; // number of elements
+ * uchar array[8]; // pointer to data
+ * uchar nel[4]; // number of elements
* } String;
*/
EXTERN int sizeof_String; // runtime sizeof(String)
fmtprint(fp, "...%T", t->type->type);
else
fmtprint(fp, "%T", t->type);
- if(t->note) {
+ if(t->note) {
fmtprint(fp, " ");
if(exporting)
fmtprint(fp, ":");
Sym*
ngotype(Node *n)
{
- if(n->sym != S && strncmp(n->sym->name, "autotmp_", 8) != 0)
- if(n->type->etype != TFUNC || n->type->thistuple == 0)
- if(n->type->etype != TSTRUCT || n->type->funarg == 0)
- return typename(n->type)->left->sym;
+ if(n->sym != S && n->realtype != T)
+ if(strncmp(n->sym->name, "autotmp_", 8) != 0)
+ if(strncmp(n->sym->name, "statictmp_", 8) != 0)
+ return typename(n->realtype)->left->sym;
+
return S;
}
t->len = strlen(s);
return t;
}
-