mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
cmd/gc: must not inline panic, recover
R=lvd, gri CC=golang-dev https://golang.org/cl/5731061
This commit is contained in:
parent
5ab9d2befd
commit
cae604f734
@ -182,6 +182,8 @@ ishairy(Node *n, int *budget)
|
|||||||
case OCALLFUNC:
|
case OCALLFUNC:
|
||||||
case OCALLINTER:
|
case OCALLINTER:
|
||||||
case OCALLMETH:
|
case OCALLMETH:
|
||||||
|
case OPANIC:
|
||||||
|
case ORECOVER:
|
||||||
if(debug['l'] < 4)
|
if(debug['l'] < 4)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
@ -31,3 +31,9 @@ func f1() {
|
|||||||
}
|
}
|
||||||
f()
|
f()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func f2() {} // ERROR "can inline f2"
|
||||||
|
|
||||||
|
// No inline for panic, recover.
|
||||||
|
func f3() { panic(1) }
|
||||||
|
func f4() { recover() }
|
||||||
|
Loading…
Reference in New Issue
Block a user