]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: change the multiple (gossa)hash separator from ; to /
authorDavid Chase <drchase@google.com>
Fri, 4 Nov 2022 15:23:12 +0000 (11:23 -0400)
committerDavid Chase <drchase@google.com>
Fri, 4 Nov 2022 20:28:30 +0000 (20:28 +0000)
Semicolon has bad copy-paste ergonomics; it requires quoting.
Slash is okay, and won't be a separator ever in debug strings
because it is already used in e.g. ssa/phase/debug=etc.

Change-Id: I493360e9282666eea1a342971a77df2ebd6c92ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/447975
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/base/hashdebug.go
src/cmd/compile/internal/base/hashdebug_test.go

index c93d042f712c0d4a29de86f196ba68d077f93f9d..609f80393e954428c9940295c90e262cd66b0689 100644 (file)
@@ -140,7 +140,7 @@ func NewHashDebug(ev, s string, file writeSyncer) *HashDebug {
                hd.no = true
                return hd
        }
-       ss := strings.Split(s, ";")
+       ss := strings.Split(s, "/")
        hd.matches = append(hd.matches, toHashAndMask(ss[0], ev))
        // hash searches may use additional EVs with 0, 1, 2, ... suffixes.
        for i := 1; i < len(ss); i++ {
index decdf5ce0f34eb785ccb6450ae22b28464d37a8e..b74169f895a48dccef95115ea47721a070c297bc 100644 (file)
@@ -130,7 +130,7 @@ func TestHashNoMatch(t *testing.T) {
 
 func TestHashSecondMatch(t *testing.T) {
        ws := new(bufferWithSync)
-       hd := NewHashDebug("GOSSAHASH", "001100;0011", ws)
+       hd := NewHashDebug("GOSSAHASH", "001100/0011", ws)
 
        check := hd.DebugHashMatch("bar")
        msg := ws.String()