]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle min/max correctly in mayCall
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 28 Jun 2023 16:15:35 +0000 (23:15 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 28 Jun 2023 21:18:31 +0000 (21:18 +0000)
commit8b5fe5980cc116366b37ed8aa83569cadf5772d0
treee62251e383a375cf91a483dcac4be253c8621d90
parent79d4defa75a26dd975c6ba3ac938e0e414dfd3e9
cmd/compile: handle min/max correctly in mayCall

CL 500575 changed mayCall to return "false" for min/max builtin.

However, with string or float, min/max requires runtime call, so mayCall
should return true instead. This's probably not a big problem, because
CL 506115 makes order pass handle min/max correctly. But it's still
better to do it the right way.

Updates #60582

Change-Id: I9779ca62bebd0f95e52ad5fa55b9160dc35b33aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/506855
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/walk/walk.go