Commit 46beeed0 authored by Cherry Mui's avatar Cherry Mui
Browse files

[dev.typeparams] cmd/compile: allow go'd closure to escape when compiling runtime

When compiling runtime, we don't allow closures to escape,
because we don't want (implicit) allocations to occur when it is
not okay to allocate (e.g. in the allocator itself). However, for
go statement, it already allocates a new goroutine anyway. It is
okay to allocate the closure. Allow it.

Also include the closure's name when reporting error.

Updates #40724.

Change-Id: Id7574ed17cc27709609a059c4eaa67ba1c4436dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/325109


Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent 8e6dfe1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment