1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:20:18 -06:00
Commit Graph

1118 Commits

Author SHA1 Message Date
Russ Cox
bcd910cfe2 runtime: add per-pause gc stats
R=r, r2
CC=golang-dev
https://golang.org/cl/3980042
2011-01-19 13:41:42 -05:00
Russ Cox
12307008e9 runtime: print signal information during panic
$ 6.out
panic: runtime error: invalid memory address or nil pointer dereference

[signal 11 code=0x1 addr=0x0 pc=0x1c16]

runtime.panic+0xa7 /Users/rsc/g/go/src/pkg/runtime/proc.c:1089
	runtime.panic(0xf6c8, 0x25c010)
runtime.panicstring+0x69 /Users/rsc/g/go/src/pkg/runtime/runtime.c:88
	runtime.panicstring(0x24814, 0x0)
runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:465
	runtime.sigpanic()
main.f+0x16 /Users/rsc/x.go:5
	main.f()
main.main+0x1c /Users/rsc/x.go:9
	main.main()
runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
	runtime.mainstart()
runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:149
	runtime.goexit()

R=r
CC=golang-dev
https://golang.org/cl/4036042
2011-01-18 14:15:11 -05:00
Anthony Martin
661bcb773b gc: fix typed constant declarations
Fixes #1411.

R=rsc, gri, ejsherry
CC=golang-dev
https://golang.org/cl/4035042
2011-01-18 11:24:49 -05:00
Russ Cox
2281ca169c gc: fix &^=
Fixes #1394.

R=ken2
CC=golang-dev
https://golang.org/cl/3879041
2011-01-06 11:21:18 -05:00
Anthony Martin
94df1a067c gc: return constant floats for parts of complex constants
Fixes #1369.

R=rsc
CC=golang-dev
https://golang.org/cl/3731046
2011-01-05 13:12:30 -05:00
Patrick Gavlin
4e5a59591b gc: rewrite complex /= to l = l / r.
Fixes #1368.

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3811042
2011-01-04 13:14:17 -05:00
Rob Pike
aa78cec69c test/bench: update numbers for regex-dna after speedup to regexp
R=rsc
CC=golang-dev
https://golang.org/cl/3634042
2010-12-16 12:38:14 -08:00
Russ Cox
0c54225b51 remove nacl
The recent linker changes broke NaCl support
a month ago, and there are no known users of it.

The NaCl code can always be recovered from the
repository history.

R=adg, r
CC=golang-dev
https://golang.org/cl/3671042
2010-12-15 11:49:23 -05:00
Anthony Martin
85f5bb8216 test/bench: a couple fixes to timing.sh
- Skip the gccgo tests if we don't have it
- Add -lm so nbody.c will compile
- Pass 2098 to the meteor test (cf. the shootout site)

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/3619042
2010-12-15 09:47:13 -05:00
Russ Cox
1b31c37428 gc: issue 1231
Fixes #1231.

R=ken2
CC=golang-dev
https://golang.org/cl/3627041
2010-12-13 16:51:19 -05:00
Russ Cox
dc9a3b2791 gc: align structs according to max alignment of fields
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260

Fixes #482.
Fixes #609.

R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
2010-12-13 16:22:19 -05:00
Russ Cox
9e26c4bd1a gc: complex(0)
Fixes #1232.

R=ken2
CC=golang-dev
https://golang.org/cl/3621041
2010-12-13 15:34:45 -05:00
Russ Cox
603f9feeec gc: another shift bug
Fixes #1316.

R=ken2
CC=golang-dev
https://golang.org/cl/3575042
2010-12-13 13:42:51 -05:00
Ryan Hitchman
f980577064 gc: syntax error for incomplete chan type
Fixes #932.

R=rsc
CC=golang-dev
https://golang.org/cl/3515041
2010-12-09 13:41:24 -05:00
Ryan Hitchman
062406bc64 throughout: simplify two-variable ranges with unused second variable
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3529041
2010-12-08 21:36:56 -08:00
Eoghan Sherry
cab83650d1 gc: skip undefined symbols in import .
Fixes #1284.

R=ken3, rsc
CC=golang-dev
https://golang.org/cl/3210041
2010-12-07 16:16:01 -05:00
Eoghan Sherry
802360edb4 errchk: accept multiple source files
R=rsc, iant
CC=golang-dev
https://golang.org/cl/3217042
2010-12-07 15:28:21 -05:00
Eoghan Sherry
6aa85d1cbe gc: fix method offsets of anonymous interfaces
Fixes #1290.

R=rsc
CC=golang-dev
https://golang.org/cl/3259043
2010-12-07 12:56:26 -05:00
Robert Griesemer
5a9ad8b9e3 go/ast: use token.Pos instead of token.Position; adjust all dependent code
Specifically:

	* lib/godoc:
	- provide file set (FSet) argument to formatters where needed

	* src/cmd:
	- cgo, ebnflint, godoc, gofmt, goinstall: provide file set (fset) where needed
	- godoc: remove local binary search with sort.Search (change by rsc),
	  extract file set for formatters

	* src/pkg:
	- exp/eval: remove embedded token.Position fields from nodes and replace
	  with named token.Pos fields; add corresponding Pos() accessor methods
	- go/token: added file.Line(), changed signature of File.Position()

	* test/fixedbugs/:
	- bug206.go: change test to not rely on token.Pos details

	* added various extra comments
	* Runs all.bash
	* gofmt formats all of src, misc w/o changes
	* godoc runs

	* performance:
	- The new version of godoc consumes about the same space after indexing
	  has completed, but indexing is half the speed. Significant space savings
	  are expected from smaller ASTs, but since they are thrown away after a
	  file has been indexed, this is not visible anymore. The slower indexing
	  time is due to the much more expensive computation of line information.
	  However, with the new compressed position information, indexing can be
	  rewritten and simplified. Furthermore, computing the line info can be
	  done more efficiently.

        New godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	44381 godoc        0.0%  0:38.00   4    19    149  145M   184K   148M   176M

	2010/12/03 17:58:35 index updated (39.231s, 18505 unique words, 386387 spots)
	2010/12/03 17:58:35 bytes=90858456 footprint=199182584
	2010/12/03 17:58:36 bytes=47858568 footprint=167295224

	Old godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	23167 godoc        0.0%  0:22.02   4    17    132  129M   184K   132M   173M

	2010/12/03 14:51:32 index updated (24.892s, 18765 unique words, 393830 spots)
	2010/12/03 14:51:32 bytes=66404528 footprint=163907832
	2010/12/03 14:51:32 bytes=46282224 footprint=163907832

	The different numbers for unique words/spots stem from the fact the the
	two workspaces are not exactly identical. The new godoc maintains a large
	file set data structure during indexing which (probably) is the reason
	for the larger heap (90858456 vs 66404528) before garbage collection.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3050041
2010-12-06 14:23:18 -08:00
Kyle Consalus
009aebdba8 Removed bytes.Add and bytes.AddByte; we now have 'append'.
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.

R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
2010-12-01 11:59:13 -08:00
Russ Cox
132e5435e3 gc: line comments may end in EOF
R=ken2
CC=golang-dev
https://golang.org/cl/2907041
2010-11-04 16:04:04 -04:00
Rob Pike
c33289238e test/ken/convert.go: add conversion torture test
(written by ken)

R=ken2
CC=golang-dev
https://golang.org/cl/2823042
2010-11-01 17:49:06 -07:00
Evan Shaw
5bf420f0c8 pidigits: Remove TODO, minor improvements
I tried adding a Scale method to big.Int and it didn't make any noticeable
difference, so I'm removing my TODO.

Also got rid of a few obvious allocations that I missed earlier for a modest
improvement (~5%).

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/2711043
2010-10-30 20:16:44 -07:00
Robert Griesemer
e79ebb008f test for append() built-in
R=r, rsc
CC=golang-dev
https://golang.org/cl/2777041
2010-10-28 08:14:31 -07:00
Russ Cox
0f28983afa test copy([]byte, string)
R=r, r2
CC=golang-dev
https://golang.org/cl/2740041
2010-10-26 08:36:23 -07:00
Russ Cox
8fff9166f6 arm: enable all tests
ARM functionality is now completely working.
(Or if it's not, we'll fix it.)

R=ken2
CC=golang-dev
https://golang.org/cl/2738041
2010-10-25 21:25:13 -07:00
Rob Pike
f57f8b6f68 test/bench: update numbers
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2631041
2010-10-20 17:43:57 -07:00
Russ Cox
0db8d3df4c gc: select receive with implicit conversion
Fixes #1172.

R=ken2
CC=golang-dev
https://golang.org/cl/2615041
2010-10-20 16:38:25 -04:00
Russ Cox
8599a83727 runtime: correct iteration of large map values
The hash_next_and_deref was a dreg from a
previous large value scheme.

Fixes #1163.

R=r, r2
CC=golang-dev
https://golang.org/cl/2369043
2010-10-06 11:54:41 -04:00
Russ Cox
01385b400d gc: ... bug
Fixes #1165.

R=ken2
CC=golang-dev
https://golang.org/cl/2339042
2010-10-06 11:12:30 -04:00
Russ Cox
a3c682267f gc: various bugs
Fixes #1016.
Fixes #1152.
Fixes #1153.

R=ken2
CC=golang-dev
https://golang.org/cl/2344042
2010-10-03 11:50:44 -04:00
Russ Cox
52d619cfdf gc: bug308
confused by using isddd for both ONAME and OCALL

Fixes #1136.

R=ken2
CC=golang-dev
https://golang.org/cl/2314043
2010-09-30 15:05:01 -04:00
Russ Cox
bee2d5b0ad gc, spec, tests: no auto-indirect of pointer to interface value
Implies no embedding of pointer to interface value either.

R=gri, iant, ken2, r, r2
CC=golang-dev
https://golang.org/cl/2289041
2010-09-30 14:59:41 -04:00
Russ Cox
00ffd59c1a gc: fix reflect table method receiver
Fixes #451.
Fixes #770.

R=ken2
CC=golang-dev
https://golang.org/cl/2207045
2010-09-28 13:43:50 -04:00
Russ Cox
ec13ed1fce gc: insert semicolon at EOF if needed
R=ken2, gri
CC=golang-dev
https://golang.org/cl/2208053
2010-09-28 10:35:02 -04:00
Russ Cox
9b62461a8f gc: allow select case expr = <-c
Fixes #1139.

R=ken2
CC=golang-dev
https://golang.org/cl/2194046
2010-09-27 12:04:21 -04:00
Ian Lance Taylor
6866026c45 test: Add test which causes incorrect error from gccgo.
R=gri
CC=golang-dev
https://golang.org/cl/2220048
2010-09-24 17:07:42 -07:00
Russ Cox
2ee420fa5e ... changes
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/2273042
2010-09-24 11:55:48 -04:00
Russ Cox
75dd8fdb34 gc: ... changes
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/2208047
2010-09-24 11:55:30 -04:00
Russ Cox
855f08358b build: add missing files for arm changes
R=adg
TBR=adg
CC=golang-dev
https://golang.org/cl/2226046
2010-09-22 17:21:02 -04:00
Russ Cox
b7cb844ac8 build: make all.bash run on Ubuntu ARM
Sent from my phone.

R=adg
CC=golang-dev
https://golang.org/cl/2192049
2010-09-22 15:30:42 +10:00
Russ Cox
b11740fb6d build: fixes for native arm build
R=kaib
CC=golang-dev
https://golang.org/cl/2254044
2010-09-21 22:41:32 -04:00
Russ Cox
33c4ff0669 test: fix NaCl build
Wasn't running the temp binary under $E (emulator).

R=r
CC=golang-dev
https://golang.org/cl/2237043
2010-09-19 23:28:32 -04:00
Robert Griesemer
5667d82599 fix build
R=iant
CC=golang-dev, ken2
https://golang.org/cl/2182043
2010-09-15 17:00:00 -07:00
Russ Cox
23bd214aee gc: implement new comparison rule
The new comparison rule was added to the spec by

	changeset:   5605:33abb649cb63
	user:        Robert Griesemer <gri@golang.org>
	date:        Thu Jun 03 16:55:50 2010 -0700
	files:       doc/go_spec.html
	description:
	go spec: Base comparison compatibility on assignment compatibility.

	Specifically:
	- Simplified definition of comparison compatibility and folded into
	  section on comparison operators since it's only used there.

	This is a small language change/cleanup. As a consequence:
	- An interface value may now be compared against a non-interface value.
	- Channels with opposite directions cannot be compared directly anymore
	  (per discussion with rsc).

	R=rsc, r, iant, ken2
	CC=golang-dev
	https://golang.org/cl/1462041

but never implemented.

Fixes #1070.

R=ken2
CC=golang-dev
https://golang.org/cl/2116047
2010-09-13 15:42:47 -04:00
Russ Cox
c3900387db gc: bug306
Fixes #1040.

R=ken2
CC=golang-dev
https://golang.org/cl/2132047
2010-09-13 15:42:14 -04:00
Rob Pike
bc55b41cbc arm tests: disable zerodivide.go: compilation fails.
Hope to fix the build.

R=rsc
CC=golang-dev
https://golang.org/cl/2140048
2010-09-13 13:19:25 +10:00
Ian Lance Taylor
8d4059f9b3 test: Make gccgo believe that the variables can change.
This test is supposed to test runtime behaviour.  However,
gccgo is smart enough to see that the variables are local to
the package and that they never change.  Add a function so
that gccgo thinks that the variables can in fact vary, so that
the test works at runtime as expected.

R=rsc
CC=golang-dev
https://golang.org/cl/2178041
2010-09-11 22:51:05 -07:00
Russ Cox
0acb63769c gc: const nil bug
Fixes #1073.

R=ken2
CC=golang-dev
https://golang.org/cl/2169043
2010-09-11 15:47:56 -04:00
Rob Pike
fa0c53da60 arm build: try to fix it by removing reference to deleted file syntax/slice.go
R=rsc
CC=golang-dev
https://golang.org/cl/2127046
2010-09-10 23:10:28 -07:00