1
0
mirror of https://github.com/golang/go synced 2024-10-05 08:21:22 -06:00
Commit Graph

2875 Commits

Author SHA1 Message Date
Maxim Pimenov
800c49820a go: fix typo in comment
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5531060
2012-01-10 07:43:48 -08:00
Luuk van Dijk
a6c49098bc gc: Nicer errors before miscompiling.
This fixes issue 2444.

A big cleanup of all 31/32bit size boundaries i'll leave for another cl though.  (see also issue 1700).

R=rsc
CC=golang-dev
https://golang.org/cl/5484058
2012-01-10 11:19:22 +01:00
Luuk van Dijk
4bcc9c6b5e gc: disallow declaration of variables outside package.
Fixes #2231.

Declaring main.i in package main in the same way already triggers syntax errors.

R=rsc
CC=golang-dev
https://golang.org/cl/5483078
2012-01-10 11:18:56 +01:00
Luuk van Dijk
556258e57b gc: fix stray %#N in error message
Fixes #2639.

R=rsc
CC=bradfitz, golang-dev
https://golang.org/cl/5489140
2012-01-10 11:09:04 +01:00
Luuk van Dijk
ba25778f3f gc: omit runtime.closure wrap for closures without closure variables
Fixes #1894.

test/closure.go's test for newfunc already covers this.

R=rsc, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/5516051
2012-01-10 11:07:35 +01:00
Mikio Hara
ad3e82e736 undo CL 5530063 / 1d7295fdf62e
runtime: enable runtime.ncpu on FreeBSD

««« original CL description
cmd/go: fix freebsd build

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

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5531059
2012-01-10 16:11:31 +09:00
Mikio Hara
8cad9251b3 cmd/go: fix freebsd build
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5530063
2012-01-10 14:47:20 +09:00
Russ Cox
8d8829c671 cmd/go: add -p flag for parallelism (like make -j)
On my MacBookAir4,1:

19.94r 	 go install -a -p 1 std
12.36r 	 go install -a -p 2 std
9.76r 	 go install -a -p 3 std
10.77r 	 go install -a -p 4 std

86.57r 	 go test -p 1 std -short
52.69r 	 go test -p 2 std -short
43.75r 	 go test -p 3 std -short
40.44r 	 go test -p 4 std -short

157.50r 	 go test -p 1 std
99.58r 	 go test -p 2 std
87.24r 	 go test -p 3 std
80.18r 	 go test -p 4 std

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5531057
2012-01-09 21:06:31 -08:00
Russ Cox
146a703cd1 cmd/go: add -v flag to build and install
The -v flag prints the names of packages as they are built/installed.

Use -v in make.bash/run.bash to avoid a silent pause during
the build while Go code is being compiled.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532055
2012-01-09 16:44:01 -08:00
Russ Cox
b8615a0931 go: add ... patterns in import path arguments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5530058
2012-01-09 16:23:00 -08:00
Russ Cox
0ad241dd55 cmd/go: fix import directory list for compilation
This fixes the most annoying bug in the go command,
that 'go build' sometimes ignored packages it had just
rebuilt in favor of stale installed ones.

This part of the code needs more thought, but this small
change is an important improvement.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5531053
2012-01-09 15:38:07 -08:00
Luuk van Dijk
41806ec26d gc: remove now redundant typecheck of ->ninit on switches.
Fixes #2576.

R=rsc
CC=golang-dev
https://golang.org/cl/5498105
2012-01-09 21:42:24 +01:00
Ian Lance Taylor
900b8becb3 cgo: if value for constant did not parse, get it from DWARF info
R=rsc, borman
CC=golang-dev
https://golang.org/cl/5525043
2012-01-09 11:22:26 -08:00
Russ Cox
8a4bd094a0 undo CL 5504108 / 0edee03791f4
breaks 386 build

««« original CL description
gc: put limit on size of exported recursive interface

Prevents edge-case recursive types from consuming excessive memory.

Fixes #1909.

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

»»»

R=lvd, lvd
CC=golang-dev
https://golang.org/cl/5534049
2012-01-09 09:45:08 -08:00
Lorenzo Stoakes
aa63a928ea gc: put limit on size of exported recursive interface
Prevents edge-case recursive types from consuming excessive memory.

Fixes #1909.

R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5504108
2012-01-09 11:48:53 -05:00
Wei Guangjing
9569c67a6b windows: use ArbitraryUserPointer as TLS slot
R=hectorchu, alex.brainman
CC=golang-dev
https://golang.org/cl/5519054
2012-01-09 11:23:07 +11:00
Ryan Hitchman
a15448d65e gc: improve unsafe.Pointer type-check error messages
Fixes #2627.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5498088
2012-01-06 14:34:16 -08:00
Robert Hencke
a3baccefd6 various: fix prints
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5516049
2012-01-05 18:38:01 -08:00
Andrew Gerrand
2c459f14e9 goinstall: fix test data
R=gri
CC=golang-dev
https://golang.org/cl/5519048
2012-01-06 09:48:03 +11:00
Eric Eisner
fd1322828c cmd/go: Pass arguments to command for run
Command arguments are separated from input .go file arguments
by a -- separator.

R=rsc, golang-dev, adg
CC=golang-dev
https://golang.org/cl/5514046
2012-01-06 09:23:00 +11:00
Andrew Gerrand
c2ea412296 goinstall: use correct checkout URL for Google Code svn repos
Fixes #2655.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5510045
2012-01-06 09:20:59 +11:00
Roger Peppe
5f5a7eb4bc go test: don't try to print package with error message.
If there's a error compiling a _test.go file, the error
message tries to print a *Package with %s. There's no String
method on *Package, so the error message looks bad.
Since the error messages identify the file in question
anyway, this CL removes the package from the error message.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5520045
2012-01-05 13:19:25 -08:00
Sanjay Menakuru
2693232f16 cmd/go: include external test files in the files sent to gofmt, govet, and gofix
Also, add XTestGoFiles to the go command's public api.

Fixes #2649.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5502102
2012-01-05 10:37:15 +11:00
Sanjay Menakuru
7ccd505dc4 cmd/go: include test files in the files sent to gofmt, govet, and gofix
Also, add TestGoFiles to the go command's public api.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5505083
2012-01-03 14:12:54 +11:00
Christoph Hack
a274798d6e cmd/go: refer to the right command in the doc description.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5501072
2012-01-03 12:06:12 +11:00
Benny Siegert
8e9e75f008 gotest: make _testmain.go conform to gofmt rules
Otherwise, running "gofmt -d ." after "gotest" gives some
spurious changes.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5504101
2012-01-03 12:00:39 +11:00
David Symonds
57c9bb4a07 testing: use flag.Duration for -timeout flag.
R=golang-dev, gustavo, r
CC=golang-dev
https://golang.org/cl/5498077
2011-12-25 16:07:05 +11:00
Russ Cox
eef7184046 cmd/go: two testing fixes
1. Show passing output for "go test" (no args) and with -v flag.
2. Warn about out-of-date packages being rebuilt.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5504080
2011-12-22 22:24:43 -05:00
Andrew Gerrand
e8ae29588d cmd/go: update "go help remote" to use correct Google Code urls
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5489114
2011-12-23 14:09:44 +11:00
Robert Griesemer
198936f2b8 go/doc, godoc: move export filtering into go/doc
- exports.go contains a stripped-down (but semantically unchanged)
  version of the code in go/ast/filter.go for export filtering
- filter.go contains the documentation filtering code found before
  at the end of doc.go; this is simply a code move w/o any semantic
  changes
- godoc now relies on go/doc for export filtering when creating
  documentation. It still has a separate form of export filtering
  for showing the source code version. This needs to be consolidated
  (perhaps the source form view should just be removed?).
- Stripping of function bodies (stripFunctionBodies function of
  godoc.go) is now happening in doc.go (line 176).
- doc.NewPackageDoc has an extra parameter "exportsOnly. If set
  to false, the behavior is as before. This function is only called
  once in our source code; a gofix module is probably not warranted.
- Deleted doc.NewFileDoc - was never called.

This change is mostly a code move w/ some minimal tweaks. It should
not cause any changes to the behavior of godoc. It's a prerequisite
for extracting anonymous embedded fields.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5502072
2011-12-22 15:28:15 -08:00
Luuk van Dijk
86deacc0bc gc: better linenumbers for inlined functions
Fixes #2580 up to a point.

R=rsc
CC=golang-dev
https://golang.org/cl/5498068
2011-12-22 17:31:54 +01:00
Mikio Hara
98fe44bdfc cmd/go: fix windows build
R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5502066
2011-12-23 00:14:59 +09:00
Mikio Hara
e636f6f51c cmd/gc: make sure use of pthread for gcc-4.5 and beyond
R=golang-dev, rsc, n13m3y3r, rogpeppe
CC=golang-dev
https://golang.org/cl/5501060
2011-12-22 23:18:34 +09:00
Russ Cox
0509727b0d build: fixes for Windows
* work around a linker/cgo bug
* do not run deps.bash on Windows unless we need it
  (cuts a full minute off the build time)
* add windows to the list of cgo-enabled targets

The gopack problem is issue 2601.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5504062
2011-12-21 15:57:47 -05:00
Russ Cox
25c8014ed9 cmd/go: respect $GCFLAGS
R=lvd
CC=golang-dev
https://golang.org/cl/5500060
2011-12-21 09:04:34 -05:00
Russ Cox
f52a2088ef go/build: add new +build tags 'cgo' and 'nocgo'
This lets us mark net's cgo_stub.go as only to be
built when cgo is disabled.

R=golang-dev, ality, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5489100
2011-12-21 08:51:18 -05:00
Roger Peppe
43b8f68c3f cmd/go: use spaces consistently in help message
R=rsc
CC=golang-dev
https://golang.org/cl/5501053
2011-12-21 08:25:31 -05:00
Russ Cox
0fcb24b91c cmd/go: fix build (piece of 5489100 leaked in to last checkin)
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5489102
2011-12-21 08:05:04 -05:00
Russ Cox
8f5f347e2c cmd/go: many improvements
* correct dependency calculations
* comment meaning of action fields
* new alias "std" like "all" but standard packages only
* add -o flag to 'go build'
* set up for parallel build (still serial)
* understand that import "C" depends on cgo, runtime/cgo

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5502055
2011-12-21 07:47:12 -05:00
Mikio Hara
16a2d2617f cmd/go: avoid infinite loop with package specific flags
R=rsc
CC=golang-dev
https://golang.org/cl/5505053
2011-12-21 21:20:17 +09:00
Alex Brainman
a462816753 build: multiple fixes to make "go install" work on windows
R=rsc
CC=golang-dev
https://golang.org/cl/5502054
2011-12-21 16:57:44 +11:00
Nigel Tao
d13ce8115d image/ycbcr: move the Y'CbCr types into image and image/color.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5493084
2011-12-21 10:29:21 +11:00
Russ Cox
fd1c1b9679 cmd/go: work toward build script
The commands in the standard tree are now named
by the pseudo-import paths cmd/gofmt etc.
This avoids ambiguity between cmd/go's directory
and go/token's parent directory.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5503050
2011-12-20 16:42:44 -05:00
Russ Cox
82a6a4f39e gc: allow use of unsafe.Pointer in generated code
The functions we generate to implement == on structs
or arrays may need to refer to unsafe.Pointer even in
safe mode, in order to handle unexported fields contained
in other packages' structs.

R=ken2
CC=golang-dev
https://golang.org/cl/5505046
2011-12-20 16:25:57 -05:00
Russ Cox
54fb9940cf go: build runtime/cgo
Also rename -v to -x in the build and install commands,
to match the flag in go test (which we can't change
because -v is taken).  Matches sh -x anyway.

R=r, iant, ality
CC=golang-dev
https://golang.org/cl/5504045
2011-12-20 14:25:23 -05:00
Maxim Pimenov
7be6229f9f cgo: support export for built-in types
This change doesn't pay attention to structs
so they still cannot be exported, see Issue 2552.

Fixes #2462.

R=dvyukov, rsc, iant
CC=golang-dev
https://golang.org/cl/5487058
2011-12-20 09:28:45 -08:00
Russ Cox
a1198fcc03 go: build runtime
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/5495068
2011-12-20 10:28:04 -05:00
Joel Sing
5842f7e46a 5l/6l/8l: add support for netbsd signature note section
R=m4dh4tt3r, jsing, rsc
CC=golang-dev
https://golang.org/cl/5493068
2011-12-20 12:25:06 +11:00
Russ Cox
1d0f93b4be gc: avoid unsafe in defn of package runtime
Keeps -u tracking simple.

R=ken2
CC=golang-dev
https://golang.org/cl/5495094
2011-12-19 15:52:15 -05:00
Russ Cox
55889409f8 runtime: separate out auto-generated files, take 2
This is like the ill-fated CL 5493063 except that
I have written a shell script (autogen.sh) instead of
thinking I could possibly write a correct Makefile.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5496075
2011-12-19 15:51:13 -05:00