]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years ago[dev.cc] crypto/md5, crypto/sha1: restore a few SP references
Russ Cox [Fri, 20 Feb 2015 18:40:12 +0000 (13:40 -0500)]
[dev.cc] crypto/md5, crypto/sha1: restore a few SP references

Applying my post-submit comments from CL 5120.
The rewrite there changed the code from writing to the stack
frame to writing below the stack frame.

Change-Id: Ie7e0563c0c1731fede2bcefeaf3c9d88a0cf4063
Reviewed-on: https://go-review.googlesource.com/5470
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years ago[dev.cc] cmd/asm: add ppc64le support
Russ Cox [Fri, 20 Feb 2015 17:23:27 +0000 (12:23 -0500)]
[dev.cc] cmd/asm: add ppc64le support

Change-Id: I780ed76c9217d387a73fd7530af2f40948aa1fe4
Reviewed-on: https://go-review.googlesource.com/5452
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/go: install cmd/asm as a tool
Russ Cox [Fri, 20 Feb 2015 17:22:50 +0000 (12:22 -0500)]
[dev.cc] cmd/go: install cmd/asm as a tool

cmd/dist was doing the right thing, but not cmd/go.

Change-Id: I5412140cfc07e806152915cc49db7f63352d01ca
Reviewed-on: https://go-review.googlesource.com/5451
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] runtime: print to stderr as well as android logd
David Crawshaw [Fri, 20 Feb 2015 18:15:56 +0000 (13:15 -0500)]
[dev.cc] runtime: print to stderr as well as android logd

Restores stack traces in the android/arm builder.

Change-Id: If637aa2ed6f8886126b77cf9cc8a0535ec7c4369
Reviewed-on: https://go-review.googlesource.com/5453
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
10 years ago[dev.cc] cmd/asm: implement FMADD for ppc64
Rob Pike [Fri, 20 Feb 2015 05:10:00 +0000 (21:10 -0800)]
[dev.cc] cmd/asm: implement FMADD for ppc64

Missed this one instruction in the previous pass.

Change-Id: Ic8cdae4d3bfd626c6bbe0ce49fce28b53db2ad1c
Reviewed-on: https://go-review.googlesource.com/5420
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] all: merge master (5868ce3) into dev.cc
Russ Cox [Fri, 20 Feb 2015 15:28:36 +0000 (10:28 -0500)]
[dev.cc] all: merge master (5868ce3) into dev.cc

This time for sure!

Change-Id: I7e7ea24edb7c2f711489e162fb97237a87533089

10 years ago[dev.cc] cmd/go: disable verifyCompiler
Russ Cox [Fri, 20 Feb 2015 00:47:13 +0000 (19:47 -0500)]
[dev.cc] cmd/go: disable verifyCompiler

The merge brought in new C sources without Go updates.

Change-Id: Iad08b58f894173a7b34396275b72db34f3031fe3
Reviewed-on: https://go-review.googlesource.com/5352
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agopath/filepath: add example for filepath.Split
Andrew Gerrand [Fri, 20 Feb 2015 05:46:48 +0000 (16:46 +1100)]
path/filepath: add example for filepath.Split

Fixes #9928

Change-Id: Iab37051078755a132f211ad48e756422f7c55a39
Reviewed-on: https://go-review.googlesource.com/5416
Reviewed-by: Minux Ma <minux@golang.org>
10 years agonet, syscall: more accurate parsers for routing messages on BSD variants
Mikio Hara [Tue, 10 Feb 2015 03:24:11 +0000 (12:24 +0900)]
net, syscall: more accurate parsers for routing messages on BSD variants

This changes fixes two issues with regard to handling routing messages
as follows:
- Misparsing on platforms (such as FreeBSD) supporting multiple
  architectures in the same kernel (kern.supported_archs="amd64 i386")
- Misparsing with unimplemented messages such as route, interface
  address state notifications

To fix those issues, this change implements all the required socket
address parsers, adds a processor architecture identifying function to
FreeBSD and tests.

Fixes #9707.
Fixes #8203.

Change-Id: I7ed7b4a0b6f10f54b29edc681a2f35603f2d8d45
Reviewed-on: https://go-review.googlesource.com/4330
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agocmd/go: simplify/fix handling private github repos
Ingo Oeser [Thu, 29 Jan 2015 14:37:37 +0000 (15:37 +0100)]
cmd/go: simplify/fix handling private github repos

Before Go 1.4, the traditional way to work with a private Github
repository was to run something similar the following:

```
git config --global url."git@github.com:".insteadOf "https://github.com/"
```

It would allow go get and friends to transparently work as expected,
automatically rewriting https URLs to use SSH for auth. This worked both
when pushing and pulling.

In Go 1.4 this broke, now requiring the use of `go get -f` instead of `go get`
in order to fetch private repositories. This seems neither intended nor
practical, as it requires changing a lot of tooling.

So just use `git config remote.origin.url` instead of `git remote -v` as
this reflects the actual substitution intended in the `insteadOf` config
directive.

Also remove now useless parsing.

Also add a check against supported schemes to avoid errors in later
commands using this URL and expecting such a scheme.

Fixes #9697

Change-Id: I907327f83504302288f913a68f8222a5c2d673ee
Reviewed-on: https://go-review.googlesource.com/3504
Reviewed-by: Andrew Gerrand <adg@golang.org>
10 years agodoc: dummy commit in go1.5.txt
Russ Cox [Fri, 20 Feb 2015 01:42:09 +0000 (20:42 -0500)]
doc: dummy commit in go1.5.txt

Change-Id: I678336daf99f7d7d19f99506f1a604de8e05bf43
Reviewed-on: https://go-review.googlesource.com/5400
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: bring asm on ppc64 in sync with 9a
Rob Pike [Fri, 20 Feb 2015 00:34:51 +0000 (16:34 -0800)]
[dev.cc] cmd/asm: bring asm on ppc64 in sync with 9a

I created a .s file that covered every instruction and operand production
in 9a/a.y and made sure that 9a and asm give bit-identical results for it.
I found a few things, including one addressing mode (R1+R2) that was
not present in the source we use. Fixed those

I also found quite a few things where 9a's grammar accepts the instruction
but liblink rejects it. These need to be sorted out, and I will do that separately.
Once that's done, I'll turn my test file into a proper test.

Change-Id: Ib093271b0f7ffd64ffed164ed2a820ebf2420e34
Reviewed-on: https://go-review.googlesource.com/5361
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] runtime,syscall: quiet some more vet errors
Rob Pike [Thu, 19 Feb 2015 21:44:06 +0000 (13:44 -0800)]
[dev.cc] runtime,syscall: quiet some more vet errors

Fix many incorrect FP references and a few other details.

Some errors remain, especially in vlop, but fixing them requires semantics. For another day.

Change-Id: Ib769fb519b465e79fc08d004a51acc5644e8b259
Reviewed-on: https://go-review.googlesource.com/5288
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/internal/obj, cmd/internal/gc, new6g: reconvert
Russ Cox [Wed, 18 Feb 2015 03:13:49 +0000 (22:13 -0500)]
[dev.cc] cmd/internal/obj, cmd/internal/gc, new6g: reconvert

Reconvert using rsc.io/c2go rev 27b3f59.

Changes to converter:
 - fatal does not return, so no fallthrough after fatal in switch
 - many more function results and variables identified as bool
 - simplification of negated boolean expressions

Change-Id: I3bc67da5e46cb7ee613e230cf7e9533036cc870b
Reviewed-on: https://go-review.googlesource.com/5171
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
10 years ago[dev.cc] cmd/gc: tweak default fatal in ordersafeexpr for c2go
Russ Cox [Wed, 18 Feb 2015 02:52:42 +0000 (21:52 -0500)]
[dev.cc] cmd/gc: tweak default fatal in ordersafeexpr for c2go

c2go was putting a fallthrough after the fatal call.
Changed c2go to know that fatal doesn't return,
but then there is a missing return at the end of
the translated Go function.
Move code around a little to make C and Go agree.

Change-Id: Icef3d55ccdde0709c02dd0c2b78826f6da33a146
Reviewed-on: https://go-review.googlesource.com/5170
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
10 years agocmd/dist: show friendlier error message when building outside a Git repo
Andrew Gerrand [Thu, 19 Feb 2015 21:34:30 +0000 (08:34 +1100)]
cmd/dist: show friendlier error message when building outside a Git repo

Fixes #9932

Change-Id: I7943470a1784278a5c6e99c3b66c59d4953734ba
Reviewed-on: https://go-review.googlesource.com/5340
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoruntime: do not unmap work.spans until after checkmark phase
Russ Cox [Thu, 19 Feb 2015 21:21:42 +0000 (16:21 -0500)]
runtime: do not unmap work.spans until after checkmark phase

This is causing crashes.

Change-Id: I1832f33d114bc29894e491dd2baac45d7ab3a50d
Reviewed-on: https://go-review.googlesource.com/5330
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] runtime,syscall: add symbols for FP and SP references in darwin-arm
Rob Pike [Thu, 19 Feb 2015 21:09:01 +0000 (13:09 -0800)]
[dev.cc] runtime,syscall: add symbols for FP and SP references in darwin-arm

Maybe fix build.

Change-Id: I99ea76f0e6e472f0e88405bf5d77f72d4b097abd
Reviewed-on: https://go-review.googlesource.com/5287
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/go: enable verifyAsm for all architectures
Rob Pike [Thu, 19 Feb 2015 05:11:42 +0000 (21:11 -0800)]
[dev.cc] cmd/go: enable verifyAsm for all architectures

Change-Id: Ia1ba28c81e31d149c59a48d5f71628ac0ff14d8e
Reviewed-on: https://go-review.googlesource.com/5283
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: accept #define A /* nothing */
Rob Pike [Thu, 19 Feb 2015 20:57:33 +0000 (12:57 -0800)]
[dev.cc] cmd/asm: accept #define A /* nothing */

Was rejected but should be legal.

Change-Id: I0189e3bef6b67c6ba390c75a48a8d9d8f39b7636
Reviewed-on: https://go-review.googlesource.com/5286
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: missed change from reorganization CL
Russ Cox [Thu, 19 Feb 2015 20:45:29 +0000 (15:45 -0500)]
runtime: missed change from reorganization CL

That is, I accidentally dropped this change of Austin's
when preparing my CL. I blame Git.

Change-Id: I9dd772c84edefad96c4b16785fdd2dea04a4a0d6
Reviewed-on: https://go-review.googlesource.com/5320
Reviewed-by: Austin Clements <austin@google.com>
10 years agoruntime: reorganize memory code
Russ Cox [Thu, 19 Feb 2015 18:38:46 +0000 (13:38 -0500)]
runtime: reorganize memory code

Move code from malloc1.go, malloc2.go, mem.go, mgc0.go into
appropriate locations.

Factor mgc.go into mgc.go, mgcmark.go, mgcsweep.go, mstats.go.

A lot of this code was in certain files because the right place was in
a C file but it was written in Go, or vice versa. This is one step toward
making things actually well-organized again.

Change-Id: I6741deb88a7cfb1c17ffe0bcca3989e10207968f
Reviewed-on: https://go-review.googlesource.com/5300
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Rick Hudson <rlh@golang.org>
10 years ago[dev.cc] test: disable rotate tests
Russ Cox [Thu, 19 Feb 2015 20:12:42 +0000 (15:12 -0500)]
[dev.cc] test: disable rotate tests

They use too much memory in the current Go compiler draft.
This should fix some builders.

Reenabling is #9933.

Change-Id: Ib5ef348b2c55d2012ffed765f2a6df99dec171f4
Reviewed-on: https://go-review.googlesource.com/5302
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/pprof: add -runtime flag
Dmitry Vyukov [Thu, 19 Feb 2015 12:21:05 +0000 (15:21 +0300)]
cmd/pprof: add -runtime flag

The flag disables stripping of runtime frames in profiles.
This is useful when analyzing runtime itself.

Before:
$ go tool pprof --text --alloc_objects --lines fmt.test /tmp/mprof
      flat  flat%   sum%        cum   cum%
      2768 79.65% 79.65%      32768 79.65%  fmt_test.TestComplexFormatting fmt/fmt_test.go:744
      6554 15.93% 95.58%       6554 15.93%  regexp/syntax.(*compiler).rune regexp/syntax/compile.go:267
      1820  4.42%   100%       1820  4.42%  runtime.malg runtime/proc1.go:1977

After:
$ go tool pprof --text --alloc_objects --lines --runtime fmt.test /tmp/mprof
      flat  flat%   sum%        cum   cum%
     32768 79.65% 79.65%      32768 79.65%  runtime.convT2E runtime/iface.go:139
      6554 15.93% 95.58%       6554 15.93%  runtime.growslice runtime/slice.go:89
      1820  4.42%   100%       1820  4.42%  runtime.malg runtime/proc1.go:1977

Change-Id: If468dfa5c5bbd0809c45a58d912d3115fac009ed
Reviewed-on: https://go-review.googlesource.com/5291
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
10 years agoruntime: don't test gdb on darwin
Josh Bleecher Snyder [Wed, 18 Feb 2015 23:29:32 +0000 (15:29 -0800)]
runtime: don't test gdb on darwin

Fixes #9927

Change-Id: I2114cc21f7a4772e3d42bcad9642a8a545cd8e16
Reviewed-on: https://go-review.googlesource.com/5285
Reviewed-by: Minux Ma <minux@golang.org>
10 years agoruntime: use more natural types in struct workbuf
Austin Clements [Thu, 19 Feb 2015 02:56:12 +0000 (21:56 -0500)]
runtime: use more natural types in struct workbuf

Until recently, struct workbuf had only lfnode and uintptr fields
before the obj array to make it convenient to compute the size of the
obj array.  It slowly grew more fields until this became inconvenient
enough that it was restructured to make the size computation easy.
Now the size computation doesn't care what the field types are, so
switch to more natural types.

Change-Id: I966140ba7ebb4aeb41d5c66d9d2a3bdc17dd4bcf
Reviewed-on: https://go-review.googlesource.com/5262
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: switch to gcWork abstraction
Austin Clements [Tue, 17 Feb 2015 15:53:31 +0000 (10:53 -0500)]
runtime: switch to gcWork abstraction

This converts the garbage collector from directly manipulating work
buffers to using the new gcWork abstraction.

The previous management of work buffers was rather ad hoc.  As a
result, switching to the gcWork abstraction changes many details of
work buffer management.

If greyobject fills a work buffer, it can now pull from work.partial
in addition to work.empty.

Previously, gcDrain started with a partial or empty work buffer and
fetched an empty work buffer if it filled its current buffer (in
greyobject).  Now, gcDrain starts with a full work buffer and fetches
an partial or empty work buffer if it fills its current buffer (in
greyobject).  The original behavior was bad because gcDrain would
immediately drop the empty work buffer returned by greyobject and
fetch a full work buffer, which greyobject was likely to immediately
overflow, fetching another empty work buffer, etc.  The new behavior
isn't great at the start because greyobject is likely to immediately
overflow the full buffer, but the steady-state behavior should be more
stable.  Both before and after this change, gcDrain fetches a full
work buffer if it drains its current buffer.  Basically all of these
choices are bad; the right answer is to use a dual work buffer scheme.

Previously, shade always fetched a work buffer (though usually from
m.currentwbuf), even if the object was already marked.  Now it only
fetches a work buffer if it actually greys an object.

Change-Id: I8b880ed660eb63135236fa5d5678f0c1c041881f
Reviewed-on: https://go-review.googlesource.com/5232
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
10 years agoruntime: introduce higher-level GC work abstraction
Austin Clements [Thu, 12 Feb 2015 17:53:48 +0000 (12:53 -0500)]
runtime: introduce higher-level GC work abstraction

This introduces a producer/consumer abstraction for GC work pointers
that internally handles the details of filling, draining, and
shuffling work buffers.

In addition to simplifying the GC code, this should make it easy for
us to change how we use work buffers, including cleaning up how we use
the work.partial queue, reintroducing a FIFO lookahead cache, adding
prefetching, and using dual buffers to avoid flapping.

This commit doesn't change any existing code.  The following commit
will switch the garbage collector from explicit workbuf manipulation
to gcWork.

Change-Id: Ifbfe5fff45bf0362d6d7c3cecb061f0c9874077d
Reviewed-on: https://go-review.googlesource.com/5231
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
10 years agoruntime: drop unused workbufhdr.id field
Austin Clements [Thu, 19 Feb 2015 02:59:41 +0000 (21:59 -0500)]
runtime: drop unused workbufhdr.id field

Change-Id: If7729b3c7df6dc7fcd41f293e2ef2472c769fe8b
Reviewed-on: https://go-review.googlesource.com/5261
Reviewed-by: Rick Hudson <rlh@golang.org>
10 years agodoc: fix broken link in README
Ryan Seys [Thu, 19 Feb 2015 02:34:44 +0000 (21:34 -0500)]
doc: fix broken link in README

Change-Id: I73450aeb59571f3285ff59ae214739e1866c9aa0
Reviewed-on: https://go-review.googlesource.com/5270
Reviewed-by: Andrew Gerrand <adg@golang.org>
10 years ago[dev.cc] cmd/asm: add ppc64
Rob Pike [Thu, 19 Feb 2015 04:30:55 +0000 (20:30 -0800)]
[dev.cc] cmd/asm: add ppc64

Fairly straightforward. A couple of unusual addressing tricks.
Also added the ability to write R(10) to mean R10. PPC64 uses
this for a couple of large register spaces. It appears for ARM now
as well, since I saw some uses of that before, although I rewrote
them in our source. I could put it in for 386 and amd64 but it's
not worth it.

Change-Id: I3ffd7ffa62d511b95b92c3c75b9f1d621f5393b6
Reviewed-on: https://go-review.googlesource.com/5282
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoimage/jpeg: support 16-bit quantization tables and Extended Sequential
Nigel Tao [Thu, 19 Feb 2015 03:00:16 +0000 (14:00 +1100)]
image/jpeg: support 16-bit quantization tables and Extended Sequential
frames.

Fixes #9888.

Change-Id: I60f1d843e72e1b7bc77ab984f149c9ddb5258a06
Reviewed-on: https://go-review.googlesource.com/5251
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] runtime: fix FP reference in atomic_ppc64x.s
Rob Pike [Thu, 19 Feb 2015 04:02:16 +0000 (20:02 -0800)]
[dev.cc] runtime: fix FP reference in atomic_ppc64x.s

References to FP must now have a symbol.

Change-Id: I3f06b99cc48cbd4ccd6f23f2e4b0830af40f7f3d
Reviewed-on: https://go-review.googlesource.com/5281
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/9a,new9a: set v=1 on static names
Rob Pike [Thu, 19 Feb 2015 03:54:56 +0000 (19:54 -0800)]
[dev.cc] cmd/9a,new9a: set v=1 on static names

Oversight in 9a: did not set the static bit in the assembler for
symbols with <>.

Change-Id: Id508dcd3ed07733e60395aefa86d0035faab14a9
Reviewed-on: https://go-review.googlesource.com/5280
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: make gcDrainN take an int instead of uintptr
Austin Clements [Wed, 18 Feb 2015 21:40:31 +0000 (16:40 -0500)]
runtime: make gcDrainN take an int instead of uintptr

Nit.  There's no reason to take a uintptr and doing so just requires
casts in annoying places.

Change-Id: Ifeb9638c6d94eae619c490930cf724cc315680ba
Reviewed-on: https://go-review.googlesource.com/5230
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: fix accidentally exported OpenBSD constants
Matthew Dempsky [Mon, 16 Feb 2015 09:18:13 +0000 (18:18 +0900)]
runtime: fix accidentally exported OpenBSD constants

Change-Id: I2de63668a1c0152cc329df55c2d6d014e8183158
Reviewed-on: https://go-review.googlesource.com/4943
Reviewed-by: Minux Ma <minux@golang.org>
10 years agoencoding/json: Fixed the comment specifying Marshal behavior for maps.
Aaron Jacobs [Wed, 18 Feb 2015 22:35:28 +0000 (09:35 +1100)]
encoding/json: Fixed the comment specifying Marshal behavior for maps.

The comment previously was reversed in sense (it appeared to be
describing unmarshaling). I've fixed that, and added the caveat that map
keys are subject to UTF-8 coercion like other strings.

Change-Id: Id08082aa71401a6e7530a42f979fbb50bd1f4e6a
Reviewed-on: https://go-review.googlesource.com/5221
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
10 years agoimage: change Rectangle.Eq to return true for all empty rectangles, even
Nigel Tao [Tue, 17 Feb 2015 05:28:10 +0000 (16:28 +1100)]
image: change Rectangle.Eq to return true for all empty rectangles, even
if their nominal Min and Max points differ.

This is a behavior change, but arguably a bug fix, as Eq wasn't
previously consistent with In, and the concept of a rectangle being a
set of points. This is demonstrated by the new geom_test.go test.

It does mean that r.Eq(s) no longer implies that Inset'ting both r and s
with a negative inset results in two rectangles that are still Eq, but
that seems acceptable to me.

The previous behavior is still available as "r == s".

Also clarify the image.Rect doc comment when the inputs are
non-canonical.

Also simplify the Point and Rectangle Eq implementations dating from
before Go 1.0, when you couldn't compare structs via the == operator.

Change-Id: Ic39e628db31dc5fe5220f4b444e6d5000eeace5b
Reviewed-on: https://go-review.googlesource.com/5006
Reviewed-by: Rob Pike <r@golang.org>
10 years agodoc: add cgi change go1.5.txt
Brad Fitzpatrick [Wed, 18 Feb 2015 19:59:16 +0000 (11:59 -0800)]
doc: add cgi change go1.5.txt

Change-Id: I829529929906d4758c7ba10d356c251b44e35a8d
Reviewed-on: https://go-review.googlesource.com/5190
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agonet/http/cgi: fix REMOTE_ADDR, REMOTE_HOST, add REMOTE_PORT
Alex Sergeyev [Mon, 16 Feb 2015 14:29:37 +0000 (09:29 -0500)]
net/http/cgi: fix REMOTE_ADDR, REMOTE_HOST, add REMOTE_PORT

Env vars were incorrectly copying whole value of http.RemoteAddr
to REMOTE_ADDR and REMOTE_HOST. They contained IP:port pair which
instead should only have IP (RFC 3875, other sources).

Module also was not setting REMOTE_PORT variable which become de-facto
standard for passing TCP client port to CGI scripts (Apache mod_cgi,
IIS, and probably others)

Fixes #9861

Change-Id: Ia73e664c48539e3c7db4997d09d957884e98d8a5
Reviewed-on: https://go-review.googlesource.com/4933
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years ago[dev.cc] cmd/9a, cmd/new9a: fix line numbers
Russ Cox [Wed, 18 Feb 2015 18:32:28 +0000 (13:32 -0500)]
[dev.cc] cmd/9a, cmd/new9a: fix line numbers

Fixed for the other assemblers in CL 2297042 in 2010.

Change-Id: I6cf41c569e884d98d295369e60e550ff8c0884e6
Reviewed-on: https://go-review.googlesource.com/5173
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/dist, cmd/go: build new6g etc and verify against 6g
Russ Cox [Fri, 13 Feb 2015 19:43:41 +0000 (14:43 -0500)]
[dev.cc] cmd/dist, cmd/go: build new6g etc and verify against 6g

Change-Id: Ide7cff506274ec76d26bdffe7890ca2c28737f2b
Reviewed-on: https://go-review.googlesource.com/4852
Reviewed-by: Rob Pike <r@golang.org>
10 years agocrypto/x509: embed certificates on darwin/arm
David Crawshaw [Tue, 17 Feb 2015 20:17:46 +0000 (15:17 -0500)]
crypto/x509: embed certificates on darwin/arm

Change-Id: Ia6b06f19e5ac424f01a1b90b78b507363b0c4577
Reviewed-on: https://go-review.googlesource.com/5061
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
10 years agocmd/gc: replace NULL by nil
David du Colombier [Wed, 18 Feb 2015 07:25:30 +0000 (08:25 +0100)]
cmd/gc: replace NULL by nil

In CL 3964, NULL was used instead of nil.
However, Plan 9 doesn't declare NULL.

Change-Id: Ied3850aca5c8bca5974105129a37d575df33f6ec
Reviewed-on: https://go-review.googlesource.com/5150
Reviewed-by: Minux Ma <minux@golang.org>
10 years agocmd/gc: generate simpler names for closures
Dmitry Vyukov [Thu, 5 Feb 2015 13:08:29 +0000 (16:08 +0300)]
cmd/gc: generate simpler names for closures

Fixes #8291

There were several complaints about closure names in the issue tracker.
The first problem is that you see names like net/http.func·001
in profiles, traces, etc. And there is no way to figure out what
is that function.
Another issue is non-US-ascii symbols. All programs out there
should accept UTF-8. But unfortunately it is not true in reality.
For example, less does not render middle dot properly.

This change prepends outer function name to closure name and
replaces middle dot with dot. Now names look like:

main.glob.func1
main.glob.func2
main.glob.func2.1
main.init.1
main.init.1.func1
main.init.1.func1.1
main.main.func1
main.main.func1.1

Change-Id: I725726af88f2ad3ced2e3450f0f06bf459fd91c0
Reviewed-on: https://go-review.googlesource.com/3964
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/internal/obj/ppc64: set Ctxt when allocating Progs
Rob Pike [Wed, 18 Feb 2015 04:45:23 +0000 (20:45 -0800)]
[dev.cc] cmd/internal/obj/ppc64: set Ctxt when allocating Progs

This will get fixed properly upstream, but this will serve for now.

Change-Id: I25e5210d190bc7a06a5b9f80724e3360d1a6b10c
Reviewed-on: https://go-review.googlesource.com/5121
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: make 4(SP) illegal except on 386
Rob Pike [Wed, 18 Feb 2015 02:30:27 +0000 (18:30 -0800)]
[dev.cc] cmd/asm: make 4(SP) illegal except on 386

Require a name to be specified when referencing the pseudo-stack.
If you want a real stack offset, use the hardware stack pointer (e.g.,
R13 on arm), not SP.

Fix affected assembly files.

Change-Id: If3545f187a43cdda4acc892000038ec25901132a
Reviewed-on: https://go-review.googlesource.com/5120
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agodoc: document Go 1.4.2
Andrew Gerrand [Wed, 18 Feb 2015 02:40:57 +0000 (13:40 +1100)]
doc: document Go 1.4.2

Change-Id: Ia87047cbc720fb03d2f67aec48abe18bce8dbf78
Reviewed-on: https://go-review.googlesource.com/5112
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/yacc: introduce yyParser to expose parser state
Russ Cox [Thu, 12 Feb 2015 01:37:56 +0000 (20:37 -0500)]
[dev.cc] cmd/yacc: introduce yyParser to expose parser state

Historically, yacc has supported various kinds of inspections
and manipulations of the parser state, exposed as global variables.
The Go implementation of yacc puts that state (properly) in local
stack variables, so it can only be exposed explicitly.

There is now an explicit parser type, yyParser, returned by a
constructor, yyNewParser.

type yyParser interface {
Parse(yyLexer) int
Lookahead() int
}

Parse runs a parse. A call to the top-level func Parse
is equivalent to calling yyNewParser().Parse, but constructing
the parser explicitly makes it possible to access additional
parser methods, such as Lookahead.

Lookahead can be called during grammar actions to read
(but not consume) the value of the current lookahead token,
as returned by yylex.Lex. If there is no current lookahead token,
Lookahead returns -1. Invoking Lookahead corresponds to
reading the global variable yychar in a traditional Unix yacc grammar.

To support Lookahead, the internal parsing code now separates
the return value from Lex (yychar) from the reencoding used
by the parsing tables (yytoken). This has the effect that grammars
that read yychar directly in the action (possible since the actions
are in the same function that declares yychar) now correctly see values
from the Lex return value space, not the internal reencoding space.
This can fix bugs in ported grammars not even using SetParse and Lookahead.
(The reencoding was added on Plan 9 for large character sets.
No Plan 9 programs using yacc looked at yychar.)

Other methods may be added to yyParser later as needed.
Obvious candidates include equivalents for the traditional
yyclearin and yyerrok macros.

Change-Id: Iaf7649efcf97e09f44d1f5bc74bb563a11f225de
Reviewed-on: https://go-review.googlesource.com/4850
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/asm/internal/asm: add operand parsing tests for 386 and arm
Rob Pike [Wed, 18 Feb 2015 01:23:13 +0000 (17:23 -0800)]
[dev.cc] cmd/asm/internal/asm: add operand parsing tests for 386 and arm

Change-Id: If2aafc4dd3f91650fc7727ea7d534ad7aa627c8c
Reviewed-on: https://go-review.googlesource.com/5090
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/internal/gc, cmd/new6g etc: convert from cmd/gc, cmd/6g etc
Russ Cox [Fri, 13 Feb 2015 19:40:36 +0000 (14:40 -0500)]
[dev.cc] cmd/internal/gc, cmd/new6g etc: convert from cmd/gc, cmd/6g etc

First draft of converted Go compiler, using rsc.io/c2go rev 83d795a.

Change-Id: I29f4c7010de07d2ff1947bbca9865879d83c32c3
Reviewed-on: https://go-review.googlesource.com/4851
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/go: install new6g etc (once they are committed) to tool directory
Russ Cox [Fri, 13 Feb 2015 19:43:08 +0000 (14:43 -0500)]
[dev.cc] cmd/go: install new6g etc (once they are committed) to tool directory

Change-Id: I2853535ab6c79d14f430c780161e4c35c52d9fb3
Reviewed-on: https://go-review.googlesource.com/4839
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/gc, cmd/ld, runtime: minor tweaks for c2go
Russ Cox [Fri, 13 Feb 2015 19:42:31 +0000 (14:42 -0500)]
[dev.cc] cmd/gc, cmd/ld, runtime: minor tweaks for c2go

Change-Id: I3be69a4ebf300ad24b55b5f43fd7ad1f001c762e
Reviewed-on: https://go-review.googlesource.com/4838
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/dist: write default GO386 for cmd/internal/obj
Russ Cox [Fri, 6 Feb 2015 10:57:42 +0000 (05:57 -0500)]
[dev.cc] cmd/dist: write default GO386 for cmd/internal/obj

Change-Id: Ida60c30041505c321fbfc48b22b8ff5af1a3f474
Reviewed-on: https://go-review.googlesource.com/4837
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
10 years ago[dev.cc] cmd/asm: clean up jumps
Rob Pike [Tue, 17 Feb 2015 22:49:04 +0000 (14:49 -0800)]
[dev.cc] cmd/asm: clean up jumps

Set TYPE_BRANCH for x(PC) in the parser and the assembler has less work to do.
This also makes the operand test handle -4(PC) correctly.

Also add a special test case for AX:DX, which should be fixed in obj really.

Change-Id: If195e3a8cf3454a73508633e9b317d66030da826
Reviewed-on: https://go-review.googlesource.com/5071
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoimage/draw: add CMYK fast path.
Nigel Tao [Tue, 17 Feb 2015 06:29:54 +0000 (17:29 +1100)]
image/draw: add CMYK fast path.

Change-Id: I9582aff7ca141a8aead5692af74b9c708b1700cc
Reviewed-on: https://go-review.googlesource.com/5020
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] misc/cgo/test: fix PC reference in arm assembler
Rob Pike [Tue, 17 Feb 2015 21:37:06 +0000 (13:37 -0800)]
[dev.cc] misc/cgo/test: fix PC reference in arm assembler

Use R15.
May fix build.

Change-Id: Ia25b0936c5aab2a427f8e6531688c3e537fbfdd0
Reviewed-on: https://go-review.googlesource.com/5070
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm/internal/asm: add operand parsing test
Rob Pike [Tue, 17 Feb 2015 19:21:57 +0000 (11:21 -0800)]
[dev.cc] cmd/asm/internal/asm: add operand parsing test

Generated by reducing all the amd64 operands in the core.
Will add 386 and ARM later; this is a trial balloon.

NOTE: There is at least one anomaly: AX:DX doesn't print correctly in this situation.

Change-Id: I9f327c1890b100e3edb7b1b2a1c01f3e4b798f43
Reviewed-on: https://go-review.googlesource.com/4967
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: fix runtime-gdb_test on arm
Austin Clements [Tue, 17 Feb 2015 20:01:43 +0000 (15:01 -0500)]
runtime: fix runtime-gdb_test on arm

Apparently when ARM stops at a GDB breakpoint, it appears to be in
syscall.Syscall.  The "info goroutines" test expected it to be in a
runtime function.  Since this isn't fundamental to the test, simply
tweak the test's regexp to make sure "info goroutines" prints some
running goroutine with an active M, but don't require it to be in any
particular function.

Change-Id: Iba2618b46d3dc49cef62ffb72484b83ea7b0317d
Reviewed-on: https://go-review.googlesource.com/5060
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agoruntime: rename gcwork.go to mgcwork.go
Austin Clements [Fri, 13 Feb 2015 22:30:16 +0000 (17:30 -0500)]
runtime: rename gcwork.go to mgcwork.go

All of the other memory-related source files start with "m".  Keep up
the tradition.

Change-Id: Idd88fdbf2a1453374fa12109b949b1c4d149a4f8
Reviewed-on: https://go-review.googlesource.com/4853
Reviewed-by: Minux Ma <minux@golang.org>
10 years agoruntime: in runtime-gdb.py, use SliceValue wrapper
Austin Clements [Tue, 17 Feb 2015 03:04:24 +0000 (22:04 -0500)]
runtime: in runtime-gdb.py, use SliceValue wrapper

Rather than reaching in to slices directly in the slice pretty
printer, use the newly introduced SliceValue wrapper.

Change-Id: Ibb25f8c618c2ffb3fe1a8dd044bb9a6a085df5b7
Reviewed-on: https://go-review.googlesource.com/4936
Reviewed-by: Minux Ma <minux@golang.org>
10 years agoruntime: fix GDB "info goroutines" for Go 1.5
Austin Clements [Tue, 17 Feb 2015 02:56:10 +0000 (21:56 -0500)]
runtime: fix GDB "info goroutines" for Go 1.5

"info goroutines" is failing because it hasn't kept up with changes in
the 1.5 runtime.  This fixes three issues preventing "info goroutines"
from working.  allg is no longer a linked list, so switch to using the
allgs slice.  The g struct's 'status' field is now called
'atomicstatus', so rename uses of 'status'.  Finally, this was trying
to parse str(pc) as an int, but str(pc) can return symbolic
information after the raw hex value; fix this by stripping everything
after the first space.

This also adds a test for "info goroutines" to runtime-gdb_test, which
was previously quite skeletal.

Change-Id: I8ad83ee8640891cdd88ecd28dad31ed9b5833b7a
Reviewed-on: https://go-review.googlesource.com/4935
Reviewed-by: Minux Ma <minux@golang.org>
10 years ago[dev.cc] runtime/cgo: change PC to R15 in asm_arm.s
Rob Pike [Tue, 17 Feb 2015 17:49:57 +0000 (09:49 -0800)]
[dev.cc] runtime/cgo: change PC to R15 in asm_arm.s

R15 is the real register. PC is a pseudo-register that we are making
illegal in this context as part of the grand assembly unification.

Change-Id: Ie0ea38ce7ef4d2cf4fcbe23b851a570fd312ce8d
Reviewed-on: https://go-review.googlesource.com/4966
Reviewed-by: Minux Ma <minux@golang.org>
10 years ago[dev.cc] cmd/asm: fix build: handle g in register lists on ARM
Rob Pike [Tue, 17 Feb 2015 16:24:08 +0000 (08:24 -0800)]
[dev.cc] cmd/asm: fix build: handle g in register lists on ARM

Handle the special name of R10 on the ARM - it's g - when it appears
in a register list [R0, g, R3]. Also simplify the pseudo-register parsing
a little.

Should fix the ARM build.

Change-Id: Ifcafc8195dcd3622653b43663ced6e4a144a3e51
Reviewed-on: https://go-review.googlesource.com/4965
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agomath: change Nextafter64 to Nextafter in the description of Nextafter
Ivan Ukhov [Tue, 17 Feb 2015 06:53:44 +0000 (07:53 +0100)]
math: change Nextafter64 to Nextafter in the description of Nextafter

Change-Id: I3419d6247fbff36aa1ed5451bb3cfb7502c3d07e
Reviewed-on: https://go-review.googlesource.com/5030
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agocmd/go: skip stat check when using -toolexec
David Crawshaw [Mon, 16 Feb 2015 19:22:22 +0000 (14:22 -0500)]
cmd/go: skip stat check when using -toolexec

Change-Id: Idc88b1ee950e33cfe757a27e9a3383d879793af7
Reviewed-on: https://go-review.googlesource.com/4934
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agosyscall: make mksyscall_windows.go to work even when output does not uses unsafe...
Alex Brainman [Tue, 17 Feb 2015 04:21:11 +0000 (15:21 +1100)]
syscall: make mksyscall_windows.go to work even when output does not uses unsafe package

Fixes #9900

Change-Id: I5dd401e8d2040e84ccb97c2fe9f5c5a28095b538
Reviewed-on: https://go-review.googlesource.com/5005
Reviewed-by: Minux Ma <minux@golang.org>
10 years ago[dev.cc] runtime: remove comma at the end of DIVL instruction (fixes windows build)
Alex Brainman [Tue, 17 Feb 2015 05:48:31 +0000 (16:48 +1100)]
[dev.cc] runtime: remove comma at the end of DIVL instruction (fixes windows build)

Change-Id: Ia47e1e387acd30f30559d766aa6fca18cbb098f9
Reviewed-on: https://go-review.googlesource.com/5010
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years ago[dev.cc] cmd/go: enable verifyAsm for asm on ARM
Rob Pike [Sun, 15 Feb 2015 23:45:06 +0000 (15:45 -0800)]
[dev.cc] cmd/go: enable verifyAsm for asm on ARM

Change-Id: I182ea770110255a5ac1c91cf30dd650696a8f1db
Reviewed-on: https://go-review.googlesource.com/4961
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: fix build for x86 architectures
Rob Pike [Tue, 17 Feb 2015 04:42:55 +0000 (20:42 -0800)]
[dev.cc] cmd/asm: fix build for x86 architectures

Mishandled the complex addressing mode in masks<>(SB)(CX*8)
as a casualty of the ARM work. Fix by backing all the flows up to
the state where registerIndirect is always called with the input
sitting on the opening paren.

With this, build passes for me with linux-arm, linux-386, and linux-amd64.

Change-Id: I7cae69a6fa9b635c79efd93850bd1e744b22bc79
Reviewed-on: https://go-review.googlesource.com/4964
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoall: fix typo in doc
Yasuhiro Matsumoto [Tue, 17 Feb 2015 02:04:07 +0000 (11:04 +0900)]
all: fix typo in doc

Change-Id: I89fdda2914030dfea3183a8b4681dd4b33489729
Reviewed-on: https://go-review.googlesource.com/4996
Reviewed-by: Minux Ma <minux@golang.org>
10 years ago[dev.cc] cmd/internal/asm: fix build: was mishandling SP reference on amd64
Rob Pike [Tue, 17 Feb 2015 04:14:37 +0000 (20:14 -0800)]
[dev.cc] cmd/internal/asm: fix build: was mishandling SP reference on amd64

A consequence of the ARM work overlooked that SP is a real register
on x86, so we need to detect it specially.

This will be done better soon, but this is a fast fix for the build.

Change-Id: Ia30d111c3f42a5f0b5f4eddd4cc4d8b10470c14f
Reviewed-on: https://go-review.googlesource.com/4963
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/internal/obj/arm: delete trailing space from AND instruction
Rob Pike [Tue, 17 Feb 2015 03:50:35 +0000 (19:50 -0800)]
[dev.cc] cmd/internal/obj/arm: delete trailing space from AND instruction

The tools have been fixed to not do this, but verifyAsm depends on this
being fixed.

TBR=rsc

Change-Id: Ia8968cc803b3498dfa2f98188c6ed1cf2e11c66d
Reviewed-on: https://go-review.googlesource.com/4962
Reviewed-by: Rob Pike <r@golang.org>
10 years agoimage: fix Rectangle.Overlaps and Rectangle.Union for empty rectangles.
Nigel Tao [Tue, 17 Feb 2015 00:15:06 +0000 (11:15 +1100)]
image: fix Rectangle.Overlaps and Rectangle.Union for empty rectangles.

Fixes #9895.

Change-Id: I37d78ced9ff8196e32d299504908a1c41ad4592d
Reviewed-on: https://go-review.googlesource.com/4990
Reviewed-by: Rob Pike <r@golang.org>
10 years ago[dev.cc] cmd/internal/obj/arm: add a couple of missing settings of Ctxt
Rob Pike [Sun, 15 Feb 2015 23:37:28 +0000 (15:37 -0800)]
[dev.cc] cmd/internal/obj/arm: add a couple of missing settings of Ctxt

Change-Id: Ic33431cdcc93db300fc2c3467eafdb5340ee4896
Reviewed-on: https://go-review.googlesource.com/4924
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: support ARM
Rob Pike [Sat, 14 Feb 2015 01:01:43 +0000 (17:01 -0800)]
[dev.cc] cmd/asm: support ARM

There are many peculiarites of the ARM architecture that require work:
condition codes, new instructions, new instruction arg counts, and more.

Rewrite the parser to do a cleaner job, flowing left to right through the
sequence of elements of an operand.

Add ARM to arch.
Add ARM-specific details to the arch in a new file, internal/arch/arm.
These are probably better kept away from the "portable" asm. However
there are some pieces, like MRC, that are hard to disentangle. They
can be cleaned up later.

Change-Id: I8c06aedcf61f8a3960a406c094e168182d21b972
Reviewed-on: https://go-review.googlesource.com/4923
Reviewed-by: Russ Cox <rsc@golang.org>
10 years ago[dev.cc] cmd/asm: fix macro definition bug in the lexer
Rob Pike [Sat, 14 Feb 2015 00:55:33 +0000 (16:55 -0800)]
[dev.cc] cmd/asm: fix macro definition bug in the lexer

Because text/scanner hides the spaces, the lexer treated
#define A(x)
and
#define A (x)
the same, but they are not: the first is an argument with macros, the
second is a simple one-word macro whose definition contains parentheses.
Fix this by noticing the relative column number as we move from A to (.
Hacky but simple.

Also add a helper to recognize the peculiar ARM shifted register operators.

Change-Id: I2cad22f5f1e11d8dad40ad13955793d178afb3ae
Reviewed-on: https://go-review.googlesource.com/4872
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoos: fix typo in doc
mattn [Tue, 17 Feb 2015 00:16:06 +0000 (09:16 +0900)]
os: fix typo in doc

Change-Id: I9797b44dfa7c2c853b7a656f4f722df2c862824b
Reviewed-on: https://go-review.googlesource.com/4991
Reviewed-by: Andrew Gerrand <adg@golang.org>
10 years agoimage/draw: add CMYK test.
Nigel Tao [Mon, 16 Feb 2015 06:41:28 +0000 (17:41 +1100)]
image/draw: add CMYK test.

This just adds test cases. Optimizing CMYK draws will be a follow-up
change.

Change-Id: Ic0d6343d420cd021e21f88623ad7182e93017da9
Reviewed-on: https://go-review.googlesource.com/4941
Reviewed-by: Rob Pike <r@golang.org>
10 years agounicode: Fixed an out of date comment (MaxLatin1, not Latin1Max).
Aaron Jacobs [Mon, 16 Feb 2015 21:21:14 +0000 (08:21 +1100)]
unicode: Fixed an out of date comment (MaxLatin1, not Latin1Max).

Change-Id: I3ca878e9685f650a9ff02aaac0e2e3cca89634c6
Reviewed-on: https://go-review.googlesource.com/4970
Reviewed-by: Minux Ma <minux@golang.org>
10 years agodoc: Add reminder to go1.5.txt for os/signal changes
Michael MacInnis [Mon, 16 Feb 2015 21:27:20 +0000 (16:27 -0500)]
doc: Add reminder to go1.5.txt for os/signal changes

Document addition of Ignore and Reset: https://golang.org/cl/3580

Change-Id: I33aac149cd1921b87f887028c0365ba0ab9adb02
Reviewed-on: https://go-review.googlesource.com/4980
Reviewed-by: Minux Ma <minux@golang.org>
10 years agocmd/dist: don't use "uname -v" to recognize GOHOSTARCH
Mikio Hara [Mon, 16 Feb 2015 14:14:34 +0000 (23:14 +0900)]
cmd/dist: don't use "uname -v" to recognize GOHOSTARCH

We can use processor architecture or hardware platform as part of
hostname and it leads to misconfiguration of GOHOSARCH.

For example,

$ uname -m -v
FreeBSD 10.1-RELEASE-p5 #0: Tue Jan 27 08:52:50 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

Change-Id: I499efd98338beff6a27c03f03273331ecb6fd698
Reviewed-on: https://go-review.googlesource.com/4944
Reviewed-by: Minux Ma <minux@golang.org>
10 years agoos/signal: add ability to ignore signals and restore initial signal handlers
Michael MacInnis [Fri, 30 Jan 2015 03:37:41 +0000 (22:37 -0500)]
os/signal: add ability to ignore signals and restore initial signal handlers

There is currently no way to ignore signals using the os/signal package.
It is possible to catch a signal and do nothing but this is not the same
as ignoring it. The new function Ignore allows a set of signals to be
ignored. The new function Reset allows the initial handlers for a set of
signals to be restored.

Fixes #5572

Change-Id: I5c0f07956971e3a9ff9b9d9631e6e3a08c20df15
Reviewed-on: https://go-review.googlesource.com/3580
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agoimage/jpeg: remove the (temporary) dependency on image/draw.
Nigel Tao [Mon, 16 Feb 2015 04:10:50 +0000 (15:10 +1100)]
image/jpeg: remove the (temporary) dependency on image/draw.

Change-Id: Idd66f9c3c9eaa4ff1f950fb90e4800dc625dec08
Reviewed-on: https://go-review.googlesource.com/4916
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
10 years agoruntime: remove C-style strcmp and strncmp helpers
Matthew Dempsky [Fri, 13 Feb 2015 03:09:12 +0000 (12:09 +0900)]
runtime: remove C-style strcmp and strncmp helpers

Change-Id: I4aa23e3a0e765651c91907507a0194fd528b6223
Reviewed-on: https://go-review.googlesource.com/4662
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agoimage/jpeg: support decoding CMYK and YCbCrK images.
Nigel Tao [Fri, 13 Feb 2015 07:09:21 +0000 (18:09 +1100)]
image/jpeg: support decoding CMYK and YCbCrK images.

The new testdata was created by:

convert video-001.png -colorspace cmyk video-001.cmyk.jpeg

video-001.cmyk.jpeg was then converted back to video-001.cmyk.png via
the GIMP. ImageMagick (convert) wasn't used for this second conversion
because IM's default color profiles complicates things.

Fixes #4500.

Change-Id: Ibf533f6a6c7e76883acc493ce3a4289d7875df3f
Reviewed-on: https://go-review.googlesource.com/4801
Reviewed-by: Rob Pike <r@golang.org>
10 years agoimage: add image.CMYK and color.CMYK types.
Nigel Tao [Fri, 13 Feb 2015 07:12:48 +0000 (18:12 +1100)]
image: add image.CMYK and color.CMYK types.

Change-Id: Icf212a4b890725c803b16e76e1a88294b8b62cb8
Reviewed-on: https://go-review.googlesource.com/4800
Reviewed-by: Rob Pike <r@golang.org>
10 years agomath/big: implement fast path in Float.SetRat if argument is integer
Robert Griesemer [Sun, 15 Feb 2015 05:29:37 +0000 (21:29 -0800)]
math/big: implement fast path in Float.SetRat if argument is integer

Change-Id: Ib82500e198b86e9fade278c7eea7a4b0c6b0b2e1
Reviewed-on: https://go-review.googlesource.com/4921
Reviewed-by: Rob Pike <r@golang.org>
10 years agocmd/gc: fix noscan maps
Dmitry Vyukov [Sat, 14 Feb 2015 13:10:06 +0000 (16:10 +0300)]
cmd/gc: fix noscan maps

Change 85e7bee introduced a bug:
it marks map buckets as noscan when key and val do not contain pointers.
However, buckets with large/outline key or val do contain pointers.

This change takes key/val size into consideration when
marking buckets as noscan.

Change-Id: I7172a0df482657be39faa59e2579dd9f209cb54d
Reviewed-on: https://go-review.googlesource.com/4901
Reviewed-by: Keith Randall <khr@golang.org>
10 years agomath/big: always round after the sign is set
Robert Griesemer [Sat, 14 Feb 2015 05:47:10 +0000 (21:47 -0800)]
math/big: always round after the sign is set

Some rounding modes are affected by the sign of the value to
be rounded. Make sure the sign is set before round is called.
Added tests (that failed before the fix).

Change-Id: Idd09b8fcbab89894fede0b9bc922cda5ddc87930
Reviewed-on: https://go-review.googlesource.com/4876
Reviewed-by: Rob Pike <r@golang.org>
10 years agodoc/asm: document that assembly function must use short name
Shenghou Ma [Fri, 9 Jan 2015 02:43:47 +0000 (21:43 -0500)]
doc/asm: document that assembly function must use short name

e.g. ·Name instead of package·Name for automatic stack map to
be applied from its Go prototype.

The underlying reason is that liblink look up name with suffix
".args_stackmap" for the stackmap coming from its Go prototype,
but all the Go functions are named "".Name as this stage. Thus
an assembly function named package·Name will never find its
stackmap, which is named "".package.Name.args_stackmap.

Perhaps cmd/vet should give a warning for this.

Change-Id: I10d154a73ec969d574d20af877f747424350fbd1
Reviewed-on: https://go-review.googlesource.com/2588
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agocmd/go: remove script and script.txt
Shenghou Ma [Sat, 14 Feb 2015 05:40:21 +0000 (00:40 -0500)]
cmd/go: remove script and script.txt

Fixes #9824.

Change-Id: Id318c61b6884e4fd294f7b0946dcc306f746ee0a
Reviewed-on: https://go-review.googlesource.com/4891
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agotest: add test case for issue 4365
Ian Lance Taylor [Sat, 14 Feb 2015 02:31:30 +0000 (18:31 -0800)]
test: add test case for issue 4365

This is an update of http://golang.org/cl/151410043 by Tim Shen.

Change-Id: I43ab7fcedd785059c535f45a3c8cdb7b618c1499
Reviewed-on: https://go-review.googlesource.com/4873
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agomath/big: fix aliasing bug in Float.Quo
Robert Griesemer [Sat, 14 Feb 2015 04:15:40 +0000 (20:15 -0800)]
math/big: fix aliasing bug in Float.Quo

TBR r, adonovan

Change-Id: I1a38e2d724bf1147c7307a7e5ae855c42c60428c
Reviewed-on: https://go-review.googlesource.com/4875
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agomath/big: don't scan past a binary exponent if not accepted syntactically
Robert Griesemer [Thu, 12 Feb 2015 23:09:56 +0000 (15:09 -0800)]
math/big: don't scan past a binary exponent if not accepted syntactically

TBR adonovan

Change-Id: I842cbc855dbd560f65e76c9a557dff1a22c5d610
Reviewed-on: https://go-review.googlesource.com/4882
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agomath/big: only permit bases 2, 10, 16 when scanning number w/ "decimal" point
Robert Griesemer [Thu, 12 Feb 2015 22:52:46 +0000 (14:52 -0800)]
math/big: only permit bases 2, 10, 16 when scanning number w/ "decimal" point

TBR adonovan

Change-Id: I4fd694101c2cf1c0c39bf73d16cab18502742dd9
Reviewed-on: https://go-review.googlesource.com/4881
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agomath/big: remove Float.Round (not needed anymore), fix a bug in SetInt64
Robert Griesemer [Sat, 14 Feb 2015 00:30:21 +0000 (16:30 -0800)]
math/big: remove Float.Round (not needed anymore), fix a bug in SetInt64

TBR adonovan

Change-Id: I30020f39be9183b37275e10a4fd1e1a3b4c48c89
Reviewed-on: https://go-review.googlesource.com/4880
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agomath/big: implement/rename accessors for precision and rounding mode
Robert Griesemer [Fri, 13 Feb 2015 21:44:39 +0000 (13:44 -0800)]
math/big: implement/rename accessors for precision and rounding mode

Also: remove NewFloat - not needed anymore. Work-around for places
where has been used so far:

NewFloat(x, prec, mode) === new(Float).SetMode(mode).SetPrec(prec).SetFloat64(x)

However, if mode == ToNearestEven, SetMode is not needed. SetPrec
is needed if the default precision (53 after SetFloat64) is not
adequate.

TBR adonovan

Change-Id: Ifda12c479ba157f2dea306c32b47c7afbf31e759
Reviewed-on: https://go-review.googlesource.com/4842
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agomath/big: fix aliasing error in Add, Sub
Robert Griesemer [Fri, 13 Feb 2015 20:47:44 +0000 (12:47 -0800)]
math/big: fix aliasing error in Add, Sub

Also:
- make representation more flexible (no need to store trailing 0 digits to match precision)
- simplify rounding as a consequence
- minor related fixes

TBR adonovan

Change-Id: Ie91075990688b506d28371ec3b633b8267397ebb
Reviewed-on: https://go-review.googlesource.com/4841
Reviewed-by: Rob Pike <r@golang.org>
10 years agomath/big: use internal validation more consistently
Robert Griesemer [Fri, 13 Feb 2015 18:12:25 +0000 (10:12 -0800)]
math/big: use internal validation more consistently

TBR adonovan

Change-Id: If77afa6474af6cad6512f6866725e3ae5acf2e3f
Reviewed-on: https://go-review.googlesource.com/4840
Reviewed-by: Robert Griesemer <gri@golang.org>