]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agonet/http: fix race on bodyEOFSignal.isClosed
Dave Cheney [Thu, 11 Oct 2012 21:32:56 +0000 (08:32 +1100)]
net/http: fix race on bodyEOFSignal.isClosed

Update #4191.

Fixes unreported race failure at
http://build.golang.org/log/61e43a328fb220801d3d5c88cd91916cfc5dc43c

R=dvyukov, bradfitz
CC=golang-dev
https://golang.org/cl/6640057

12 years agocrypto/hmac: add Equal function.
Adam Langley [Thu, 11 Oct 2012 19:28:02 +0000 (15:28 -0400)]
crypto/hmac: add Equal function.

It was suggested that it's too easy to use crypto/hmac insecurely and
I think that has some merit. This change adds a Equal function to
make it obvious that MAC values should be compared in constant time.

R=rsc, max
CC=golang-dev
https://golang.org/cl/6632044

12 years agodoc/contribute.html: assorted fixes
Shenghou Ma [Thu, 11 Oct 2012 15:33:57 +0000 (23:33 +0800)]
doc/contribute.html: assorted fixes
0. windows uses all.bat instead of ./all.bash
1. correct expected all.bash output
2. mention you need to use an application specific password
if you're using 2-step verification
3. note you can edit files included in CL by 'hg change NNNN'
or 'hg file'

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/6615060

12 years agogodoc: update favicon
Andrew Gerrand [Thu, 11 Oct 2012 06:02:36 +0000 (17:02 +1100)]
godoc: update favicon

R=golang-dev
CC=golang-dev
https://golang.org/cl/6641058

12 years agodoc/faq: discuss virtual memory use by go processes
Andrew Gerrand [Thu, 11 Oct 2012 03:21:19 +0000 (14:21 +1100)]
doc/faq: discuss virtual memory use by go processes

Fixes #3948.

R=golang-dev, r, dave, dsymonds
CC=golang-dev
https://golang.org/cl/6639064

12 years ago doc/articles/wiki: numerous fixes
Jimmy Zelinskie [Thu, 11 Oct 2012 02:07:34 +0000 (13:07 +1100)]
  doc/articles/wiki: numerous fixes

Fixes #3733
Fixes #2149
Updated Syntax
Added part3.go example program
Added part3-errorhandling.go example program
Improved wording in some places

R=golang-dev, adg, minux.ma
CC=golang-dev
https://golang.org/cl/6636048

12 years agoA+C: add Jimmy Zelinskie (Individual CLA)
Andrew Gerrand [Thu, 11 Oct 2012 00:20:01 +0000 (11:20 +1100)]
A+C: add Jimmy Zelinskie (Individual CLA)

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6642068

12 years agogodoc: restore toy selection to playground widget
Andrew Gerrand [Wed, 10 Oct 2012 22:53:37 +0000 (09:53 +1100)]
godoc: restore toy selection to playground widget

Fixes #4225.

R=golang-dev
CC=golang-dev
https://golang.org/cl/6640054

12 years agodoc/godoc.js: assign tmp. id to nodes without id in generateTOC()
Shenghou Ma [Wed, 10 Oct 2012 22:24:15 +0000 (09:24 +1100)]
doc/godoc.js: assign tmp. id to nodes without id in generateTOC()

R=adg
CC=golang-dev
https://golang.org/cl/6604062

12 years agogodoc: fix site for large displays
Andrew Gerrand [Wed, 10 Oct 2012 22:18:23 +0000 (09:18 +1100)]
godoc: fix site for large displays

R=golang-dev, skybrian
CC=golang-dev
https://golang.org/cl/6643062

12 years agotest: convert tests to run.go whenever possible.
Rémy Oudompheng [Wed, 10 Oct 2012 20:35:27 +0000 (22:35 +0200)]
test: convert tests to run.go whenever possible.

The other tests either need a complex procedure
or are architecture- or OS-dependent.

Update #4139.

R=golang-dev, daniel.morsing, iant
CC=golang-dev
https://golang.org/cl/6618062

12 years agocontainer/heap: optimization in case heap has many duplicates
Taj Khattra [Wed, 10 Oct 2012 18:35:57 +0000 (11:35 -0700)]
container/heap: optimization in case heap has many duplicates

benchmark       old ns/op    new ns/op    delta
BenchmarkDup      3075682       609448  -80.18%

R=gri
CC=golang-dev
https://golang.org/cl/6613064

12 years agoC+A: added Taj Khattra (individual CLA)
Robert Griesemer [Wed, 10 Oct 2012 18:35:43 +0000 (11:35 -0700)]
C+A: added Taj Khattra (individual CLA)

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/6635061

12 years agocmd/go: don't ignore error when 'go clean'
Shenghou Ma [Wed, 10 Oct 2012 17:34:26 +0000 (01:34 +0800)]
cmd/go: don't ignore error when 'go clean'
        Fixes #4208.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6635064

12 years agoruntime/debug: fix the test
Dmitriy Vyukov [Wed, 10 Oct 2012 16:49:18 +0000 (20:49 +0400)]
runtime/debug: fix the test
If source are not available, then the stack looks like:
stack_test.go:40:  /tmp/gobuilder/linux-amd64-race-72b15c5d6f65/go/src/pkg/runtime/debug/bla-bla-bla/src/pkg/runtime/debug/stack_test.go:15 (0x43fb11)
stack_test.go:40:  /tmp/gobuilder/linux-amd64-race-72b15c5d6f65/go/src/pkg/runtime/debug/bla-bla-bla/src/pkg/runtime/debug/stack_test.go:18 (0x43fb7a)
stack_test.go:40:  /tmp/gobuilder/linux-amd64-race-72b15c5d6f65/go/src/pkg/runtime/debug/bla-bla-bla/src/pkg/runtime/debug/stack_test.go:37 (0x43fbf4)
stack_test.go:40:  /tmp/gobuilder/linux-amd64-race-72b15c5d6f65/go/src/pkg/testing/bla-bla-bla/src/pkg/testing/testing.go:301 (0x43b5ba)
stack_test.go:40:  /tmp/gobuilder/linux-amd64-race-72b15c5d6f65/go/src/pkg/runtime/bla-bla-bla/src/pkg/runtime/proc.c:276 (0x410670)
stack_test.go:40:
which is 6 lines.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6637060

12 years agocodereview.py: Fix crash on auth error handling.
Uriel Mangado [Wed, 10 Oct 2012 16:23:53 +0000 (00:23 +0800)]
codereview.py: Fix crash on auth error handling.

In recent Python versions .reason is a read-only property that simply gives you the msg value.

Fixes #4024

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6545052

12 years agocmd/gc: fix compiler crash during race instrumentation
Dmitriy Vyukov [Wed, 10 Oct 2012 14:09:23 +0000 (18:09 +0400)]
cmd/gc: fix compiler crash during race instrumentation
The compiler is crashing on the following code:

type TypeID int
func (t *TypeID) encodeType(x int) (tt TypeID, err error) {
        switch x {
        case 0:
                return t.encodeType(x * x)
        }
        return 0, nil
}
The pass marks "return struct" {tt TypeID, err error} as used,
and this causes internal check failure.
I've added the test to:
https://golang.org/cl/6525052/diff/7020/src/pkg/runtime/race/regression_test.go

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6611049

12 years agoruntime: fix race detector handling of stackalloc()
Dmitriy Vyukov [Wed, 10 Oct 2012 14:06:29 +0000 (18:06 +0400)]
runtime: fix race detector handling of stackalloc()

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6632051

12 years agospec: clarify defer semantics
Rob Pike [Wed, 10 Oct 2012 02:29:50 +0000 (13:29 +1100)]
spec: clarify defer semantics
It's already there but only in the "for instance" and so not
clear enough: deferred functions run after
the result parameters are updated.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6631058

12 years agoA+C: change Sergio Correia's email address
Andrew Gerrand [Wed, 10 Oct 2012 02:11:06 +0000 (13:11 +1100)]
A+C: change Sergio Correia's email address

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6631059

12 years agobytes: fix tests and fix build
Andrew Gerrand [Wed, 10 Oct 2012 00:59:39 +0000 (11:59 +1100)]
bytes: fix tests and fix build

R=golang-dev, edsrzf
CC=golang-dev
https://golang.org/cl/6633051

12 years agogodoc: add dropdown playground to nav bar
Andrew Gerrand [Wed, 10 Oct 2012 00:17:47 +0000 (11:17 +1100)]
godoc: add dropdown playground to nav bar

R=gri, dsymonds, skybrian
CC=golang-dev
https://golang.org/cl/6631057

12 years agobytes: make examples work in playground
Andrew Gerrand [Wed, 10 Oct 2012 00:15:41 +0000 (11:15 +1100)]
bytes: make examples work in playground

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6633050

12 years agogo/printer: idempotent comment formatting
Robert Griesemer [Wed, 10 Oct 2012 00:08:09 +0000 (17:08 -0700)]
go/printer: idempotent comment formatting

Also:

- Refactored testing framework to permit easier
idempotency testing.

- Applied gofmt -w src misc

This CL depends on CL 6639044 being applied first.

Formatting is not idempotent for all files: In those
files the comment position has changed (due to missing
precise location information) and/or the comment formatting
cannot/is not aware of independent code re-formatting.
In general it is very hard to make format idempotent when
running it in one pass only. Leaving that aside for now.

Fixes #1835.

R=r, rsc
CC=golang-dev
https://golang.org/cl/6624051

12 years agogofmt: apply gofmt -w -s src misc
Robert Griesemer [Wed, 10 Oct 2012 00:01:28 +0000 (17:01 -0700)]
gofmt: apply gofmt -w -s src misc

Preparation for forthcoming CL 6624051: Will make it
easier to see if/what changes are incurred by it.

The alignment changes in this CL are due to CL 6610051
(fix to alignment heuristic) where it appears that an
old version of gofmt was run (and thus the correct
alignment updates were not done).

R=r
CC=golang-dev
https://golang.org/cl/6639044

12 years agocmd/ld: add -B option to set build ID
Ian Lance Taylor [Tue, 9 Oct 2012 22:29:43 +0000 (15:29 -0700)]
cmd/ld: add -B option to set build ID

Background on build ID:
http://fedoraproject.org/wiki/RolandMcGrath/BuildID

R=rsc
CC=golang-dev
https://golang.org/cl/6625072

12 years agonet/http: fix name of result parameter in a comment
Brad Fitzpatrick [Tue, 9 Oct 2012 18:16:35 +0000 (11:16 -0700)]
net/http: fix name of result parameter in a comment

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6632053

12 years agomisc/cgo/test: add -ldl to LDFLAGS on Linux, ignore issue4029 on windows (fix build)
Shenghou Ma [Tue, 9 Oct 2012 17:30:34 +0000 (01:30 +0800)]
misc/cgo/test: add -ldl to LDFLAGS on Linux, ignore issue4029 on windows (fix build)

R=golang-dev
CC=golang-dev
https://golang.org/cl/6631054

12 years agocrypto/tls: fix NPN extension parsing.
Adam Langley [Tue, 9 Oct 2012 17:25:47 +0000 (13:25 -0400)]
crypto/tls: fix NPN extension parsing.

I typoed the code and tried to parse all the way to the end of the
message. Therefore it fails when NPN is not the last extension in the
ServerHello.

Fixes #4088.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6637052

12 years agoio/ioutil: fix data race on rand
Dmitriy Vyukov [Tue, 9 Oct 2012 17:08:53 +0000 (21:08 +0400)]
io/ioutil: fix data race on rand
Fixes #4212.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6641050

12 years agocmd/5l: generate FreeBSD compatible ELF
Shenghou Ma [Tue, 9 Oct 2012 17:02:49 +0000 (01:02 +0800)]
cmd/5l: generate FreeBSD compatible ELF
1. correctly initialize .plt.got entries (point to the 1st entry)
2. add section .rel.plt (FreeBSD insists PLT relocs to be there)
3. put relocs of .got.plt into .rel.plt
4. set ELFOSABI_FREEBSD in ELF header

R=rsc
CC=golang-dev
https://golang.org/cl/6643050

12 years agocmd/ld, cmd/6l, cmd/8l: sort exported dynamic symbols for Darwin
Shenghou Ma [Tue, 9 Oct 2012 16:55:48 +0000 (00:55 +0800)]
cmd/ld, cmd/6l, cmd/8l: sort exported dynamic symbols for Darwin
Also corrected cmd/8l's .dynsym handling (differentiate between exported symbols and imported symbols)

        Fixes #4029.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6620075

12 years agorace: syscall changes
Dmitriy Vyukov [Tue, 9 Oct 2012 16:51:58 +0000 (20:51 +0400)]
race: syscall changes
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
The purpose of this patch is to provide coarse-grained synchronization
between all Read() and Write() calls.

R=rsc, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/6610064

12 years agocmd/ld: use 64-bit alignment for large data and bss objects
Russ Cox [Tue, 9 Oct 2012 16:50:06 +0000 (12:50 -0400)]
cmd/ld: use 64-bit alignment for large data and bss objects

Check for specific, important misalignment in garbage collector.
Not a complete fix for issue 599 but an important workaround.

Update #599.

R=golang-dev, iant, dvyukov
CC=golang-dev
https://golang.org/cl/6641049

12 years agocmd/fix: disable reflect test under race detector (very slow)
Dmitriy Vyukov [Tue, 9 Oct 2012 16:21:39 +0000 (20:21 +0400)]
cmd/fix: disable reflect test under race detector (very slow)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6642045

12 years agocmd/go: fix handling of build tags for standard commands
Dmitriy Vyukov [Tue, 9 Oct 2012 15:54:14 +0000 (19:54 +0400)]
cmd/go: fix handling of build tags for standard commands
Otherwise if I add '+build !race' to e.g. src/cmd/fix/reflect_test.go,
it does not work.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6642044

12 years agoencoding/gob: add test case for issue 4214.
Dmitriy Vyukov [Tue, 9 Oct 2012 05:55:57 +0000 (09:55 +0400)]
encoding/gob: add test case for issue 4214.
See http://code.google.com/p/go/issues/detail?id=4214

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6619068

12 years agoencoding/gob: fix data race in Register
Rob Pike [Tue, 9 Oct 2012 00:56:38 +0000 (11:56 +1100)]
encoding/gob: fix data race in Register
Fixes #4214.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/6637047

12 years agodebug/pe: support PE files which contain no symbol table (if NumberOfSymbols is equal...
Robin Eklind [Tue, 9 Oct 2012 00:15:53 +0000 (11:15 +1100)]
debug/pe: support PE files which contain no symbol table (if NumberOfSymbols is equal to 0 in the IMAGE_FILE_HEADER structure).

No longer assume that e_lfanew (in the IMAGE_DOS_HEADER strcuture) is always one byte. It is now regarded as a 4 byte uint32.

Fixes #4177.

R=golang-dev, alex.brainman, dave, minux.ma
CC=golang-dev
https://golang.org/cl/6587048

12 years agoA+C: added Robin Eklind (individual CLA)
Robert Griesemer [Tue, 9 Oct 2012 00:14:44 +0000 (17:14 -0700)]
A+C: added Robin Eklind (individual CLA)

R=alex.brainman, r
CC=golang-dev
https://golang.org/cl/6643045

12 years agogodoc: support Playground examples on App Engine
Andrew Gerrand [Mon, 8 Oct 2012 22:57:51 +0000 (09:57 +1100)]
godoc: support Playground examples on App Engine

Updates setup-godoc-app.bash to produce a working godoc app
by substituting the go1.0.x go/... packages with those from tip.

R=gri
CC=golang-dev
https://golang.org/cl/6587080

12 years agotesting: change -test.benchtime to a flag.Duration.
David Symonds [Mon, 8 Oct 2012 21:57:29 +0000 (08:57 +1100)]
testing: change -test.benchtime to a flag.Duration.

Fixes #3902.

R=golang-dev, minux.ma, rsc, r
CC=golang-dev
https://golang.org/cl/6611059

12 years agoencoding/base{32,64}: add examples.
David Symonds [Mon, 8 Oct 2012 21:56:34 +0000 (08:56 +1100)]
encoding/base{32,64}: add examples.

Fixes #4136.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6615061

12 years agonet/url: report first error from ParseQuery.
David Symonds [Mon, 8 Oct 2012 21:10:32 +0000 (08:10 +1100)]
net/url: report first error from ParseQuery.

Fixes #4175.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6610068

12 years agotest: Make run.go's errorcheck behave like testlib.
Daniel Morsing [Mon, 8 Oct 2012 14:36:45 +0000 (16:36 +0200)]
test: Make run.go's errorcheck behave like testlib.

testlib will complain about any unmatched errors left in errorchecks while run.go will not.

Fixes #4141.

R=golang-dev, minux.ma, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/6614060

12 years agodoc: update text about hgrc and environment variables.
David Symonds [Mon, 8 Oct 2012 11:24:41 +0000 (22:24 +1100)]
doc: update text about hgrc and environment variables.

Mercurial has supported environment variables in hgrc files since
version 1.4 (released November 2009).

R=golang-dev, dave, minux.ma
CC=golang-dev
https://golang.org/cl/6619067

12 years agofix build: use temporary variable to avoid compiler error
Robert Griesemer [Mon, 8 Oct 2012 01:16:04 +0000 (18:16 -0700)]
fix build: use temporary variable to avoid compiler error

R=r
CC=golang-dev
https://golang.org/cl/6612066

12 years agoexp/types/staging: more flexible API, cleanups
Robert Griesemer [Mon, 8 Oct 2012 01:02:19 +0000 (18:02 -0700)]
exp/types/staging: more flexible API, cleanups

- Changed Check signature to take function parameters for
  more flexibility: Now a client can interrupt type checking
  early (via panic in one the upcalls) once the desired
  type information or number of errors is reached. Default
  use is still simple.

- Cleaned up main typechecking loops. Now does not neglect
  _ declarations anymore.

- Various other cleanups.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/6612049

12 years ago/exp/types/staging: expression and statement type checking
Robert Griesemer [Mon, 8 Oct 2012 01:01:43 +0000 (18:01 -0700)]
/exp/types/staging: expression and statement type checking

Still lots of pieces missing, but basic framework working.
Lots of tests.

R=rsc
CC=golang-dev
https://golang.org/cl/6594054

12 years agoexp/types/staging: test drivers
Robert Griesemer [Mon, 8 Oct 2012 01:00:56 +0000 (18:00 -0700)]
exp/types/staging: test drivers

This code has been reviewed before. The most significant
change is to check_test which now can handle more than
one error at the same error position (due to spurious
errors - should not happen in praxis once error handling
has been fine-tuned). This change makes check_test easier
to use during development.

R=rsc
CC=golang-dev
https://golang.org/cl/6584057

12 years agoexp/locale/collate: use gofmt -w -s (rather than just gofmt -w)
Robert Griesemer [Mon, 8 Oct 2012 00:59:33 +0000 (17:59 -0700)]
exp/locale/collate: use gofmt -w -s (rather than just gofmt -w)

Also: apply gofmt -w -s to existing tables.

R=mpvl, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6611051

12 years agogo/parser: fix object kind
Robert Griesemer [Mon, 8 Oct 2012 00:58:13 +0000 (17:58 -0700)]
go/parser: fix object kind

Bug introduced with CL 6624047.

R=r
CC=golang-dev
https://golang.org/cl/6620073

12 years agogophertool: make work with latest Chrome extension security restrictions
Brad Fitzpatrick [Mon, 8 Oct 2012 00:56:10 +0000 (17:56 -0700)]
gophertool: make work with latest Chrome extension security restrictions

No JavaScript in HTML anymore.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6619066

12 years agogodoc: fetch jQuery via https
Andrew Gerrand [Sun, 7 Oct 2012 23:40:56 +0000 (10:40 +1100)]
godoc: fetch jQuery via https

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6614064

12 years agocmd/5g: avoid temporaries during gcmp(reg, constant)
Dave Cheney [Sun, 7 Oct 2012 22:51:04 +0000 (09:51 +1100)]
cmd/5g: avoid temporaries during gcmp(reg, constant)

Address several instances of unneeded temporaries when using gcmp.

func M(m map[int]bool) int {
        return len(m)
}

--- prog list "M" ---
0000 (/home/dfc/src/map.go:3) TEXT      M+0(SB),$0-8
0001 (/home/dfc/src/map.go:4) MOVW      m+0(FP),R0
0002 (/home/dfc/src/map.go:4) MOVW      $0,R1
0003 (/home/dfc/src/map.go:4) CMP       R1,R0,
0004 (/home/dfc/src/map.go:4) BEQ       ,6(APC)
0005 (/home/dfc/src/map.go:4) MOVW      0(R0),R0
0006 (/home/dfc/src/map.go:4) MOVW      R0,.noname+4(FP)
0007 (/home/dfc/src/map.go:4) RET       ,

after:

--- prog list "M" ---
0000 (/home/dfc/src/map.go:3) TEXT      M+0(SB),$0-8
0001 (/home/dfc/src/map.go:4) MOVW      m+0(FP),R0
0002 (/home/dfc/src/map.go:4) CMP       $0,R0,
0003 (/home/dfc/src/map.go:4) BEQ       ,5(APC)
0004 (/home/dfc/src/map.go:4) MOVW      0(R0),R0
0005 (/home/dfc/src/map.go:4) MOVW      R0,.noname+4(FP)
0006 (/home/dfc/src/map.go:4) RET       ,

func C(c chan int) int {
        return cap(c)
}

--- prog list "C" ---
0000 (/home/dfc/src/map.go:3) TEXT      C+0(SB),$0-8
0001 (/home/dfc/src/map.go:4) MOVW      c+0(FP),R0
0002 (/home/dfc/src/map.go:4) MOVW      $0,R1
0003 (/home/dfc/src/map.go:4) CMP       R1,R0,
0004 (/home/dfc/src/map.go:4) BEQ       ,6(APC)
0005 (/home/dfc/src/map.go:4) MOVW      4(R0),R0
0006 (/home/dfc/src/map.go:4) MOVW      R0,.noname+4(FP)
0007 (/home/dfc/src/map.go:4) RET       ,

after:

--- prog list "C" ---
0000 (/home/dfc/src/map.go:3) TEXT      C+0(SB),$0-8
0001 (/home/dfc/src/map.go:4) MOVW      c+0(FP),R0
0002 (/home/dfc/src/map.go:4) CMP       $0,R0,
0003 (/home/dfc/src/map.go:4) BEQ       ,5(APC)
0004 (/home/dfc/src/map.go:4) MOVW      4(R0),R0
0005 (/home/dfc/src/map.go:4) MOVW      R0,.noname+4(FP)
0006 (/home/dfc/src/map.go:4) RET       ,

R=rsc, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/6618054

12 years agotest: convert more tests to rundir/compiledir conventions
Rémy Oudompheng [Sun, 7 Oct 2012 21:22:01 +0000 (23:22 +0200)]
test: convert more tests to rundir/compiledir conventions

Update #4139.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6609051

12 years agotest/testlib: don't forget stderr for rundircmpout.
Rémy Oudompheng [Sun, 7 Oct 2012 21:14:20 +0000 (23:14 +0200)]
test/testlib: don't forget stderr for rundircmpout.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6620071

12 years agocmd/8a: add SSE2 instructions
Russ Cox [Sun, 7 Oct 2012 20:36:29 +0000 (16:36 -0400)]
cmd/8a: add SSE2 instructions

R=ken
CC=golang-dev
https://golang.org/cl/6614063

12 years agocmd/8l: add SSE2 instructions
Russ Cox [Sun, 7 Oct 2012 20:36:14 +0000 (16:36 -0400)]
cmd/8l: add SSE2 instructions

R=ken
CC=golang-dev
https://golang.org/cl/6610065

12 years agocmd/gc: skip over reported BOMs
Russ Cox [Sun, 7 Oct 2012 20:35:45 +0000 (16:35 -0400)]
cmd/gc: skip over reported BOMs

This keeps the BOM runes from causing other errors.

R=golang-dev, remyoudompheng
CC=golang-dev
https://golang.org/cl/6625062

12 years agocmd/ld, cmd/5l: support R_ARM_PC24 and R_ARM_JUMP24, fix R_ARM_CALL
Shenghou Ma [Sun, 7 Oct 2012 20:20:17 +0000 (04:20 +0800)]
cmd/ld, cmd/5l: support R_ARM_PC24 and R_ARM_JUMP24, fix R_ARM_CALL

1. R_ARM_CALL can also be used to call a PLT entry
2. add support for R_ARM_PC24 and R_ARM_JUMP24
3. refactor, remove D_PLT32 in favor of D_CALL

Fixes #4006.

R=rsc, dave
CC=fullung, golang-dev
https://golang.org/cl/6622057

12 years agocodereview: more mercurial interface fixes
Shenghou Ma [Sun, 7 Oct 2012 20:19:36 +0000 (04:19 +0800)]
codereview: more mercurial interface fixes
        Fixes #4131.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6614061

12 years agotest: correct type in declbad.go
Rémy Oudompheng [Sun, 7 Oct 2012 19:52:57 +0000 (21:52 +0200)]
test: correct type in declbad.go

The test is not about type mismatches and it causes
an extra error to appear.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6614062

12 years agotest/bench/shootout: match gcc architecture to GOARCH
Russ Cox [Sun, 7 Oct 2012 19:49:56 +0000 (15:49 -0400)]
test/bench/shootout: match gcc architecture to GOARCH

If we're benchmarking 8g, use gcc -m32.
If we're benchmarking 6g, use gcc -m64.

R=golang-dev, bradfitz, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/6625061

12 years agocmd/gc: more graceful handling of invalid fields in widstruct.
Rémy Oudompheng [Sun, 7 Oct 2012 19:46:10 +0000 (21:46 +0200)]
cmd/gc: more graceful handling of invalid fields in widstruct.

The protection against segfaults does not completely solve
crashes and breaks test/fixedbugs/bug365.go

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6615058

12 years agocmd/gc: avoid crash in %N print
Russ Cox [Sun, 7 Oct 2012 19:35:01 +0000 (15:35 -0400)]
cmd/gc: avoid crash in %N print

R=ken2
CC=golang-dev
https://golang.org/cl/6609052

12 years agoio/ioutil: fix data race under the race detector
Dmitriy Vyukov [Sun, 7 Oct 2012 18:08:06 +0000 (22:08 +0400)]
io/ioutil: fix data race under the race detector
See issue 3970 (it's already marked as Fixed).

R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6624059

12 years agorace: sync/atomic changes
Dmitriy Vyukov [Sun, 7 Oct 2012 18:07:32 +0000 (22:07 +0400)]
race: sync/atomic changes
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044

R=rsc, remyoudompheng
CC=gobot, golang-dev
https://golang.org/cl/6536059

12 years agorace: sync changes
Dmitriy Vyukov [Sun, 7 Oct 2012 18:07:03 +0000 (22:07 +0400)]
race: sync changes
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044

R=rsc, minux.ma
CC=gobot, golang-dev
https://golang.org/cl/6529053

12 years agorace: runtime changes
Dmitriy Vyukov [Sun, 7 Oct 2012 18:05:32 +0000 (22:05 +0400)]
race: runtime changes
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044

R=rsc
CC=gobot, golang-dev
https://golang.org/cl/6535050

12 years agoruntime: disable TestParForParallel for now on 32-bit hosts
Shenghou Ma [Sun, 7 Oct 2012 17:56:27 +0000 (01:56 +0800)]
runtime: disable TestParForParallel for now on 32-bit hosts
Also add call to GC() to make it easier to re-enable the test.

Update #4155.
When we have precise GC merged, re-enable this test.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6622058

12 years agotest/run.go: use correct executable filename on Windows, fix build
Shenghou Ma [Sun, 7 Oct 2012 17:54:56 +0000 (01:54 +0800)]
test/run.go: use correct executable filename on Windows, fix build

R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/6624060

12 years agoos: make TestMkdirAllWithSymlink more robust
Brad Fitzpatrick [Sun, 7 Oct 2012 17:31:56 +0000 (10:31 -0700)]
os: make TestMkdirAllWithSymlink more robust

Don't assume the test has a clean environment within /tmp.
Use an actual new tempdir for its tests.

Fixes FreeBSD build failure as seen at:
http://build.golang.org/log/396738676356d7fb6bab6eaf1b97cac820f8a90f

--- FAIL: TestMkdirAllWithSymlink (0.00 seconds)
path_test.go:178:                 Mkdir /tmp/dir: mkdir /tmp/dir: file exists
FAIL
FAIL    os      1.091s

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6615057

12 years agonet/http/httptest: mimic the normal HTTP server's ResponseWriter more closely
Brad Fitzpatrick [Sun, 7 Oct 2012 16:48:14 +0000 (09:48 -0700)]
net/http/httptest: mimic the normal HTTP server's ResponseWriter more closely

Also adds tests, which didn't exist before.

Fixes #4188

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6613062

12 years agotest: use rundir and errorcheckdir for a few more tests.
Rémy Oudompheng [Sun, 7 Oct 2012 16:37:05 +0000 (18:37 +0200)]
test: use rundir and errorcheckdir for a few more tests.

Update #4139.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6620070

12 years agotesting: fix extra tabs when t.Log("string")
Shenghou Ma [Sun, 7 Oct 2012 16:21:53 +0000 (00:21 +0800)]
testing: fix extra tabs when t.Log("string")

t.Log("line 1\nline 2\nline 3")

Old output:
=== RUN TestLine3
--- PASS: TestLine3 (0.00 seconds)
testing_test.go:25:  line 1
line 2
line 3
PASS

New output:
=== RUN TestLine3
--- PASS: TestLine3 (0.00 seconds)
testing_test.go:24:  line 1
line 2
line 3
PASS

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6613069

12 years agosyscall: fix Statfs and Fstatfs on Linux/ARM
Shenghou Ma [Sun, 7 Oct 2012 16:13:28 +0000 (00:13 +0800)]
syscall: fix Statfs and Fstatfs on Linux/ARM

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6615055

12 years agocmd/gc: replace "typechecking loop" by nicer errors in some cases.
Rémy Oudompheng [Sun, 7 Oct 2012 15:35:21 +0000 (17:35 +0200)]
cmd/gc: replace "typechecking loop" by nicer errors in some cases.

For issue 3757:
BEFORE:  test/fixedbugs/bug463.go:12: typechecking loop involving a
             test/fixedbugs/bug463.go:12 a
             test/fixedbugs/bug463.go:12 <node DCLCONST>
AFTER:   test/fixedbugs/bug463.go:12: constant definition loop
             test/fixedbugs/bug463.go:12: a uses a

For issue 3937:
BEFORE: test/fixedbugs/bug464.go:12: typechecking loop involving foo
            test/fixedbugs/bug464.go:12 <T>
            test/fixedbugs/bug464.go:12 foo
            test/fixedbugs/bug464.go:12 <node DCLFUNC>
AFTER:  test/fixedbugs/bug464.go:12: foo is not a type

Fixes #3757.
Fixes #3937.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6614058

12 years agocmd/gc: Don't accept qualified names as literal keys
Daniel Morsing [Sun, 7 Oct 2012 14:47:53 +0000 (16:47 +0200)]
cmd/gc: Don't accept qualified names as literal keys

Fixes #4067.

R=golang-dev, minux.ma, dave, rsc
CC=golang-dev
https://golang.org/cl/6622056

12 years agoimage/jpeg: move the huffman bit decoder state higher up in the
Nigel Tao [Sun, 7 Oct 2012 08:32:28 +0000 (19:32 +1100)]
image/jpeg: move the huffman bit decoder state higher up in the
decoder struct, inside the unmappedzero limit, to eliminate some
TESTB instructions in the inner decoding loop.

benchmark          old ns/op    new ns/op    delta
BenchmarkDecode      2943204      2746360   -6.69%

R=r, dave
CC=golang-dev
https://golang.org/cl/6625058

12 years agocmd/gc: fix output filename generation on Windows
Shenghou Ma [Sun, 7 Oct 2012 06:14:46 +0000 (14:14 +0800)]
cmd/gc: fix output filename generation on Windows

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6610060

12 years agocmd/gc: don't dereference a nil Type pointer in widstruct
Akshat Kumar [Sun, 7 Oct 2012 06:11:59 +0000 (14:11 +0800)]
cmd/gc: don't dereference a nil Type pointer in widstruct

The nil dereference in the next few lines doesn't seem
to cause a segmentation fault on Unix, but does seem
to halt the Go compiler.

The following is a test case:

>>>
package main

func mine(int b) int {
        return b + 2
}

func main() {
        mine()

        c = mine()
}
<<<

Without this change only the following is caught:

typecheck.go:3: undefined: b
typecheck.go:4: undefined: b

with it, we catch all the errors:

typecheck.go:3: undefined: b
typecheck.go:4: undefined: b
typecheck.go:10: undefined: c
typecheck.go:10: cannot assign to c .

R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6542060

12 years agocmd/gc: Don't export embedded builtins
Daniel Morsing [Sun, 7 Oct 2012 04:53:57 +0000 (06:53 +0200)]
cmd/gc: Don't export embedded builtins

Fixes #4124.

R=golang-dev, dave, minux.ma, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/6543057

12 years agocmd/5g: avoid temporary in slice bounds check
Dave Cheney [Sun, 7 Oct 2012 00:37:14 +0000 (11:37 +1100)]
cmd/5g: avoid temporary in slice bounds check

before

func addr(s[]int) *int {
        return &s[2]
   10c1c:       e28d0008        add     r0, sp, #8
   10c20:       e5901004        ldr     r1, [r0, #4]
   10c24:       e3a02002        mov     r2, #2
   10c28:       e1510002        cmp     r1, r2
   10c2c:       8a000000        bhi     10c34 <main.addr+0x34>
   10c30:       eb0035e6        bl      1e3d0 <runtime.panicindex>
   10c34:       e5900000        ldr     r0, [r0]
   10c38:       e2800008        add     r0, r0, #8
   10c3c:       e58d0014        str     r0, [sp, #20]
   10c40:       e49df004        pop     {pc}            ; (ldr pc, [sp], #4)

after

func addr(s[]int) *int {
return &s[2]
   10c1c:       e28d0008        add     r0, sp, #8
   10c20:       e5901004        ldr     r1, [r0, #4]
   10c24:       e3510002        cmp     r1, #2
   10c28:       8a000000        bhi     10c30 <main.addr+0x30>
   10c2c:       eb0035e6        bl      1e3cc <runtime.panicindex>
   10c30:       e5900000        ldr     r0, [r0]
   10c34:       e2800008        add     r0, r0, #8
   10c38:       e58d0014        str     r0, [sp, #20]
   10c3c:       e49df004        pop     {pc}            ; (ldr pc, [sp], #4)

Also, relax gcmp restriction that 2nd operand must be a register. A followup
CL will address the remaining TODO items.

R=rsc, remyoudompheng, minux.ma
CC=golang-dev
https://golang.org/cl/6620064

12 years agoimage/jpeg: move the level-shift and clip out of the idct function,
Nigel Tao [Sun, 7 Oct 2012 00:32:02 +0000 (11:32 +1100)]
image/jpeg: move the level-shift and clip out of the idct function,
to be consistent with the fdct function, and to ease any future
idct rewrites in assembly.

The BenchmarkIDCT delta is obviously just an accounting change and not
a real saving, but it does give an indication of what proportion of
time was spent in the actual IDCT and what proportion was in shift and
clip. The idct time taken is now comparable to fdct.

The BenchmarkFDCT delta is an estimate of benchmark noise.

benchmark                   old ns/op    new ns/op    delta
BenchmarkFDCT                    3842         3837   -0.13%
BenchmarkIDCT                    5611         3478  -38.01%
BenchmarkDecodeRGBOpaque      2932785      2929751   -0.10%

R=r
CC=golang-dev
https://golang.org/cl/6625057

12 years agoimage/jpeg: clean up BenchmarkDecode and BenchmarkEncode to not
Nigel Tao [Sun, 7 Oct 2012 00:30:47 +0000 (11:30 +1100)]
image/jpeg: clean up BenchmarkDecode and BenchmarkEncode to not
refer to opacity. Those references were copy/pasted from the
image/png encoding benchmarks, which cares whether or not the
source image is opaque, but the JPEG encoder does not care.

R=r
CC=golang-dev
https://golang.org/cl/6623052

12 years agodoc/debugging_with_gdb: fix minor typo (space before comma)
Robert Hencke [Sun, 7 Oct 2012 00:24:14 +0000 (11:24 +1100)]
doc/debugging_with_gdb: fix minor typo (space before comma)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6610061

12 years agoimage/jpeg: add DCT tests, do a small optimization (common sub-expression
Nigel Tao [Sat, 6 Oct 2012 23:21:17 +0000 (10:21 +1100)]
image/jpeg: add DCT tests, do a small optimization (common sub-expression
elimination) in idct.go.

benchmark                   old ns/op    new ns/op    delta
BenchmarkIDCT                    5649         5610   -0.69%
BenchmarkDecodeRGBOpaque      2948607      2941051   -0.26%

The "type block" declaration moved so that idct.go is compilable
as a stand-alone file: "go tool 6g -S idct.go" works.

R=r
CC=golang-dev
https://golang.org/cl/6619056

12 years agocmd/gc: avoid clobbering the AST in cgen_callmeth.
Rémy Oudompheng [Sat, 6 Oct 2012 22:52:40 +0000 (00:52 +0200)]
cmd/gc: avoid clobbering the AST in cgen_callmeth.

It confused the detection of init loops when involving
method calls.

Fixes #3890.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6620067

12 years agocmd/6g: fix out of registers when chaining integer divisions.
Rémy Oudompheng [Sat, 6 Oct 2012 22:30:29 +0000 (00:30 +0200)]
cmd/6g: fix out of registers when chaining integer divisions.

Fixes #4201.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/6622055

12 years agocmd/gc: make rnd() more 64-bit-friendly.
Rémy Oudompheng [Sat, 6 Oct 2012 22:29:55 +0000 (00:29 +0200)]
cmd/gc: make rnd() more 64-bit-friendly.

Fixes #4200.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6619057

12 years agotext/template: fix nil crash on Templates
Rob Pike [Sat, 6 Oct 2012 22:26:59 +0000 (09:26 +1100)]
text/template: fix nil crash on Templates
Fixes #3872.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6612060

12 years agotext/template: add an unexported method to Node
Rob Pike [Sat, 6 Oct 2012 20:15:11 +0000 (07:15 +1100)]
text/template: add an unexported method to Node
Protects the package a little against undesirable clients.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6624054

12 years agocmd/5g: avoid temporary during constant asop
Dave Cheney [Sat, 6 Oct 2012 11:01:49 +0000 (21:01 +1000)]
cmd/5g: avoid temporary during constant asop

func add() int {
        var a int
        a += 10
        a += 20
        a += 30
        a -= 10
        a -= 20
        a -= 30
        return a
}

before

--- prog list "add" ---
0000 (/home/dfc/src/add.go:5) TEXT      add+0(SB),$0-4
0001 (/home/dfc/src/add.go:6) MOVW      $0,R2
0002 (/home/dfc/src/add.go:7) MOVW      $10,R0
0003 (/home/dfc/src/add.go:7) ADD       R0,R2,R1
0004 (/home/dfc/src/add.go:8) MOVW      $20,R0
0005 (/home/dfc/src/add.go:8) ADD       R0,R1
0006 (/home/dfc/src/add.go:9) MOVW      $30,R0
0007 (/home/dfc/src/add.go:9) ADD       R0,R1
0008 (/home/dfc/src/add.go:10) MOVW     $10,R0
0009 (/home/dfc/src/add.go:10) SUB      R0,R1
0010 (/home/dfc/src/add.go:11) MOVW     $20,R0
0011 (/home/dfc/src/add.go:11) SUB      R0,R1
0012 (/home/dfc/src/add.go:12) MOVW     $30,R0
0013 (/home/dfc/src/add.go:12) SUB      R0,R1,R2
0014 (/home/dfc/src/add.go:12) MOVW     R2,R0
0015 (/home/dfc/src/add.go:13) MOVW     R2,R1
0016 (/home/dfc/src/add.go:13) MOVW     R2,.noname+0(FP)
0017 (/home/dfc/src/add.go:13) RET      ,

after

--- prog list "add" ---
0000 (/home/dfc/src/add.go:5) TEXT      add+0(SB),$0-4
0001 (/home/dfc/src/add.go:6) MOVW      $0,R0
0002 (/home/dfc/src/add.go:7) ADD       $10,R0
0003 (/home/dfc/src/add.go:8) ADD       $20,R0
0004 (/home/dfc/src/add.go:9) ADD       $30,R0
0005 (/home/dfc/src/add.go:10) SUB      $10,R0
0006 (/home/dfc/src/add.go:11) SUB      $20,R0
0007 (/home/dfc/src/add.go:12) SUB      $30,R0,R2
0008 (/home/dfc/src/add.go:13) MOVW     R2,R0
0009 (/home/dfc/src/add.go:13) MOVW     R2,.noname+0(FP)
0010 (/home/dfc/src/add.go:13) RET      ,

R=rsc, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/6584056

12 years agoruntime: fix a panic when growing zero-width-element slices.
Rémy Oudompheng [Sat, 6 Oct 2012 10:05:52 +0000 (12:05 +0200)]
runtime: fix a panic when growing zero-width-element slices.

Fixes #4197.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6611056

12 years agopprof: add goroutine blocking profiling
Dmitriy Vyukov [Sat, 6 Oct 2012 08:56:04 +0000 (12:56 +0400)]
pprof: add goroutine blocking profiling
The profiler collects goroutine blocking information similar to Google Perf Tools.
You may see an example of the profile (converted to svg) attached to
http://code.google.com/p/go/issues/detail?id=3946
The public API changes are:
+pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
+pkg runtime, func SetBlockProfileRate(int)
+pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
+pkg runtime, type BlockProfileRecord struct
+pkg runtime, type BlockProfileRecord struct, Count int64
+pkg runtime, type BlockProfileRecord struct, Cycles int64
+pkg runtime, type BlockProfileRecord struct, embedded StackRecord

R=rsc, dave, minux.ma, r
CC=gobot, golang-dev, r, remyoudompheng
https://golang.org/cl/6443115

12 years agotest: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go
Daniel Morsing [Sat, 6 Oct 2012 07:23:31 +0000 (09:23 +0200)]
test: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go

rundir will compile each file in the directory in lexicographic order, link the last file as the main package and run the resulting program. rundircmpout is an related command, that will compare the output of the program to an corresponding .out file

errorcheckdir will compile each file in a directory in lexicographic order, running errorcheck on each file as it compiles. All compilations are assumed to be successful except for the last file. However, If a -0 flag is present on the command, the last compilation will also be assumed successful

This CL also includes a small refactoring of run.go. It was getting unwieldy and the meaning of the run commands was hidden behind argument line formatting.

Fixes #4058.

R=rsc, minux.ma, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/6554071

12 years agocmd/cc: map C int to int32 in Go defs
Jan Ziak [Sat, 6 Oct 2012 05:56:12 +0000 (13:56 +0800)]
cmd/cc: map C int to int32 in Go defs

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6621052

12 years agocmd/5g: avoid temporary during constant OINDEX
Dave Cheney [Sat, 6 Oct 2012 01:51:06 +0000 (11:51 +1000)]
cmd/5g: avoid temporary during constant OINDEX

func addr(s[]int) *int {
return &s[2]
}

--- prog list "addr" ---
0000 (/home/dfc/src/addr.go:5) TEXT     addr+0(SB),$0-16
0001 (/home/dfc/src/addr.go:6) MOVW     $s+0(FP),R0
0002 (/home/dfc/src/addr.go:6) MOVW     4(R0),R1
0003 (/home/dfc/src/addr.go:6) MOVW     $2,R2
0004 (/home/dfc/src/addr.go:6) CMP      R2,R1,
0005 (/home/dfc/src/addr.go:6) BHI      ,7(APC)
0006 (/home/dfc/src/addr.go:6) BL       ,runtime.panicindex+0(SB)
0007 (/home/dfc/src/addr.go:6) MOVW     0(R0),R0
0008 (/home/dfc/src/addr.go:6) MOVW     $8,R1
0009 (/home/dfc/src/addr.go:6) ADD      R1,R0
0010 (/home/dfc/src/addr.go:6) MOVW     R0,.noname+12(FP)
0011 (/home/dfc/src/addr.go:6) RET      ,

becomes

--- prog list "addr" ---
0000 (/home/dfc/src/addr.go:5) TEXT     addr+0(SB),$0-16
0001 (/home/dfc/src/addr.go:6) MOVW     $s+0(FP),R0
0002 (/home/dfc/src/addr.go:6) MOVW     4(R0),R1
0003 (/home/dfc/src/addr.go:6) MOVW     $2,R2
0004 (/home/dfc/src/addr.go:6) CMP      R2,R1,
0005 (/home/dfc/src/addr.go:6) BHI      ,7(APC)
0006 (/home/dfc/src/addr.go:6) BL       ,runtime.panicindex+0(SB)
0007 (/home/dfc/src/addr.go:6) MOVW     0(R0),R0
0008 (/home/dfc/src/addr.go:6) ADD      $8,R0
0009 (/home/dfc/src/addr.go:6) MOVW     R0,.noname+12(FP)
0010 (/home/dfc/src/addr.go:6) RET      ,

R=rsc, remyoudompheng, minux.ma
CC=golang-dev
https://golang.org/cl/6590056

12 years agocmd/5g: fix out of registers in nested calls, add compiler torture test.
Rémy Oudompheng [Fri, 5 Oct 2012 21:30:49 +0000 (23:30 +0200)]
cmd/5g: fix out of registers in nested calls, add compiler torture test.

R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev, remy
https://golang.org/cl/6586072