]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: correct liveness for func ending in panic
authorRuss Cox <rsc@golang.org>
Fri, 14 Feb 2014 04:56:53 +0000 (23:56 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 14 Feb 2014 04:56:53 +0000 (23:56 -0500)
commitab9e8d068aafce0df7edca629af0549b5f54d3c9
treeab41f924566f99b3df218bf7390731d26397fc9f
parent02ae91f3424d45820a5b98ddc2595680666a97e0
cmd/gc: correct liveness for func ending in panic

The registerization code needs the function to end in a RET,
even if that RET is actually unreachable.

The liveness code needs to avoid such unreachable RETs.
It had a special case for final RET after JMP, but no case
for final RET after UNDEF. Instead of expanding the special
cases, let fixjmp - which already knows what is and is not
reachable definitively - mark the unreachable RET so that
the liveness code can identify it.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/63680043
src/cmd/gc/plive.c
src/cmd/gc/popt.c
test/live.go