]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix inline static init with derived types
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 24 Nov 2022 05:43:22 +0000 (12:43 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 30 Nov 2022 23:25:43 +0000 (23:25 +0000)
commitc85848a4a62f839427bb56cb2772e008e405cf1f
tree73b67efff8b1b3530602234fdea9de8528afa06b
parent8c0256b398f3b23f24a1a3ac0cb00c2d8fb7f506
cmd/compile: fix inline static init with derived types

CL 450136 added handling for simple calls in staticinit. If there's any
derived types conversion in the body of generic function called, that
conversion will require runtime dictionary, thus the optimization could
not happen.

Fixes #56923

Change-Id: I498cee9f8ab4397812ef79a6c2ab6c55e0ee4aef
Reviewed-on: https://go-review.googlesource.com/c/go/+/453315
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Gabriel Morency (Amgc63spaming) <morencyvincent8@gmail.com>
src/cmd/compile/internal/staticinit/sched.go
test/fixedbugs/issue56923.go [new file with mode: 0644]