aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2022-05-15 08:05:41 +0700
committerGopher Robot <gobot@golang.org>2022-05-17 00:58:22 +0000
commitf2b1cde544d190e1f4642ef6f4ac8ef9ce31a0c3 (patch)
treed234955736bbadd48fda7435d9610604a8438979 /src/cmd/vendor/github.com
parentb79c135f377e2cbae888ef50b83f1ee5025af906 (diff)
downloadgo-f2b1cde544d190e1f4642ef6f4ac8ef9ce31a0c3.tar.xz
cmd/compile: tighten the condition for inlining shape/non-shape function
CL 395854 made inline pass to not inlining function with shape params, but pass no shape arguments. This is intended to be the reverse case of CL 361260. However, CL 361260 is using wider condition than necessary. Though it only needs to check against function parameters, it checks whether the function type has no shape. It does not cause any issue, because !fn.Type().HasShape() implies !fn.Type().Params().HasShape(). But for the reverse case, it's not true. Function may have shape type, but has no shape arguments. Thus, we must tighten the condition to explicitly check against the function parameters only. Fixes #52907 Change-Id: Ib87e87ff767c31d99d5b36aa4a6c1d8baf32746d Reviewed-on: https://go-review.googlesource.com/c/go/+/406475 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/vendor/github.com')
0 files changed, 0 insertions, 0 deletions