The decorator hides the number of function arguments from Mercurial,
so Mercurial cannot give proper error messages about commands
invoked with the wrong number of arguments.
Left a 'dummy' hgcommand decorator in place as a way to document
what functions are hg commands, and just in case we need some other
kind of hack in the future.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/6488059
Accomplished by synchronizing the formatting of conversion errors between typecheck.c and subr.c
Fixes#3984.
R=golang-dev, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/6500064
There was mail on golang-nuts a few weeks ago
from someone who understood the message perfectly
and knew he had a cyclic dependency but assumed
that Go, like Python or Java, was supposed to handle it.
R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/6488069
for both locale-specific exemplar characters and tailorings to
the collation table.
Some specifices:
- Moved stringSet to the beginning of the file and added some functionality
to parse command line files.
- openReader now modifies the input URL for localFiles to guarantee that
any http source listed in the generated file is indeed this source.
- Note that the implementation of the Tailoring API used by maketables.go
is not yet checked in. So for now adding tailorings are simply no-ops.
- The generated file of exemplar characters will be used somewhere else.
Here is a snippet of how the body of the generated file looks like:
type exemplarType int
const (
exCharacters exemplarType = iota
exContractions
exPunctuation
exAuxiliary
exCurrency
exIndex
exN
)
var exemplarCharacters = map[string][exN]string{
"af": [exN]string{
0: "a á â b c d e é è ê ë f g h i î ï j k l m n o ô ö p q r s t u û v w x y z",
3: "á à â ä ã æ ç é è ê ë í ì î ï ó ò ô ö ú ù û ü ý",
4: "a b c d e f g h i j k l m n o p q r s t u v w x y z",
},
...
}
R=r
CC=golang-dev
https://golang.org/cl/6501070
- Elements in the array are now sorted as a linked list. This makes it easier to
apply tailorings.
- Added code to sort entries by collation elements.
- Added logical reset points. This is used for tailoring relative to certain
properties, rather than characters.
NOTE: all code for type entry should now be in order.go. To keep the diffs for
this CL reasonable, though, the existing code is left in builder.go. I'll move
this in a separate CL.
R=r
CC=golang-dev
https://golang.org/cl/6493063
Fixes#3525.
PTRACE_SYSCALL behaves like PTRACE_CONT and can deliver
a signal to the process. Ideally PtraceSingleStep should
support the signal argument, but its interface is frozen
by Go1.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/6353051
Parses a time header value into a time.Time according to rfc2616 sec 3.3.
R=golang-dev, dave, rsc, r
CC=bradfitz, golang-dev
https://golang.org/cl/6344046
A crash happens in the first request in a connection
if "params" field is missing because c.req.Params is Nil.
Fixes#3848.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6446051
Reverts part of CL 6460082.
If a doc comment describes a type by explaining the
meaning of one instance of the type, a leading article
is fine and makes the text less awkward.
Compare:
// A dog is a kind of animal.
// Dog is a kind of animal.
R=golang-dev, dsymonds, dvyukov, r
CC=golang-dev
https://golang.org/cl/6494066
This set of changes extends the Plan 9 support
to include the AMD64 architecture and should
work on all versions of Plan 9.
R=golang-dev, rminnich, noah.evans, rsc, minux.ma, npe
CC=akskuma, golang-dev, jfflore, noah.evans
https://golang.org/cl/6479052
This fixes a spurious 'invalid recursive type' error, and stops the compiler from emitting errors on uses of the invalid type.
Fixes#3766.
R=golang-dev, dave, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6443100
The Handler method makes the ServeMux dispatch logic
available to wrappers that enforce additional constraints
on requests.
R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/6450165
In serve mux, if pattern contains a host name, pass only the path to
the redirect handler.
Add tests for serve mux redirections.
R=rsc
CC=bradfitz, gobot, golang-dev
https://golang.org/cl/6329045
Fixes#4008.
Run a background goroutine that wastes CPU to trick the
power management into raising the CPU frequency which,
by side effect, makes sleep more accurate on arm.
=== RUN TestParallelSleep
--- PASS: TestParallelSleep (1.30 seconds)
_cgo_gotypes.go:772: sleep(1) slept for 1.000458s
R=minux.ma, r
CC=golang-dev
https://golang.org/cl/6498060
Also rename Node.{Add,Remove} to Node.{AppendChild,RemoveChild} to
be consistent with the DOM.
benchmark old ns/op new ns/op delta
BenchmarkParser 4042040 3749618 -7.23%
benchmark old MB/s new MB/s speedup
BenchmarkParser 19.34 20.85 1.08x
BenchmarkParser mallocs per iteration is also:
10495 before / 7992 after
R=andybalholm, r, adg
CC=golang-dev
https://golang.org/cl/6495061
This is required by the spec to produce the replacement char.
The fix lies in lib9's rune code.
R=golang-dev, nigeltao, rsc
CC=golang-dev
https://golang.org/cl/6443109
Other than catching an error case that was missed before, this
CL introduces no changes to the template language or API.
For simplicity, templates use spaces as argument separators.
This means that spaces are significant: .x .y is not the same as .x.y.
In the existing code, these cases are discriminated by the lexer,
but that means for instance that (a b).x cannot be distinguished
from (a b) .x, which is lousy. Although that syntax is not
supported yet, we want to support it and this CL is a necessary
step.
This CL emits a "space" token (actually a run of spaces) from
the lexer so the parser can discriminate these cases. It therefore
fixes a couple of undisclosed bugs ("hi".x is now an error) but
doesn't otherwise change the language. Later CLs will amend
the grammar to make .X a proper operator.
There is one unpleasantness: With space a token, three-token
lookahead is now required when parsing variable declarations
to discriminate them from plain variable references. Otherwise
the change isn't bad.
The CL also moves the debugging print code out of the lexer
into the test, which is the only place it's needed or useful.
Step towards resolving issue 3999.
It still remains to move field chaining out of the lexer
and into the parser and make field access an operator.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6492054
No changes to the meaning, just clearer language and more
examples, including illegal rune and string literals.
In particular, "character literal" and "character constant"
are now called "rune literal" and "rune constant" and the
word "character" always refers to the source text, not
program values.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6448137
In the example "units" program for goyacc, the exchange rates were
reciprocals of the correct amounts. Turn them right-side-up
and update them to current figures.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6495053
Fixes#3892.
Swapping the order of the writers inside the MultiWriter ensures
the request will be written to buf before http.ReadRequest completes.
The fencedBuffer is not required to make the test pass on
any machine that I have access too, but as the buf is shared
across goroutines, I think it is necessary for correctness.
R=bradfitz, fullung, franciscossouza
CC=golang-dev
https://golang.org/cl/6483061
Vim autocompletion respects the $GOPATH variable and does not
ignore dashes ('-'), dots ('.') and underscores ('_') like found
in many remote packages.
Environment variable $GOROOT is determined by calling
'go env GOROOT' instead of relying on the user's environment
variables.
Fixes#3876Fixes#3882
R=golang-dev, franciscossouza, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6443151
Use version 2 of the NetBSD signal ABI - both version 2 and version 3
are supported by the kernel, with near identical behaviour. However,
the netbsd32 compat code does not allow version 3 to be used, which
prevents Go netbsd/386 binaries from running in compat mode on a
NetBSD amd64 kernel. Switch to version 2 of the ABI, which is the
same version currently used by NetBSD's libc.
R=minux.ma
CC=golang-dev
https://golang.org/cl/6476068
This shouldn't be an error (see issue 3999), but until it's handled
correctly, treat it as one to avoid confusion. Without this CL,
(A).X parses as two arguments.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6473059