token/position: implemented Pos
A pos value represents a file-set specific, accurate source position value. It is 8x smaller in size than the corresponding Position value (4 bytes vs 32 bytes). Using Pos values instead of Position values in AST saves approx. 25MBytes of memory when running godoc on the current repository. This CL introduces the Pos, File, and FileSet data types; it does not affect existing code. Another (pending CL) will make the change to all dependent source files. Missing: tests R=r CC=golang-dev, rsc https://golang.org/cl/2936041
Showing
src/pkg/go/token/position.go
0 → 100644
Please
register
or
sign in
to comment