Commit 62ba15a4 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: add more non-returning runtime calls

This list now matches the one in popt.go.

Change-Id: Ib24de531cc35252f0ef276e5c6d247654b021533
Reviewed-on: https://go-review.googlesource.com/28965
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 8086e7c6
......@@ -585,9 +585,9 @@ func (s *state) stmt(n *Node) {
case OCALLMETH, OCALLINTER:
s.call(n, callNormal)
if n.Op == OCALLFUNC && n.Left.Op == ONAME && n.Left.Class == PFUNC &&
(compiling_runtime && n.Left.Sym.Name == "throw" ||
n.Left.Sym.Pkg == Runtimepkg && (n.Left.Sym.Name == "gopanic" || n.Left.Sym.Name == "selectgo" || n.Left.Sym.Name == "block")) {
if n.Op == OCALLFUNC && n.Left.Op == ONAME && n.Left.Class == PFUNC {
if fn := n.Left.Sym.Name; compiling_runtime && fn == "throw" ||
n.Left.Sym.Pkg == Runtimepkg && (fn == "throwinit" || fn == "gopanic" || fn == "panicwrap" || fn == "selectgo" || fn == "block") {
m := s.mem()
b := s.endBlock()
b.Kind = ssa.BlockExit
......@@ -596,6 +596,7 @@ func (s *state) stmt(n *Node) {
// first place. Need to wait until all backends
// go through SSA.
}
}
case ODEFER:
s.call(n.Left, callDefer)
case OPROC:
......
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