Commit 75fe1303 authored by Russ Cox's avatar Russ Cox

maps have == so maps are okay as map keys.

alignment issue is fixed.

R=ken
OCL=31124
CL=31144
parent 84ded328
...@@ -327,7 +327,7 @@ algtype(Type *t) ...@@ -327,7 +327,7 @@ algtype(Type *t)
{ {
int a; int a;
if(issimple[t->etype] || isptr[t->etype] || t->etype == TCHAN || t->etype == TFUNC) if(issimple[t->etype] || isptr[t->etype] || t->etype == TCHAN || t->etype == TFUNC || t->etype == TMAP)
a = AMEM; // just bytes (int, ptr, etc) a = AMEM; // just bytes (int, ptr, etc)
else if(t->etype == TSTRING) else if(t->etype == TSTRING)
a = ASTRING; // string a = ASTRING; // string
......
...@@ -610,7 +610,7 @@ loop: ...@@ -610,7 +610,7 @@ loop:
goto nottop; goto nottop;
walkconv(n); walkconv(n);
goto ret; goto ret;
case OCONVNOP: case OCONVNOP:
goto ret; goto ret;
...@@ -2111,13 +2111,11 @@ ascompatte(int op, Type **nl, Node **nr, int fp) ...@@ -2111,13 +2111,11 @@ ascompatte(int op, Type **nl, Node **nr, int fp)
&& structnext(&peekl) != T && structnext(&peekl) != T
&& listnext(&peekr) == N && listnext(&peekr) == N
&& eqtypenoname(r->type, *nl)) { && eqtypenoname(r->type, *nl)) {
// TODO(rsc): clumsy check for differently aligned structs. // clumsy check for differently aligned structs.
// need to handle eventually, but this keeps us // now that output structs are aligned separately
// from inserting bugs // from the input structs, should never happen.
if(r->type->width != (*nl)->width) { if(r->type->width != (*nl)->width)
fprint(2, "oops: %T %d %T %d\n", r->type, r->type->width, (*nl), (*nl)->width); fatal("misaligned multiple return\n\t%T\n\t%T", r->type, *nl);
yyerror("misaligned multiple return (6g's fault)");
}
a = nodarg(*nl, fp); a = nodarg(*nl, fp);
a->type = r->type; a->type = r->type;
return convas(nod(OAS, a, r)); return convas(nod(OAS, a, r));
......
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