It is more useful to report all the errors instead of just the first.
LGTM=dave, khr
R=khr, dave
CC=golang-codereviews
https://golang.org/cl/
143940043
if(!(n->class & PHEAP))
return;
if(compiling_runtime)
- fatal("%N escapes to heap, not allowed in runtime.", n);
+ yyerror("%N escapes to heap, not allowed in runtime.", n);
if(n->alloc == nil)
n->alloc = callnew(n->type);
cgen_as(n->heapaddr, n->alloc);
// generate allocation & copying code
if(compiling_runtime)
- fatal("%N escapes to heap, not allowed in runtime.", v);
+ yyerror("%N escapes to heap, not allowed in runtime.", v);
if(v->alloc == nil)
v->alloc = callnew(v->type);
nn = list(nn, nod(OAS, v->heapaddr, v->alloc));