From 5aa5db7593537e43b024d65b07f2a9c3379f100e Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Fri, 11 Mar 2016 13:39:20 -0500 Subject: 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 Run-TryBot: David Crawshaw TryBot-Result: Gobot Gobot --- test/syntax/ddd.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/syntax/ddd.go (limited to 'test/syntax') 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 \(" +} -- cgit v1.3-5-g9baa