aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2019-09-04 17:45:50 -0700
committerMatthew Dempsky <mdempsky@google.com>2019-09-06 22:55:17 +0000
commitad1f2c96189be58c3c3c248af279b63a4f2466c1 (patch)
tree162dee123ade769f4d8244a824d9eec01b5b4d3d /src/database/sql
parente6ba19f9138dfaa981b281105fafabbf55250a18 (diff)
downloadgo-ad1f2c96189be58c3c3c248af279b63a4f2466c1.tar.xz
cmd/compile: use CTNIL for pointer-typed OLITERALs
We used to be more aggressive about constant folding in the frontend, handling expressions that the Go spec does not consider constant; e.g., "(*int)(unsafe.Pointer(uintptr(200)))". However, that led to a lot of subtle Go spec conformance issues, so we've since abandoned that effort (CL 151320), leaving SSA to handle these cases instead. As such, the only time we now end up with pointer-typed OLITERALs is when "nil" is implicitly converted to a pointer-typed variable. Instead of representing these OLITERALs with an CTINT of 0, we can just use CTNIL. Saves a few bytes of memory and lines of code. Change-Id: Ibc5c756b992fdc89c3bdaf4fda3aa352e8e2b101 Reviewed-on: https://go-review.googlesource.com/c/go/+/193437 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions