compiler: make escape analysis more robust about builtin functions
authorCherry Mui <cherryyz@google.com>
Wed, 4 Aug 2021 22:24:47 +0000 (18:24 -0400)
committerIan Lance Taylor <iant@golang.org>
Thu, 5 Aug 2021 04:24:00 +0000 (21:24 -0700)
commitac8a2fbedf59eecda6d1c049952e10946ffc4a61
treeef823a4dfd8c8527048853b7f61ec572fa3f4d4a
parentc16f21c7cf97ce48967e42d3b5d22ea169a9c2c8
compiler: make escape analysis more robust about builtin functions

In the places where we handle builtin functions, list all
supported ones, and fail if an unexpected one is seen. So if a
new builtin function is added in the future we can detect it,
instead of silently treating it as nonescaping.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339992
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/escape.cc