types.h
97 KB
-
compiler: make escape analysis work with imported inlineable functions · c2f879e1
The escape analysis was written before we import inlineable function bodies, and in some places it skipped functions that are not in the local package. Now that there are imported function bodies, make the escape analysis work with them. Note that it is necessary for the escape analysis to run on imported function bodies, even if they are already tagged. The tags only have the information of the parameters (receiver, results), but not the internal nodes, e.g. local variables. We still need to do the analysis to get all the information. (In the future maybe we could export/import escape info for internal nodes also, then we don't need to redo the analysis.) Also add assertions to ensure that if we analyze the same function in multiple places, they'd better agree with each other. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181537 From-SVN: r272124
Ian Lance Taylor committed