Commit 3c5f3a86 authored by Russ Cox's avatar Russ Cox

print(map) and print(chan) as pointers.

R=ken
OCL=23520
CL=23520
parent 646b3b5c
......@@ -16,7 +16,7 @@ func printbool(bool);
func printfloat(float64);
func printint(int64);
func printstring(string);
func printpointer(*any);
func printpointer(any);
func printinter(any);
func printarray(any);
func printnl();
......
......@@ -8,7 +8,7 @@ char *sysimport =
"func sys.printfloat (? float64)\n"
"func sys.printint (? int64)\n"
"func sys.printstring (? string)\n"
"func sys.printpointer (? *any)\n"
"func sys.printpointer (? any)\n"
"func sys.printinter (? any)\n"
"func sys.printarray (? any)\n"
"func sys.printnl ()\n"
......
......@@ -1983,9 +1983,9 @@ loop:
argtype(on, l->type); // any-1
break;
}
if(isptr[l->type->etype]) {
if(isptr[l->type->etype] || l->type->etype == TCHAN || l->type->etype == TMAP) {
on = syslook("printpointer", 1);
argtype(on, l->type->type); // any-1
argtype(on, l->type); // any-1
break;
}
if(isslice(l->type)) {
......@@ -1993,7 +1993,7 @@ loop:
argtype(on, l->type); // any-1
break;
}
badtype(n->op, l->type, T);
badtype(OPRINT, l->type, T);
l = listnext(&save);
goto loop;
......
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