9b80d3d3db
Remove the code that verifies that an expression is a type or non-type expression. For one, it cannot be done perfectly accurate (e.g., consider *p which could be an indirection or a pointer type), it also unnecessarily slows down parsing. It's simpler to leave the verification to the type checker which has all the information needed. Remove short compiler tests that tested the expression/type property. Adjust a couple of go/types tests which now trigger because the parser doesn't complain anymore. Change file for benchmark from "parser.go" to "../printer/nodes.go" to avoid a moving target when benchmarking. The parser may be marginally faster when tested on nodes.go: name old time/op new time/op delta ParseOnly-12 1.35ms ± 0% 1.31ms ± 0% ~ (p=0.100 n=3+3) name old speed new speed delta ParseOnly-12 39.9MB/s ± 0% 41.0MB/s ± 0% ~ (p=0.100 n=3+3) For #54511. Change-Id: I9a32c24c2c6e843c3d1af4587651c352f378b490 Reviewed-on: https://go-review.googlesource.com/c/go/+/425716 Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Robert Griesemer <gri@google.com> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.