1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:47:57 -07:00

map[int] bug

SVN=124332
This commit is contained in:
Ken Thompson 2008-06-24 11:10:47 -07:00
parent 78c8dec944
commit 90846cd447
2 changed files with 7 additions and 9 deletions

View File

@ -864,9 +864,6 @@ walkdot(Node *n, int top)
Type *t, *f;
int i;
if(debug['T'])
print("%L walkdot %O %d\n", n->op, top);
if(n->left == N || n->right == N)
return;
@ -1415,15 +1412,16 @@ mapop(Node *n, int top)
}
a = n->right; // key
if(!isptr[t->down->etype]) {
a = nod(OADDR, a, N);
a->type = ptrto(t);
}
// if(!isptr[t->down->etype]) {
// a = nod(OADDR, a, N);
// a->type = ptrto(t);
// }
r = a;
a = n->left; // map
r = nod(OLIST, a, r);
on = syslook("mapaccess2", 1);
on = syslook("mapaccess1", 1);
argtype(on, t->down); // any-1
argtype(on, t->type); // any-2

View File

@ -990,7 +990,7 @@ sys_mapaccess1(Hmap *m, ...)
m->valalg->copy(m->valsize, av, 0);
out:
if(1) {
if(debug) {
prints("sys_mapaccess1: map=");
sys_printpointer(m);
prints("; key=");