diff options
author | David Crawshaw <crawshaw@golang.org> | 2016-03-11 13:39:20 -0500 |
---|---|---|
committer | David Crawshaw <crawshaw@golang.org> | 2016-03-11 21:27:23 +0000 |
commit | 5aa5db7593537e43b024d65b07f2a9c3379f100e (patch) | |
tree | e9aa499000336be14cef33b37222c67e98b164a3 /test/syntax | |
parent | cc158403d618eafc476b0727f44e4468c61060f6 (diff) | |
download | go-5aa5db7593537e43b024d65b07f2a9c3379f100e.tar.gz go-5aa5db7593537e43b024d65b07f2a9c3379f100e.zip |
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 'test/syntax')
-rw-r--r-- | test/syntax/ddd.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/syntax/ddd.go b/test/syntax/ddd.go new file mode 100644 index 0000000000..476ae22793 --- /dev/null +++ b/test/syntax/ddd.go @@ -0,0 +1,11 @@ +// errorcheck + +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +func f() { + g(f..3) // ERROR "unexpected literal \.3, expecting name or \(" +} |