Commit 90846cd4 authored by Ken Thompson's avatar Ken Thompson

map[int] bug

SVN=124332
parent 78c8dec9
...@@ -864,9 +864,6 @@ walkdot(Node *n, int top) ...@@ -864,9 +864,6 @@ walkdot(Node *n, int top)
Type *t, *f; Type *t, *f;
int i; int i;
if(debug['T'])
print("%L walkdot %O %d\n", n->op, top);
if(n->left == N || n->right == N) if(n->left == N || n->right == N)
return; return;
...@@ -1415,15 +1412,16 @@ mapop(Node *n, int top) ...@@ -1415,15 +1412,16 @@ mapop(Node *n, int top)
} }
a = n->right; // key a = n->right; // key
if(!isptr[t->down->etype]) { // if(!isptr[t->down->etype]) {
a = nod(OADDR, a, N); // a = nod(OADDR, a, N);
a->type = ptrto(t); // a->type = ptrto(t);
} // }
r = a; r = a;
a = n->left; // map a = n->left; // map
r = nod(OLIST, a, r); r = nod(OLIST, a, r);
on = syslook("mapaccess2", 1); on = syslook("mapaccess1", 1);
argtype(on, t->down); // any-1 argtype(on, t->down); // any-1
argtype(on, t->type); // any-2 argtype(on, t->type); // any-2
......
...@@ -990,7 +990,7 @@ sys_mapaccess1(Hmap *m, ...) ...@@ -990,7 +990,7 @@ sys_mapaccess1(Hmap *m, ...)
m->valalg->copy(m->valsize, av, 0); m->valalg->copy(m->valsize, av, 0);
out: out:
if(1) { if(debug) {
prints("sys_mapaccess1: map="); prints("sys_mapaccess1: map=");
sys_printpointer(m); sys_printpointer(m);
prints("; key="); prints("; key=");
......
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