]> Cypherpunks repositories - gostls13.git/commitdiff
bytes: annotate assembly functions with //go:noescape
authorShenghou Ma <minux.ma@gmail.com>
Sat, 9 Feb 2013 16:08:30 +0000 (00:08 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Sat, 9 Feb 2013 16:08:30 +0000 (00:08 +0800)
R=golang-dev, agl, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7299064

src/pkg/bytes/bytes.go
src/pkg/bytes/bytes_decl.go

index 6d40af4436c735d209f4ebdce2547d76ffb77b62..3bab65ef901207ad8402d05765c49c76eaa7efb0 100644 (file)
@@ -37,10 +37,6 @@ func Compare(a, b []byte) int {
        return 0
 }
 
-// Equal returns a boolean reporting whether a == b.
-// A nil argument is equivalent to an empty slice.
-func Equal(a, b []byte) bool
-
 func equalPortable(a, b []byte) bool {
        if len(a) != len(b) {
                return false
index 5d2b9e6393a0f7c7b61da95e7782fdb8254533d7..ce78be416a9a57a2b47abf992fcb19d37bec0e19 100644 (file)
@@ -4,5 +4,13 @@
 
 package bytes
 
+//go:noescape
+
 // IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s.
 func IndexByte(s []byte, c byte) int // asm_$GOARCH.s
+
+//go:noescape
+
+// Equal returns a boolean reporting whether a == b.
+// A nil argument is equivalent to an empty slice.
+func Equal(a, b []byte) bool // asm_$GOARCH.s