]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: use *byte for pointer to string memory
authorMatthew Dempsky <mdempsky@google.com>
Wed, 30 Mar 2016 21:26:04 +0000 (14:26 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 4 Apr 2016 18:19:51 +0000 (18:19 +0000)
Change-Id: I14cff013ef4920d33b5ead0c75d51681bb4f635a
Reviewed-on: https://go-review.googlesource.com/21337
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/cgen.go

index 4b2bf456b1a9aca8533575d206da45082ab1d9a1..c594ad4c110c1a6cec650cc1ada6edf1691aa659 100644 (file)
@@ -3469,11 +3469,7 @@ func cgen_slice(n, res *Node, wb bool) {
                } else {
                        var ptr *Type
                        if n.Op == OSLICESTR {
-                               // Yikes! Ptrto(nil)?!
-                               // Prior to CL 21331, that's what this code did implicitly.
-                               // Now it does it explicitly, to safely preserve old behavior.
-                               // This will all be replaced by SSA anyway.
-                               ptr = Ptrto(nil)
+                               ptr = ptrToUint8
                        } else {
                                ptr = Ptrto(n.Type.Elem())
                        }