1
0
mirror of https://github.com/golang/go synced 2024-09-24 09:30:13 -06:00
Commit Graph

1513 Commits

Author SHA1 Message Date
Dmitriy Vyukov
77e1227a02 test/bench/garbage: fix parser benchmark
+add standard bench output to tree2
+print GOMAXPROCS as go test does

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5992044
2012-04-05 20:35:54 +04:00
Ryan Hitchman
8a686792e0 gc: improve error message for composite literals with unexpected newlines
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5857045
2012-04-02 11:00:55 -04:00
Ian Lance Taylor
373f1a95b0 test: add some tests of valid code that failed with gccgo
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5971044
2012-03-30 08:42:21 -07:00
Russ Cox
5eb007dede runtime: work around false negative in deadlock detection
Not a complete fix for issue 3342, but fixes the trivial case.
There may still be a race in the instants before and after
a scavenger-induced garbage collection.

Intended to be "obviously safe": a call to runtime·gosched
before main.main is no different than a call to runtime.Gosched
at the beginning of main.main, and it is (or had better be)
safe to call runtime.Gosched at any point during main.

Update #3342.

R=iant
CC=golang-dev
https://golang.org/cl/5919052
2012-03-27 12:22:19 -04:00
Mikio Hara
4c2614c57c undo CL 5844051 / 5d0322034aa8
Breaks closure test when GOMAXPROCS=2 or more.

««« original CL description
runtime: restore deadlock detection in the simplest case.

Fixes #3342.

R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051

»»»

R=rsc
CC=golang-dev
https://golang.org/cl/5924045
2012-03-27 13:05:17 +09:00
Rémy Oudompheng
84bb2547fb runtime: restore deadlock detection in the simplest case.
Fixes #3342.

R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051
2012-03-26 23:06:20 -04:00
Ian Lance Taylor
d12f1ff7ad test: fix run.bash by spelling out the commands to use for bug424.go
R=golang-dev, gri, iant
CC=golang-dev
https://golang.org/cl/5882046
2012-03-22 12:48:41 -07:00
Ian Lance Taylor
47b6197a01 cmd/gc: when expanding append inline, preserve arguments
Fixes #3369.

R=golang-dev, gri, lvd, r
CC=golang-dev
https://golang.org/cl/5876044
2012-03-22 09:44:31 -07:00
Shenghou Ma
e2662835b8 test: use testlib in a few more cases
Introduce a new skip cmd.

R=golang-dev, bradfitz, iant, iant
CC=golang-dev
https://golang.org/cl/5868048
2012-03-22 02:14:44 +08:00
Anthony Martin
e1f22bdcc5 gc: fix struct and array comparisons for new bool rules
The two optimizations for small structs and arrays
were missing the implicit cast from ideal bool.

Fixes #3351.

R=rsc, lvd
CC=golang-dev
https://golang.org/cl/5848062
2012-03-19 15:57:28 -07:00
Russ Cox
c978a5a3a9 test: skip . files in directory
Xcode generates ._foo.go files.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5786055
2012-03-08 14:03:40 -05:00
Russ Cox
d4fb568e04 cmd/gc: implement len(array) / cap(array) rule
The spec is looser than the current implementation.
The spec edit was made in CL 4444050 (May 2011)
but I never implemented it.

Fixes #3244.

R=ken2
CC=golang-dev
https://golang.org/cl/5785049
2012-03-07 22:43:28 -05:00
Shenghou Ma
90010f8f63 build: re-enable some broken tests in run.bash
Updates #2982.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5759064
2012-03-08 06:23:56 +08:00
Ian Lance Taylor
b514f0b906 test: enable method expression tests in ddd.go
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5769044
2012-03-07 11:17:26 -08:00
Ian Lance Taylor
72faa0303e test: fix testlib to not pass an empty argument to 6g
This change is necessary to make the run shell script work
again, but it is not sufficient as bug424.go's execution line
does not name the package that it imports.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5771043
2012-03-07 11:16:58 -08:00
Ian Lance Taylor
e54ad64ff3 test: add inherited interface test to ddd.go
The gccgo compiler incorrectly gave an error for this code.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5767043
2012-03-07 08:24:10 -08:00
Russ Cox
08854b022f test: fix typo
R=ken2
CC=golang-dev
https://golang.org/cl/5752073
2012-03-07 10:21:56 -05:00
Russ Cox
4267974c0b cmd/gc: unnamed struct types can have methods
Fixes #3143.

R=ken2
CC=golang-dev
https://golang.org/cl/5752070
2012-03-07 02:27:15 -05:00
Russ Cox
712473612f test/run: fix builders
Let the outer environment filter down to the commands being run.

TBR=r
CC=golang-dev
https://golang.org/cl/5758066
2012-03-07 02:22:08 -05:00
Russ Cox
987a580b9f cmd/gc: do not confuse unexported methods of same name
Fixes #3146.

R=ken2
CC=golang-dev
https://golang.org/cl/5756074
2012-03-07 01:55:17 -05:00
Russ Cox
105c5fa666 test: invoke go command in run.go
Lets us run multifile tests and tests with arguments.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5753068
2012-03-07 01:54:39 -05:00
Shenghou Ma
47ee98253e test/run: use all available cores on ARM system
R=rsc
CC=golang-dev
https://golang.org/cl/5753054
2012-03-07 12:43:25 +08:00
Rob Pike
905cb4881b all: remove some references to Make.inc etc.
There are a few more but these are the easiest ones.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5756067
2012-03-07 13:51:49 +11:00
Russ Cox
5e41fe0e45 build: use run.go for running tests
Also, tweak run.go to use no more than 2x the
number of CPUs, and only one on ARM.

53.85u 13.33s 53.69r 	 ./run
50.68u 12.13s 18.85r 	 go run run.go

Fixes #2833.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754047
2012-03-05 22:47:23 -05:00
Ian Lance Taylor
06b7024462 test: match gccgo error messages for bug388.go
As runtime.UintType is no longer defined, the gccgo error
messages have changed.

bug388.go:12:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:12:10: error: invalid named/anonymous mix
bug388.go:13:21: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:17:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:18:18: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:22:9: error: non-name on left side of ‘:=’
bug388.go:27:10: error: expected type
bug388.go:32:9: error: expected type
bug388.go:23:14: error: reference to field ‘i’ in object which has no fields or methods

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5755044
2012-03-05 16:21:46 -08:00
Russ Cox
6e3a7930eb cmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files
GOROOT_FINAL is a build parameter that means "eventually
the Go tree will be installed here".  Make the file name information
match that eventual location.

Fixes #3180.

R=ken, ken
CC=golang-dev
https://golang.org/cl/5742043
2012-03-05 16:13:33 -05:00
Shenghou Ma
eb5af840d5 test/run.go: fix build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5727068
2012-03-06 03:34:53 +08:00
Russ Cox
cae604f734 cmd/gc: must not inline panic, recover
R=lvd, gri
CC=golang-dev
https://golang.org/cl/5731061
2012-03-05 13:51:44 -05:00
Ian Lance Taylor
b14a6643dc test: add test of calling recover in a varargs function
gccgo did not handle this correctly.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5714050
2012-03-01 08:24:03 -08:00
Ian Lance Taylor
532c1b451b test: add bug426.go: a gccgo crash on valid code
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5715044
2012-02-29 21:51:21 -08:00
Ian Lance Taylor
f0886ab7e2 test: add a couple of cases to const1.go that crashed gccgo
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5713045
2012-02-29 17:39:02 -08:00
Anthony Martin
564a1f3358 gc: fix string comparisons for new bool rules
The two string comparison optimizations were
missing the implicit cast from ideal bool.

Fixes #3119.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5696071
2012-02-29 13:55:50 -08:00
Russ Cox
d0d251f858 gc: disallow absolute import paths
They are broken and hard to make work.

They have never worked: if you import "/tmp/x"
from "/home/rsc/p.c" then the compiler rewrites
this into import "/home/rsc/tmp/x", which is
clearly wrong.

Also we just disallowed the : character in import
paths, so import "c:/foo" is already not allowed.

Finally, in order to support absolute paths well in
a build tool we'd have to provide a mechanism to
instruct the compiler to resolve absolute imports
by looking in some other tree (where the binaries live)
and provide a mapping from absolute path to location
in that tree.  This CL avoids adding that complexity.

This is not part of the language spec (and should not be),
so no spec change is needed.

If we need to make them work later, we can.

R=ken2
CC=golang-dev
https://golang.org/cl/5712043
2012-02-29 15:28:36 -05:00
Robert Griesemer
69015b6fc4 test: bug424: wrong embedded method called
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5695083
2012-02-27 18:52:40 -08:00
Rob Pike
e303eeb75b go/test/chan1.go: fix typo
Found by Lucio De Re

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5694071
2012-02-25 08:47:04 +11:00
Anthony Martin
dc38756ce1 gc: reject import paths containing special characters
Also allow multiple invalid import statements in a
single file.

Fixes #3021. The changes to go/parser and the
language specifcation have already been committed.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5672084
2012-02-24 14:48:36 -05:00
Rob Pike
832dcecc99 test/bench/shootout: update post-Makefile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5696054
2012-02-24 16:59:09 +11:00
Rob Pike
eb37b5b744 test: document ken/*.go
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694065
2012-02-24 16:24:24 +11:00
Russ Cox
075eef4018 gc: fix escape analysis + inlining + closure bug
R=ken2
CC=golang-dev, lvd
https://golang.org/cl/5693056
2012-02-23 23:09:53 -05:00
Rob Pike
d45ee4cb5f test: fix the fix of the rename tests.
Now they actually test again instead of just setting iota to zero.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5700058
2012-02-24 15:06:32 +11:00
Brad Fitzpatrick
e014cf0e54 test: add cmpout to testlib
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5699060
2012-02-24 13:17:26 +11:00
Brad Fitzpatrick
a55a5c8df3 test: add temporary show_skips flag.
To find test files with legacy headers.

We can remove this flag once everything is converted.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5694060
2012-02-24 12:52:15 +11:00
Rob Pike
80a9783f84 test/[n-z]*.go: add documentation
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5700056
2012-02-24 11:48:19 +11:00
Rob Pike
19bab1dc78 test/[n-r]*.go: add documentation
The rename ones needed redoing.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5698054
2012-02-24 10:30:39 +11:00
Rob Pike
501f0b578f test: commentary for [h-m]*.go
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5674112
2012-02-23 18:47:26 +11:00
Russ Cox
e29d3dfc49 gc: new, less strict bool rules
R=ken2
CC=golang-dev
https://golang.org/cl/5688064
2012-02-22 00:29:37 -05:00
Russ Cox
a457fa500d gc: return of ideal bool
This is a manual undo of CL 5674098.
It does not implement the even less strict spec
that we just agreed on, but it gets us back where
we were at the last weekly.

R=ken2
CC=golang-dev
https://golang.org/cl/5683069
2012-02-21 22:54:07 -05:00
Rémy Oudompheng
fc3797a491 test: use testlib in a few more cases.
R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5688057
2012-02-22 00:19:59 +01:00
Rémy Oudompheng
9666a959cf test: fix bug423.go to actually fail with older releases.
The supposedly overflowing variable was registerized.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5687061
2012-02-21 07:50:10 +01:00
Rob Pike
b888671f4c test: fix broken test
TBR=bradfitz

R=golang-dev
CC=golang-dev
https://golang.org/cl/5684050
2012-02-21 16:47:42 +11:00