Commit graph

21599 commits

Author SHA1 Message Date
Russ Cox be818361b9 [dev.cc] liblink: invoke 'go tool objwriter' to implement writeobj, if directed
This CL enables moving the bulk of the object writing code
out of liblink and into translated Go libraries in cmd/internal/obj,
but it does not do the move.

This CL introduces two new environment variables,
$GOOBJ and $GOOBJWRITER, but both will be deleted along with
the rest of the liblink C code.

The default behavior of a build is unchanged by this CL:
the C version of liblink uses the C object layout and writing code.

If $GOOBJ=1, liblink invokes go tool objwriter instead.

If $GOOBJ=2, liblink does its own layout and then invokes
go tool objwriter, which checks that it gets the same answer.

That is, in $GOOBJ=2 mode, both the C and the Go version of
the code run, and the operation fails if the two produce different
answers. This provides a very strong check that the translation
is working correctly.

Change-Id: I56ab49b07ccb2c7b81085f1d6950131047c6aa3c
Reviewed-on: https://go-review.googlesource.com/3048
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 03:15:04 +00:00
Russ Cox 35d3987dbc [dev.cc] cmd/objwriter: implement using cmd/internal/obj
New code but nothing interesting.
It's nearly all parsing code for the format written by liblink.
The interesting part is the call to obj.Writeobjdirect, which
is the Go translation of the C liblink writeobjdirect function.

Change-Id: I2e9e755e7a3c999302e2ef2c7475c0af9c5acdd2
Reviewed-on: https://go-review.googlesource.com/3047
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 03:02:35 +00:00
Russ Cox d6f6e420fc [dev.cc] cmd/internal/obj: convert liblink C to Go
This CL adds the real cmd/internal/obj packages.
Collectively they correspond to the liblink library.
The conversion was done using rsc.io/c2go's run script
at rsc.io/c2go repo version 706fac7.

This is not the final conversion, just the first working draft.
There will be more updates, but this works well enough
to use with go tool objwriter and pass all.bash.

Change-Id: I9359e835425f995a392bb2fcdbebf29511477bed
Reviewed-on: https://go-review.googlesource.com/3046
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 03:02:27 +00:00
Russ Cox db52315c88 [dev.cc] build: do not 'clean -i std' between dist and go_bootstrap
Executing 'clean -i std' removes installed Go programs,
including the toolchain binaries we need for building.
It's not clear why the 'clean -i std' is here in the first place.
cmd/dist just removed the entire pkg tree, so everything is new.
The only reason for 'clean -i std' would be if you don't trust
that dist compiled the packages properly. If that's true for
some reason, we can fix cmd/dist, or add -a to the install
commands that follow. Perhaps clean -i std should not
remove tools, or perhaps std should not expand to any tools.
Not sure.

Also remove banner from make.bat and make.rc that was
already removed from make.bash. cmd/dist prints it now.

Also fix array size error in liblink/objfile.c.

Fixes dev.cc build.

Change-Id: I60855e001a682efce55ad9aa307a8f3ee47f7366
Reviewed-on: https://go-review.googlesource.com/3100
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-21 02:19:27 +00:00
Russ Cox 725e3a7afb [dev.cc] liblink: invoke go tool objwriter during writeobj
This doesn't actually use objwriter for any real work.
It's just to check that objwriter is available.
The real work will be moved once the bootstrapping
mechanisms are working.

Change-Id: I5f41c8910c4b11b9d80cb0b0847ff9cb582fc2be
Reviewed-on: https://go-review.googlesource.com/3045
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 00:45:07 +00:00
Russ Cox 328ace91e6 [dev.cc] cmd/dist: bootstrap Go toolchain using Go 1.4
Bootstrap the Go parts of the Go toolchain using Go 1.4,
as described in https://golang.org/s/go15bootstrap.

The first Go part of the Go toolchain will be cmd/objwriter,
but for now that's just an empty program to test that this
new code works.

Once the build dashboard is okay with this change,
we'll make objwriter a real program depended upon by the build.

Change-Id: Iad3dce675571cbdb5ab6298fe6f98f53ede47d5c
Reviewed-on: https://go-review.googlesource.com/3044
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 00:45:03 +00:00
Russ Cox 283b23297a [dev.cc] cmd/objwriter: add placeholder program
cmd/internal/obj is the name for the Go translation of the C liblink library.

cmd/objwriter is the name of a Go binary that runs liblink's writeobj function.
When the bulk of liblink has been converted to Go but the assemblers and
compilers are still written in C, the C writeobj will shell out to the Go objwriter
to actually write the object file. This lets us manage the transition in smaller
pieces.

The objwriter tool is purely transitional.
It will not ship in any release (enforced in cmd/dist).

Adding a dummy program and some dummy imports here so that we
can work on the bootstrap mechanisms that will be necessary to build it.
Once the build process handles objwriter properly,
we'll work on the actual implementation.

Change-Id: I675c818b3a513c26bb91c6dba564c6ace3b7fcd4
Reviewed-on: https://go-review.googlesource.com/3043
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 00:44:56 +00:00
Russ Cox c4dd7fac89 [dev.cc] cmd/dist, lib9: make GOHOSTARCH, GOHOSTOS available to C programs
Needed for invoking a Go subprocess in the C code.
The Go tools live in $GOROOT/pkg/tool/$GOHOSTARCH_$GOHOSTOS.

Change-Id: I961b6b8a07de912de174b758b2fb87d77080546d
Reviewed-on: https://go-review.googlesource.com/3042
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 00:44:50 +00:00
Russ Cox 3b2de80309 [dev.cc] liblink: arrange for Prog* argument in vaddr
The argument is unused in the C code but will be used in the Go translation,
because the Prog holds information needed to invoke the right meaning
of %A in the ctxt->diag calls in vaddr.

Change-Id: I501830f8ea0e909aafd8ec9ef5d7338e109d9548
Reviewed-on: https://go-review.googlesource.com/3041
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-21 00:44:40 +00:00
Evan Kroske 68b78b8abd net/http/fcgi: Fix resource leaks
Close the pipe for the body of a request when it is aborted and close
all pipes when child.serve terminates.

Fixes #6934

Change-Id: I1c5e7d2116e1ff106f11a1ef8e99bf70cf04162a
Reviewed-on: https://go-review.googlesource.com/1923
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 22:54:54 +00:00
Mikio Hara 9ccbd027dd cmd/go: make use of Runnable method
Reported via unsupported Github pull request: #9299

Change-Id: I0e98dd68cbc68fcc6bcec15c5b33f20b6a861ec6
Reviewed-on: https://go-review.googlesource.com/3025
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 22:20:41 +00:00
Andrew Gerrand 95864504d2 misc/dashboard/codereview: delete
This dashboard is no longer in use, and doesn't work with Gerrit.

Change-Id: Ib7c367dcad97322566610157b15e23db5bec58ff
Reviewed-on: https://go-review.googlesource.com/3028
Reviewed-by: David Symonds <dsymonds@golang.org>
2015-01-19 22:18:03 +00:00
Russ Cox 73a10bfcbb cmd/dist: fix deadlock when compilation command fails
Can't use bgwait, both because it can only be used from
one goroutine at a time and because it ends up queued
behind all the other pending commands. Use a separate
signaling mechanism so that we can notice we're dying
sooner.

Change-Id: I8652bfa2f9bb5725fa5968d2dd6a745869d01c01
Reviewed-on: https://go-review.googlesource.com/3010
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-19 16:27:13 +00:00
Russ Cox 3965d7508e runtime: factor out bitmap, finalizer code from malloc/mgc
The code in mfinal.go is moved from malloc*.go and mgc*.go
and substantially unchanged.

The code in mbitmap.go is also moved from those files, but
cleaned up so that it can be called from those files (in most cases
the code being moved was not already a standalone function).
I also renamed the constants and wrote comments describing
the format. The result is a significant cleanup and isolation of
the bitmap code, but, roughly speaking, it should be treated
and reviewed as new code.

The other files changed only as much as necessary to support
this code movement.

This CL does NOT change the semantics of the heap or type
bitmaps at all, although there are now some obvious opportunities
to do so in followup CLs.

Change-Id: I41b8d5de87ad1d3cd322709931ab25e659dbb21d
Reviewed-on: https://go-review.googlesource.com/2991
Reviewed-by: Keith Randall <khr@golang.org>
2015-01-19 16:26:51 +00:00
Jongmin Kim fd880f8d26 net/http: remove unused test type
Change-Id: Ia8d4459a39425583027f00410fe17b9686b768db
Reviewed-on: https://go-review.googlesource.com/3026
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 15:56:49 +00:00
Russ Cox 4d226dfee9 runtime: move write barrier code into mbarrier.go
I also added new comments at the top of mbarrier.go,
but the rest of the code is just copy-and-paste.

Change-Id: Iaeb2b12f8b1eaa33dbff5c2de676ca902bfddf2e
Reviewed-on: https://go-review.googlesource.com/2990
Reviewed-by: Austin Clements <austin@google.com>
2015-01-19 15:27:23 +00:00
Russ Cox 7ef59e4ed8 runtime: rename float64 constants to avoid name space pollution
Otherwise, if you mistakenly refer to an undeclared 'shift' variable, you get 52.

Change-Id: I845fb29f23baee1d8e17b37bde0239872eb54316
Reviewed-on: https://go-review.googlesource.com/2909
Reviewed-by: Austin Clements <austin@google.com>
2015-01-19 15:26:45 +00:00
Shenghou Ma e12b1ddc99 fmt: reword the document for [n].
Fixes #9632.

Change-Id: Ic4d7cad8ff62023c1beecd2d62e48eb9258f5306
Reviewed-on: https://go-review.googlesource.com/3013
Reviewed-by: Rob Pike <r@golang.org>
2015-01-19 06:35:21 +00:00
Mikio Hara 3b5be4522a net: more accurate parsing of IPv4 header on IPConn
As shown in #9395, inaccurate implementation would be a cause of parsing
IPv4 header twice and corrupted upper-layer message issues.

Change-Id: Ia1a042e7ca58ee4fcb38fe9ec753c2ab100592ca
Reviewed-on: https://go-review.googlesource.com/3001
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-19 03:20:59 +00:00
Russ Cox fd4dc91a96 strings: remove overengineered Compare implementation
The function is here ONLY for symmetry with package bytes.
This function should be used ONLY if it makes code clearer.
It is not here for performance. Remove any performance benefit.

If performance becomes an issue, the compiler should be fixed to
recognize the three-way compare (for all comparable types)
rather than encourage people to micro-optimize by using this function.

Change-Id: I71f4130bce853f7aef724c6044d15def7987b457
Reviewed-on: https://go-review.googlesource.com/3012
Reviewed-by: Rob Pike <r@golang.org>
2015-01-19 02:19:17 +00:00
Russ Cox e832043e72 cmd/go: set $GOROOT during 'go tool' invocations
cmd/dist now requires $GOROOT to be set explicitly.
Set it when invoking via 'go tool dist' so that users are unaffected.

Also, change go tool -n to drop trailing space in output
for 'go tool -n <anything>'.

Change-Id: I9b2c020e0a2f3fa7c9c339fadcc22cc5b6cb7cac
Reviewed-on: https://go-review.googlesource.com/3011
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 02:19:01 +00:00
Shenghou Ma dca54d7cdd cmd/dist: do not leave go-tool-dist-* temporary directories behind
Change-Id: I3f6ba5591130b2c4762d33bd4553220765ad9fc5
Reviewed-on: https://go-review.googlesource.com/2996
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-19 00:50:50 +00:00
Michael Matloob 020637daa9 cmd/dist: produce a properly formatted zversion.go
gofmt inserts a blank line line between const and var declarations

Change-Id: I3f2ddbd9e66a74eb3f37a2fe641b93820b02229e
Reviewed-on: https://go-review.googlesource.com/3022
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 00:35:40 +00:00
Brad Fitzpatrick fd2642bfe3 doc: update go1.5.txt
Change-Id: I58d66a7fc25b172baf0df6b634e9e2cc792967d5
Reviewed-on: https://go-review.googlesource.com/3021
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-19 00:00:46 +00:00
Bill Thiede e9ce76b0ec runtime, syscall: use SYSCALL instruction on FreeBSD.
This manually reverts 555da73 from #6372 which implies a
minimum FreeBSD version of 8-STABLE.
Updates docs to mention new minimum requirement.

Fixes #9627

Change-Id: I40ae64be3682d79dd55024e32581e3e5e2be8aa7
Reviewed-on: https://go-review.googlesource.com/3020
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-18 23:51:50 +00:00
Shenghou Ma 30e910197a misc/makerelease: workaround the go install -a restriction on release branches
Fixes #9619.

Change-Id: I71931b0d546163e5451d7d72e552b08540e3c2a7
Reviewed-on: https://go-review.googlesource.com/2995
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-18 23:20:25 +00:00
Brad Fitzpatrick 778b649e38 doc: direct people to the mailing list
Since the move to Github, we've started to receive lots of
introductory questions to the bug tracker. I posit this is because
most projects on Github don't have mailing lists, so the culture on
Github is to use the Issue Tracker as a discussion forum.

The Go project doesn't use the Issue Tracker as our first point of
communication. This CL updates CONTRIBUTING.md (which is linked when
you file a bug or send a pull request), to mention that we have a
mailing list.

It certainly won't stop all the errant bug reports, but it should
help.

Change-Id: Id8fbfd35b73f5117617dff53b1e72d5b5276388b
Reviewed-on: https://go-review.googlesource.com/3002
Reviewed-by: Rob Pike <r@golang.org>
2015-01-18 21:27:07 +00:00
Martin Möhrmann c2c0bf77ef net/http/cgi: correctly handle pathnames for cygwin perl on windows
Cygwin perl uses unix pathnames in windows. Include cygwin perl in the
list of special cases for unix pathname handling in test.cgi.

Change-Id: I30445a9cc79d62d022ecc232c35aa5015b7418dc
Reviewed-on: https://go-review.googlesource.com/2973
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-01-17 22:51:55 +00:00
Keith Randall c3b459d328 test: generate tests for arithmetic on narrow types
Fixes #9607
Related to #9604
Inadvertently found #9609

Change-Id: I8a8ddf84ac72d3e18986fd8e9288734459f3f174
Reviewed-on: https://go-review.googlesource.com/2962
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-17 21:00:15 +00:00
Russ Cox 9af454c588 all: merge dev.cc (929f321) into master
This brings in cmd/dist written in Go, which is working on the primary builders.

If this breaks your build, you need to get Go 1.4 and put it in $HOME/go1.4
(or, if you want to use some other directory, set $GOROOT_BOOTSTRAP
to that directory).

To build Go 1.4 from source:

	git clone -b release-branch.go1.4 $GOROOT $HOME/go1.4
	cd $HOME/go1.4/src
	./make.bash

Or use a binary release: https://golang.org/dl/.

See https://golang.org/s/go15bootstrap for more information.

Change-Id: Ie4ae834c76ea35e39cc54e9878819a9e51b284d9
2015-01-16 18:57:33 -05:00
Hyang-Ah Hana Kim d5d4e82fb2 misc/android: choose the right subdirectory for bin under GOPATH.
This change includes the cleanup of temporary files created during
the binary execution as well.

Change-Id: Ic01a0a537d1daafcaa3acda1ec344aff5dcddfc2
Reviewed-on: https://go-review.googlesource.com/2903
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-01-16 22:02:52 +00:00
Austin Clements 36f456c789 misc/cgo: skip testso on ppc64
This test requires external linking, but we don't yet implement
external linking on ppc64 (tracked in issue #8912).  Disable the test
on ppc64 until external linking is implemented.

This makes all.bash pass on ppc64le.

Change-Id: I741498d4d9321607e7a65792a33faf8187bd18e4
Reviewed-on: https://go-review.googlesource.com/2908
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16 19:45:28 +00:00
Keith Randall c6ddca2aec math/big: bug in AndNot(x,y) for x>0,y<0.
The comment says to use (y-1), but then we did add(y.abs, natOne).  We meant sub.

Fixes #9609

Change-Id: I4fe4783326ca082c05588310a0af7895a48fc779
Reviewed-on: https://go-review.googlesource.com/2961
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-16 17:36:29 +00:00
David Crawshaw e10e913d08 syscall: use name+(NN)FP on linux/arm
Generated with a modified version of go vet and tested on android.

Change-Id: I1ff20135c5ab9de5a6dbf76ea2991167271ee70d
Reviewed-on: https://go-review.googlesource.com/2815
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-16 16:12:41 +00:00
Andrew Gerrand 2a87a8a5ec misc/makerelease: a couple of small fixes
Change-Id: Iec19d6152b95ba67daac366b32d42f69e1dba9a4
Reviewed-on: https://go-review.googlesource.com/2951
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16 03:31:46 +00:00
Keith Randall daa64ddfe6 cmd/5g: make sure we normalize after unary ops on small types
We were failing ^uint16(0xffff) == 0, as we computed 0xffff0000 instead.

I could only trigger a failure for the above case, the other two tests
^uint16(0xfffe) == 1 and -uint16(0xffff) == 1 didn't seem to fail
previously.  Somehow they get MOVHUs inserted for other reasons (used
by CMP instead of TST?).  I fixed OMINUS anyway, better safe than
sorry.

Fixes #9604

Change-Id: I4c2d5bdc667742873ac029fdbe3db0cf12893c27
Reviewed-on: https://go-review.googlesource.com/2940
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-15 23:50:01 +00:00
Ian Lance Taylor fdb855420b net: fix some typos in comments
Change-Id: I1bf1ab930a5c258f5fcc85ca3037692c71bf3cb2
Reviewed-on: https://go-review.googlesource.com/2870
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-15 22:59:04 +00:00
Andrew Gerrand 1d890ac0b2 misc/makerelease: use built in "del" to remove files
Git marks some of its files read only, so os.RemoveAll isn't sufficient
to remove them from the ".git" directory.

Change-Id: I3150596931d1c77e7cf9fb8da1a999d2c6730121
Reviewed-on: https://go-review.googlesource.com/2930
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 22:24:06 +00:00
Alan Donovan 90ce1936e3 strings: add Compare(x, y string) int, for symmetry with bytes.Compare
The implementation is the same assembly (or Go) routine.

Change-Id: Ib937c461c24ad2d5be9b692b4eed40d9eb031412
Reviewed-on: https://go-review.googlesource.com/2828
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 17:17:05 +00:00
Brad Fitzpatrick ee3a1ff6fd all: update old comments referencing *.goc files
Change-Id: Ibf05e55ffe3bb454809cd3450b790e44061511c7
Reviewed-on: https://go-review.googlesource.com/2890
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-15 16:31:52 +00:00
Hyang-Ah Hana Kim 25ece4ae44 build: androidtest.bash has to use copy for files to adb-sync.
androidtest.bash copies some go source to the android device
where the tests are going to run. It's necessary because some
tests require files and resources to be present. The copy is
done through adb sync. The script hoped faking the directory
using symlinks to work, but it doesn't. (adb sync doesn't follow
the symlinks) We need proper copy.

Change-Id: If55abca4958f159859e58512b0045f23654167e3
Reviewed-on: https://go-review.googlesource.com/2827
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-01-15 13:53:03 +00:00
Dmitry Vyukov 437ec6b313 encoding/xml: remove unnecessary memory allocation in Unmarshal
benchmark              old ns/op     new ns/op     delta
BenchmarkUnmarshal     75256         72626         -3.49%

benchmark              old allocs     new allocs     delta
BenchmarkUnmarshal     259            219            -15.44%

Change-Id: I7fd30739b045e35b95e6ef6a8ef2f15b0dd6839c
Reviewed-on: https://go-review.googlesource.com/2758
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 08:45:15 +00:00
Paul Nasrat a25af2e99e runtime: fix runtime-gdb script loading
runtime.rtype was a copy of reflect.rtype - update script to use that directly.
Introduces a basic test which will skip on systems without appropriate GDB.

Fixes #9326

Change-Id: I6ec74e947bd2e1295492ca34b3a8c1b49315a8cb
Reviewed-on: https://go-review.googlesource.com/2821
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-15 05:20:19 +00:00
Andrew Gerrand 7785be8f22 doc: document Go 1.4.1
Change-Id: I4e9737497f4995657c46e52e0722d921499f8d17
Reviewed-on: https://go-review.googlesource.com/2854
Reviewed-by: Rob Pike <r@golang.org>
2015-01-15 04:30:42 +00:00
Burcu Dogan e13170e22c build: fix typo in androidtest.bash
Change-Id: Idd72e095ad64e1a398058982422c2c5497a23ce5
Reviewed-on: https://go-review.googlesource.com/2739
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 03:23:58 +00:00
Adam Langley 2fe8eadc9a crypto/x509: write exact BitLength in ASN.1 encoding for certificate KeyUsage
The encoded value of the certificate KeyUsage did contain additonal padding
that was not present with other certificate generators. According to ITU-T
X.690 the BitLength value should have no padding in a DER encoding.

See discussion:
https://groups.google.com/forum/#!topic/golang-nuts/dzaJ3hMpDcs

This CL has been discussed at: http://golang.org/cl/168990043

Change-Id: I1eff3f441b0566966a2d279631901ad9287c917d
Reviewed-on: https://go-review.googlesource.com/2255
Reviewed-by: Adam Langley <agl@golang.org>
2015-01-15 01:58:54 +00:00
Russ Cox 929f3210ac [dev.cc] all: merge master (d1210ac) into dev.cc
Change-Id: I068d617175776c2f5df00b17ff0d404a584ab570
2015-01-14 19:40:28 -05:00
Martin Möhrmann d1210acffd time: correctly parse large input durations and avoid precision loss
Do not lose precision for durations specified without fractions
that can be represented by an int64 such as 1<<53+1 nanoseconds.
Previously there was some precision lost in floating point conversion.

Handle overflow for durations above 1<<63-1 nanoseconds but not earlier.

Add tests to cover the above cases.

Change-Id: I4bcda93cee1673e501ecb6a9eef3914ee29aecd2
Reviewed-on: https://go-review.googlesource.com/2461
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-15 00:15:58 +00:00
Rob Pike 3b63b69d2f test: comment the behavior and use of cmplxdivide*
The various files are confusingly named and their operation
not easy to see. Add a comment to cmplxdivide.c, one of the few
C files that will endure in the repository, to explain how to build
and run the test.

Change-Id: I1fd5c564a14217e1b9815b09bc24cc43c54c096f
Reviewed-on: https://go-review.googlesource.com/2850
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-15 00:00:06 +00:00
Matthew Dempsky 636de7afb6 runtime: fix *bsd/amd64 build
6g does not implement dead code elimination for const switches like it
does for const if statements, so the undefined raiseproc() function
was resulting in a link-time failure.

Change-Id: Ie4fcb3716cb4fe6e618033071df9de545ab3e0af
Reviewed-on: https://go-review.googlesource.com/2830
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-14 23:58:36 +00:00