]> Cypherpunks repositories - gostls13.git/commitdiff
map[int] bug
authorKen Thompson <ken@golang.org>
Tue, 24 Jun 2008 18:10:47 +0000 (11:10 -0700)
committerKen Thompson <ken@golang.org>
Tue, 24 Jun 2008 18:10:47 +0000 (11:10 -0700)
SVN=124332

src/cmd/gc/walk.c
src/runtime/runtime.c

index 5948a6b1e064d09faea58cbf0dd597a614081126..86fe1439d6c1aeccbf55c321eaad6c7391b69005 100644 (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
index 2c1acadec6611f2491e9b7db02a14245769b0695..5b8d0489eb4d6f7d8d726487b6e265eb5abf88e1 100644 (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=");