aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/util.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2016-03-11 13:39:20 -0500
committerDavid Crawshaw <crawshaw@golang.org>2016-03-11 21:27:23 +0000
commit5aa5db7593537e43b024d65b07f2a9c3379f100e (patch)
treee9aa499000336be14cef33b37222c67e98b164a3 /src/cmd/internal/obj/util.go
parentcc158403d618eafc476b0727f44e4468c61060f6 (diff)
downloadgo-5aa5db7593537e43b024d65b07f2a9c3379f100e.tar.xz
cmd/compile: use bufio.Reader directly in lexer
Removes an intermediate layer of functions that was clogging up a corner of the compiler's profile graph. I can't measure a performance improvement running a large build like jujud, but the profile reports less total time spent in gc.(*lexer).getr. Change-Id: I3000585cfcb0f9729d3a3859e9023690a6528591 Reviewed-on: https://go-review.googlesource.com/20565 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/util.go')
-rw-r--r--src/cmd/internal/obj/util.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index 4c37f76ca9..bd533a0036 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -129,18 +129,6 @@ func Bgetc(b *Biobuf) int {
return int(c)
}
-func Bgetrune(b *Biobuf) int {
- r, _, err := b.r.ReadRune()
- if err != nil {
- return -1
- }
- return int(r)
-}
-
-func Bungetrune(b *Biobuf) {
- b.r.UnreadRune()
-}
-
func (b *Biobuf) Read(p []byte) (int, error) {
return b.r.Read(p)
}
@@ -158,17 +146,6 @@ func Brdline(b *Biobuf, delim int) string {
return string(s)
}
-func Brdstr(b *Biobuf, delim int, cut int) string {
- s, err := b.r.ReadString(byte(delim))
- if err != nil {
- log.Fatalf("reading input: %v", err)
- }
- if len(s) > 0 && cut > 0 {
- s = s[:len(s)-1]
- }
- return s
-}
-
func Blinelen(b *Biobuf) int {
return b.linelen
}