Commit 7e0dac08 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: fix and improve comments

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant, khr, rsc
https://golang.org/cl/67460043
parent 0b0e209f
...@@ -226,7 +226,7 @@ runtime·panic(Eface e) ...@@ -226,7 +226,7 @@ runtime·panic(Eface e)
break; break;
// take defer off list in case of recursive panic // take defer off list in case of recursive panic
g->defer = d->link; g->defer = d->link;
g->ispanic = true; // rock for newstack, where reflect.newstackcall ends up g->ispanic = true; // rock for runtime·newstack, where runtime·newstackcall ends up
argp = d->argp; argp = d->argp;
pc = d->pc; pc = d->pc;
runtime·newstackcall(d->fn, (byte*)d->args, d->siz); runtime·newstackcall(d->fn, (byte*)d->args, d->siz);
...@@ -246,7 +246,8 @@ runtime·panic(Eface e) ...@@ -246,7 +246,8 @@ runtime·panic(Eface e)
// ran out of deferred calls - old-school panic now // ran out of deferred calls - old-school panic now
runtime·startpanic(); runtime·startpanic();
printpanics(g->panic); printpanics(g->panic);
runtime·dopanic(0); runtime·dopanic(0); // should not return
runtime·exit(1); // not reached
} }
// Unwind the stack after a deferred function calls recover // Unwind the stack after a deferred function calls recover
......
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