diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa')
-rw-r--r-- | src/cmd/compile/internal/ssa/func.go | 4 | ||||
-rw-r--r-- | src/cmd/compile/internal/ssa/print.go | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index 35a9382663..75f17634ec 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -8,8 +8,8 @@ import ( "cmd/compile/internal/abi" "cmd/compile/internal/base" "cmd/compile/internal/types" + "cmd/internal/notsha256" "cmd/internal/src" - "crypto/sha1" "fmt" "io" "math" @@ -854,7 +854,7 @@ func (f *Func) DebugHashMatch(evname string) bool { // We use this feature to do a binary search to // find a function that is incorrectly compiled. hstr := "" - for _, b := range sha1.Sum([]byte(name)) { + for _, b := range notsha256.Sum256([]byte(name)) { hstr += fmt.Sprintf("%08b", b) } diff --git a/src/cmd/compile/internal/ssa/print.go b/src/cmd/compile/internal/ssa/print.go index 96cd2c7c90..aea9ce9e33 100644 --- a/src/cmd/compile/internal/ssa/print.go +++ b/src/cmd/compile/internal/ssa/print.go @@ -6,10 +6,11 @@ package ssa import ( "bytes" - "cmd/internal/src" - "crypto/sha256" "fmt" "io" + + "cmd/internal/notsha256" + "cmd/internal/src" ) func printFunc(f *Func) { @@ -17,7 +18,7 @@ func printFunc(f *Func) { } func hashFunc(f *Func) []byte { - h := sha256.New() + h := notsha256.New() p := stringFuncPrinter{w: h, printDead: true} fprintFunc(p, f) return h.Sum(nil) @@ -32,7 +33,7 @@ func (f *Func) String() string { // rewriteHash returns a hash of f suitable for detecting rewrite cycles. func (f *Func) rewriteHash() string { - h := sha256.New() + h := notsha256.New() p := stringFuncPrinter{w: h, printDead: false} fprintFunc(p, f) return fmt.Sprintf("%x", h.Sum(nil)) |