aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2008-06-24 11:10:47 -0700
committerKen Thompson <ken@golang.org>2008-06-24 11:10:47 -0700
commit90846cd447bfc8fd231041daddee58998c3e7ad7 (patch)
tree52d407626aaf5c630f7545ececc61ce85336d06a /src
parent78c8dec9446e0d3140a2c14f222cab1227a435af (diff)
downloadgo-90846cd447bfc8fd231041daddee58998c3e7ad7.tar.xz
map[int] bug
SVN=124332
Diffstat (limited to 'src')
-rw-r--r--src/cmd/gc/walk.c14
-rw-r--r--src/runtime/runtime.c2
2 files changed, 7 insertions, 9 deletions
diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c
index 5948a6b1e0..86fe1439d6 100644
--- a/src/cmd/gc/walk.c
+++ b/src/cmd/gc/walk.c
@@ -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
diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c
index 2c1acadec6..5b8d0489eb 100644
--- a/src/runtime/runtime.c
+++ b/src/runtime/runtime.c
@@ -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=");