aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-08-04 10:12:20 +0800
committerMatthew Dempsky <mdempsky@google.com>2022-08-04 20:35:21 +0000
commit91d5ce3def7c967b23de37546439bb4714e26e8a (patch)
tree5b4c435f91279ba82eaed7432339f621f5c39c50 /src/cmd/compile
parent39728f412d5fb6d97568cc84a42f1caf07dbaedc (diff)
downloadgo-91d5ce3def7c967b23de37546439bb4714e26e8a.tar.xz
all: clean up TODO after fixing issue 44505
For #44505 Change-Id: I89220be02372b5340cb987bf2ac870a9346a8c8f Reviewed-on: https://go-review.googlesource.com/c/go/+/421079 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/compile')
-rw-r--r--src/cmd/compile/internal/noder/unified.go4
-rw-r--r--src/cmd/compile/internal/typecheck/iimport.go5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/noder/unified.go b/src/cmd/compile/internal/noder/unified.go
index 1ded367383..922189f4d3 100644
--- a/src/cmd/compile/internal/noder/unified.go
+++ b/src/cmd/compile/internal/noder/unified.go
@@ -5,13 +5,13 @@
package noder
import (
- "bytes"
"fmt"
"internal/goversion"
"internal/pkgbits"
"io"
"runtime"
"sort"
+ "strings"
"cmd/compile/internal/base"
"cmd/compile/internal/inline"
@@ -180,7 +180,7 @@ func writePkgStub(noders []*noder) string {
w.Flush()
}
- var sb bytes.Buffer // TODO(mdempsky): strings.Builder after #44505 is resolved
+ var sb strings.Builder
pw.DumpTo(&sb)
// At this point, we're done with types2. Make sure the package is
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go
index 96aaac6362..84c748f7f0 100644
--- a/src/cmd/compile/internal/typecheck/iimport.go
+++ b/src/cmd/compile/internal/typecheck/iimport.go
@@ -11,6 +11,7 @@ import (
"encoding/binary"
"fmt"
"go/constant"
+ "io"
"math/big"
"os"
"strings"
@@ -148,9 +149,7 @@ func ReadImports(pkg *types.Pkg, data string) {
sLen := int64(ird.uint64())
dLen := int64(ird.uint64())
- // TODO(mdempsky): Replace os.SEEK_CUR with io.SeekCurrent after
- // #44505 is fixed.
- whence, _ := ird.Seek(0, os.SEEK_CUR)
+ whence, _ := ird.Seek(0, io.SeekCurrent)
stringData := data[whence : whence+sLen]
declData := data[whence+sLen : whence+sLen+dLen]
ird.Seek(sLen+dLen, os.SEEK_CUR)