compiler: improve type caching for interface types
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Aug 2016 20:01:09 +0000 (20:01 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Aug 2016 20:01:09 +0000 (20:01 +0000)
commitf177a3d139bd6ff92eef93e0e3559ad6793e956b
tree9b28758c6ec6f21969975d0f9bde402698d8e2f1
parentc7fdbdcdbd9f2ea3393ff6b3714394fa3922ab09
compiler: improve type caching for interface types

    Add a cached to Interface_info_expression::do_type() so as to reuse
    previously created interface types. This change reduces gccgo peak heap
    usage when compiling the "fmt" package from around 16mb to around 10mb.

    Fixes golang/go#16334

    Reviewed-on: https://go-review.googlesource.com/24890

From-SVN: r239095
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc