Russ Cox [Thu, 12 Jan 2012 21:44:02 +0000 (13:44 -0800)]
go/build: pass CgoLDFLAGS at end of link command
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.
Rob Pike [Thu, 12 Jan 2012 18:42:39 +0000 (10:42 -0800)]
dashboard: use build.golang.org as the domain
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
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
Russ Cox [Thu, 12 Jan 2012 18:18:03 +0000 (10:18 -0800)]
cmd/go: fix linker arguments
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.
Shenghou Ma [Thu, 12 Jan 2012 15:54:20 +0000 (07:54 -0800)]
goyacc: fix units.y build breakage
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
Rémy Oudompheng [Thu, 12 Jan 2012 11:08:40 +0000 (12:08 +0100)]
gc: avoid false positives when using scalar struct fields.
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.
Mike Samuel [Wed, 11 Jan 2012 23:47:03 +0000 (18:47 -0500)]
html/template: reenable testcases and fix mis-escaped sequences.
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.
Robert Griesemer [Wed, 11 Jan 2012 22:20:32 +0000 (14:20 -0800)]
go/scanner: 17% faster scanning
- 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:
Adam Langley [Wed, 11 Jan 2012 13:35:32 +0000 (08:35 -0500)]
crypto/openpgp: assorted cleanups
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
Shenghou Ma [Wed, 11 Jan 2012 04:48:02 +0000 (20:48 -0800)]
runtime: runtime.usleep() bugfix on darwin/amd64 and linux/arm
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
Nigel Tao [Wed, 11 Jan 2012 01:35:05 +0000 (12:35 +1100)]
image: rename image.Tiled to image.Repeated.
What package image currently provides is a larger image consisting
of many copies of a smaller image.
More generally, a tiled image could be a quilt consisting of different
smaller images (like Google Maps), or a technique to view a portion of
enormous images without requiring the whole thing in memory.
This richer construct might not ever belong in the standard library (and
is definitely out of scope for Go 1), but I would like the option for
image.Tiled to be its name.
Luuk van Dijk [Tue, 10 Jan 2012 20:24:31 +0000 (21:24 +0100)]
gc: inlining fixes
flag -l means: inlining on, -ll inline with early typecheck
-l lazily typechecks imports on use and re-export, nicer for debugging
-lm produces output suitable for errchk tests, repeated -mm... increases inl.c's verbosity
export processed constants, instead of originals
outparams get ->inlvar too, and initialized to zero
fix shared rlist bug, that lead to typecheck messing up the patched tree
properly handle non-method calls to methods T.meth(t, a...)
removed embryonic code to handle closures in inlined bodies
also inline calls inside closures (todo: move from phase 6b to 4)
Sameer Ajmani [Tue, 10 Jan 2012 00:55:18 +0000 (19:55 -0500)]
strconv: return ErrSyntax when unquoting illegal octal sequences. This
is consistent with what the Go compiler returns when such sequences
appear in string literals.
Robert Griesemer [Tue, 10 Jan 2012 00:54:24 +0000 (16:54 -0800)]
spec: pointer comparison for pointers to 0-sized variables
- define "0-sized"
- add clarifying sentence to pointer comparison
- removed notion "location" which was used only in pointer comparisons
and which was never defined
Robert Griesemer [Tue, 10 Jan 2012 00:14:01 +0000 (16:14 -0800)]
go/doc: first steps towards cleaning up go/doc
- separated exported data structures from doc reader
by extracting all exported data structures into doc.go
and moving the implementation into reader.go
- added missing documentation comments
- no API or semantic changes (but moved positions of
PackageDoc.Doc and TypeDoc.Decl field up for consistency)
- runs all tests
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5527063
Nigel Tao [Tue, 10 Jan 2012 00:06:09 +0000 (11:06 +1100)]
html: foreign element HTML integration points, tag name adjustment,
shorten the MathML namespace abbreviation from "mathml" to "math".
Python's html5lib uses "mathml", but I think that that is an internal
implementation detail; the test cases use "math".
Pass tests10.dat, test 30:
<div><svg><path><foreignObject><math></div>a
Robert Griesemer [Mon, 9 Jan 2012 19:20:09 +0000 (11:20 -0800)]
math/big: simplify fast string conversion
- use slice ops for convertWords instead of lo/hi boundaries
- always compute leading zeroes (simplifies logic significantly),
but remove them once, at the end (since leafSize is small, the
worst-case scenario is not adding significant overhead)
- various comment cleanups (specifically, replaced direct -> iterative,
and indirect -> recursive)
- slightly faster overall for -bench=String
(This CL incorporates the changes re: my comments to CL 5418047
https://golang.org/cl/5418047/ )
Florian Weimer [Mon, 9 Jan 2012 17:58:29 +0000 (12:58 -0500)]
go-mode.el: fix syntax highlighting of backticks
Instead of syntax-tables, an extended go-mode-cs is used for
from a font-lock callback.
Cache invalidation must happen in a before-change-function
because font-lock runs in an after-change-function, potentially
before the cache invalidation takes place.
Performance is reasonable, even with src/pkg/html/entity.go
and test/fixedbugs/bug257.go.
I've tried to come up with a solution that is minimally invasive for the platforms that don't support "parent death signal", without splitting up exec_unix.go.
See also: http://www.win.tue.nl/~aeb/linux/lk/lk-5.html#ss5.8