- the main changes are removing the Doc suffix
from the exported types, so instead of
doc.TypeDoc one will have doc.Type, etc.
- All exported types now have a Name (or Names) field.
For Values, the Names field lists all declared variables
or constants.
- Methods have additional information about where they are
coming from.
- There's a mode field instead of a bool to
control the package's operation, which makes
it easier to extend w/o API changes.
Except for the partially implemented new Method type,
this is based on existing code. A clean rewrite is in
progress based on this new API.
R=rsc, kevlar
CC=golang-dev
https://golang.org/cl/5528060
Only ParseFile, ParseDir, and ParseExpr are used in the tree.
If partial parsing of code is required, it is fairly simple
to wrap the relevant piece of code into a dummy package for
parsing (see parser.ParseExpr).
Also: minor cleanups.
R=rsc
CC=golang-dev
https://golang.org/cl/5535055
These functions are mostly of interest for debugging; the
number of bytes written is uninteresting.
R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5540046
By the time a Unix linker gets to the end of the
command line it has forgotten what you told it
at the beginning of the command line, so you
have to put library arguments (like -lm) at the end.
R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5541043
The domain returned by appengine.DefaultVersionHostname
isn't the one we want.
This change has been uploaded to build.golang.org
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5539043
In a test that does
func TestFoo(t *testing.T) {
defer cleanup()
t.Fatal("oops")
}
it can be important that cleanup run as the test fails.
The old code did this in Fatal:
t.signal <- t
runtime.Goexit()
The runtime.Goexit would run the deferred cleanup
but the send on t.signal would cause the main test loop
to move on and possibly even exit the program before
the runtime.Goexit got a chance to run.
This CL changes tRunner (the top stack frame of a test
goroutine) to send on t.signal as part of a function
deferred by the top stack frame. This delays the send
on t.signal until after runtime.Goexit has run functions
deferred by the test itself.
For the above TestFoo, this CL guarantees that cleanup
will run before the test binary exits.
This is particularly important when cleanup is doing
externally visible work, like removing temporary files
or unmounting file systems.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532078
Especially affects tests, but not test-specific.
The linker was only being told where to find the
direct dependencies of package main. Sometimes that
was sufficient to find the rest; sometimes not.
Fixes#2657.
Fixes#2666.
Fixes#2680.
R=golang-dev, adg, rogpeppe
CC=golang-dev
https://golang.org/cl/5528079
This breakage is mainly due to API changes in pkg.
(e.g., package utf8 moved to unicode/utf8;
remove of strconv.Atof64;
change character type from int to rune.)
Also correct the usage comment.
This fixes issue 2646.
PS: I don't change the goyacc.go, because I think token type
should not be force to rune.
R=golang-dev, adg, rogpeppe, r, r
CC=golang-dev
https://golang.org/cl/5502093
The escape analysis code does not make a distinction between
scalar and pointers fields in structs. Non-pointer fields
that escape should not make the whole struct escape.
R=lvd, rsc
CC=golang-dev, remy
https://golang.org/cl/5489128
Tighter octal parsing broke some tests and were disabled in
https://golang.org/cl/5530051
Those tests were broken. The CSS decoder was supposed to see CSS
hex escape sequences of the form '\' <hex>+, but those escape
sequences were instead being consumed by the template parser.
This change properly escapes those escape sequences, and uses
proper escaping for NULs.
R=golang-dev, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/5529073
- Changed the Scan API semantics slightly:
The token literal string is only returned
if the token is a literal, comment, semicolon,
or illegal character. In all other cases, the
token literal value is determined by the token
value.
Clients that care about the token literal value
when not present can always use the following
piece of code:
pos, tok, lit := scanner.Scan()
if lit == "" {
lit = tok.String()
}
- Changed token.Lookup API to use a string instead
of a []byte argument.
- Both these changes were long-standing TODOs.
- Added BenchmarkScan.
This change permits a faster implementation of Scan
with much fewer string creations:
benchmark old ns/op new ns/op delta
scanner.BenchmarkScan 74404 61457 -17.40%
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5532076
This is a relic from the times when we switched
to automatic semicolon insertion. It's still use-
ful to have a non-exported switch for testing.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5528077
1) Include Szabolcs Nagy's patch which adds serialisation for more
signature subpackets.
2) Include Szabolcs Nagy's patch which adds functions for making DSA
keys.
3) Make the random io.Reader an argument to the low-level signature
functions rather than having them use crypto/rand.
4) Rename crypto/openpgp/error to crypto/openpgp/errors so that it
doesn't clash with the new error type.
R=bradfitz, r
CC=golang-dev
https://golang.org/cl/5528044
Will have to do better but this is enough to
stop the builders from hanging, I hope.
R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/5533066
pkg/runtime/sys_darwin_amd64.s: fixes syscall select nr
pkg/runtime/sys_linux_arm.s: uses newselect instead of the now unimplemented
(old) select, also fixes the wrong div/mod statements in runtime.usleep.
Fixes#2633
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5504096