all: format code according to Go 1.19 rules

Go 1.19 started reformatting code in a way that makes it more obvious
how it will be rendered on pkg.go.dev. It gets it almost right, but not
entirely. Therefore, I had to modify some of the comments so that they
are formatted correctly.
This commit is contained in:
Ayke van Laethem
2022-08-03 16:24:47 +02:00
committed by Ayke
parent f936125658
commit c7a23183e8
114 changed files with 509 additions and 381 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import (
// OptimizeStringToBytes transforms runtime.stringToBytes(...) calls into const
// []byte slices whenever possible. This optimizes the following pattern:
//
// w.Write([]byte("foo"))
// w.Write([]byte("foo"))
//
// where Write does not store to the slice.
func OptimizeStringToBytes(mod llvm.Module) {
@@ -91,12 +91,12 @@ func OptimizeStringEqual(mod llvm.Module) {
// OptimizeReflectImplements optimizes the following code:
//
// implements := someType.Implements(someInterfaceType)
// implements := someType.Implements(someInterfaceType)
//
// where someType is an arbitrary reflect.Type and someInterfaceType is a
// reflect.Type of interface kind, to the following code:
//
// _, implements := someType.(interfaceType)
// _, implements := someType.(interfaceType)
//
// if the interface type is known at compile time (that is, someInterfaceType is
// a LLVM constant aggregate). This optimization is especially important for the