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

1145 Commits

Author SHA1 Message Date
Ian Lance Taylor
9bd6b0afa4 test: Recognize gccgo error messages.
bug255.go:11: error: array bound truncated to integer
bug255.go:12: error: array bound is not numeric
bug255.go:13: error: array bound is not numeric
bug255.go:14: error: array bound is not constant
bug255.go:15: error: array bound overflows

R=rsc
CC=golang-dev
https://golang.org/cl/2091042
2010-08-31 17:38:11 -07:00
Ian Lance Taylor
7a05b0f235 test: Match gccgo error messages.
Another case where gccgo and gc report similar but not
identical errors for a recursive interface.

bug251.go:11: error: invalid recursive interface

R=rsc
CC=golang-dev
https://golang.org/cl/2094041
2010-08-31 15:48:04 -07:00
Ian Lance Taylor
09977734cd test: gccgo and gc print the error on different lines.
This introduces GC_ERROR to mark an error only issued by the
gc compiler.  GCCGO_ERROR already exists to mark errors only
issued by the gccgo compiler.  Obviously these should be used
sparingly.

bug195.go:9: error: interface contains embedded non-interface
bug195.go:12: error: interface contains embedded non-interface
bug195.go:15: error: interface contains embedded non-interface
bug195.go:18: error: invalid recursive interface
bug195.go:22: error: invalid recursive interface

R=rsc
CC=golang-dev
https://golang.org/cl/2040043
2010-08-31 14:12:23 -07:00
Ian Lance Taylor
472cd3af12 test: Match gccgo error messages.
gcc conventionally does not upper case in error messages.

char_lit1.go:13: error: invalid unicode code point 0xd800
char_lit1.go:14: error: invalid unicode code point 0xd999
char_lit1.go:15: error: invalid unicode code point 0xdc01
char_lit1.go:16: error: invalid unicode code point 0xdddd
char_lit1.go:17: error: invalid unicode code point 0xdfff
char_lit1.go:20: error: invalid unicode code point 0x110000
char_lit1.go:22: error: invalid unicode code point 0x110000
char_lit1.go:23: error: invalid unicode code point 0xffffffff

R=rsc
CC=golang-dev
https://golang.org/cl/2040042
2010-08-31 11:43:52 -07:00
Ian Lance Taylor
5309fae1a3 test: don't assign address of array to slice.
R=rsc
CC=golang-dev
https://golang.org/cl/2084042
2010-08-31 07:34:01 -07:00
Christian Himpel
5c603dbb75 build: remove unnecessary references to GOBIN and GOROOT
All scripts and makefiles assume that GOBIN is correctly set
in PATH.

R=rsc
CC=golang-dev
https://golang.org/cl/2043041
2010-08-30 15:40:56 -04:00
Ian Lance Taylor
58a25c6de7 test: Add testcase which crashes gccgo.
R=rsc
CC=golang-dev
https://golang.org/cl/1995050
2010-08-24 13:08:05 -07:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Russ Cox
735356ca9a test/garbage: do not try to parse package bignum, which is gone.
Fixes #1023.

R=gri
CC=golang-dev
https://golang.org/cl/1968043
2010-08-16 13:31:31 -07:00
Rob Pike
a621a7ef74 delete pkg/once
R=rsc
CC=golang-dev
https://golang.org/cl/1995041
2010-08-13 12:53:27 +10:00
Rob Pike
d31ee536e8 update the tree to use the new regexp methods
R=rsc
CC=golang-dev
https://golang.org/cl/1983043
2010-08-12 16:48:41 +10:00
Russ Cox
1d77ff5b6b 6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)
R=ken2
CC=golang-dev
https://golang.org/cl/1960042
2010-08-11 22:27:47 -07:00
Russ Cox
26dde76cee gopack: handle long lines in export data
Also, if the header is bad, exit with a non-zero status.

Other calls to Brdline in the tree, by category:

Reading symbol name from object file:
./cmd/5l/obj.c:486: 		name = Brdline(f, '\0');
./cmd/6l/obj.c:535: 		name = Brdline(f, '\0');
./cmd/8l/obj.c:564: 		name = Brdline(f, '\0');
./libmach/sym.c:292: 		cp = Brdline(bp, '\0');

Reading archive header line (fixed, short):
./cmd/gc/lex.c:287: 	if((a = Brdline(b, '\n')) == nil)
./cmd/gc/lex.c:303: 	if((p = Brdline(b, '\n')) == nil)

Reading object file header line (fixed, short):
./cmd/ld/lib.c:421: 	line = Brdline(f, '\n');

Reading undefined symbol list (unused code):
./cmd/ld/lib.c:773: 	while((l = Brdline(b, '\n')) != nil){

Implementing Brdstr:
./libbio/brdstr.c:36: 		p = Brdline(bp, delim);

The symbol names ones will cause a problem loudly if they
fail: they'll error out with symbol name too long.  This means
that you can't define an enormous struct without giving the
type a name and then stick it in an interface, because the
type's symbol name will be too long for the object file.
Since this will be a loud failure instead of a silent one,
I'm willing to wait until it comes up in practice.

R=r
CC=golang-dev
https://golang.org/cl/1982041
2010-08-11 22:17:20 -07:00
Russ Cox
a9a62eef6b gc: bug302
Fixed by http://code.google.com/p/go/source/detail?r=d1f41e20a90e
This just adds a test and checks the return value of Bprint.

R=ken2
CC=golang-dev
https://golang.org/cl/1949042
2010-08-10 17:39:38 -07:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Robert Griesemer
1dd8840800 test/peano: use directly recursive type def
Test case for http://code.google.com/p/go/issues/detail?id=999

R=r
CC=golang-dev
https://golang.org/cl/1892050
2010-08-06 15:07:54 -07:00
Kai Backman
d0b913fe37 bikeshed: only output bug when we have a regression
R=rsc
CC=golang-dev
https://golang.org/cl/1897046
2010-08-03 13:09:16 -07:00
Russ Cox
d4af41f5bb test/run: diff old new
R=r, iant
CC=golang-dev
https://golang.org/cl/1907046
2010-08-03 13:01:28 -07:00
Russ Cox
3f19d8ae8d gc: empty select
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
585eae3bce gc: bug301
Fixes #990.

R=ken2
CC=golang-dev
https://golang.org/cl/1742055
2010-08-03 01:07:40 -07:00
Russ Cox
c6cb303a8a gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Russ Cox
9bac9d23d3 gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Kai Backman
a0368180a7 arm: disable another flaky test.
these tests work fine on n1 and gumstix. it's unclear
why they keep failing on the godashboard build.

R=rsc
CC=golang-dev
https://golang.org/cl/1664056
2010-07-30 12:33:40 +03:00
Kai Backman
c44f95ff48 fix build
R=rsc
CC=golang-dev
https://golang.org/cl/1913042
2010-07-30 10:53:26 +03:00
Kai Backman
8d76a15122 arm: bugfixes (stack clobbering, indices)
also changed zerodivide to output "BUG"

R=rsc
CC=golang-dev
https://golang.org/cl/1871055
2010-07-30 10:37:51 +03:00
Robert Griesemer
500425ac7b bug300: literal types must not be parenthesized
( This CL is dependent on acceptance of
https://golang.org/cl/1913041/show )

R=go-dev
CC=golang-dev
https://golang.org/cl/1860045
2010-07-29 18:14:49 -07:00
Robert Griesemer
07cc6440dc go_spec: don't allow parens around the literal type of composite literals
Background: The current spec is imprecise with respect to the parsing ambiguity
for composite literals: It says that the ambiguity arises when the TypeName form
of the LiteralType is used. The following code:

    if (B) {} ...

is not using the TypeName form (but the parenthesized TypeName form) and thus
could be interpreted as:

    if ((B){}) ...

instead of

    if B {} ...

Both compilers and gofmt choose the latter interpretation. One could fix the
spec by making the clause regarding the parsing ambiguity more precise ("...using
the _possibly parenthesized_ TypeName form of the LiteralType..."). The alternative
(chosen here) is to simply disallow parenthesized literal types. Except for a single
test case (test/parentype.go) there appears to be no Go code under $GOROOT containing
parenthesized literal types. Furthermore, parentheses are never needed around a
literal type for correct parsing.

R=golang-dev
CC=golang-dev
https://golang.org/cl/1913041
2010-07-29 18:13:41 -07:00
Robert Griesemer
7734ad5179 bug299: parenthesized receiver types/anonymous fields are illegal
R=r
CC=golang-dev
https://golang.org/cl/1846051
2010-07-29 10:54:03 -07:00
Vinu Rajashekhar
1ea5d15407 test/sigchld.go: use syscall.Kill instead of a combination
of syscall.Syscall and syscall.SYS_KILL.

In RTEMS, there is no syscall.Syscall support, but it does
support POSIX signals. So, if this testcase is changed to use
syscall.Kill, then it would run fine on RTEMS, when using gccgo.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/1863046
2010-07-28 18:26:29 -07:00
Kai Backman
c6e4697141 arm: fix build (dodgy floats)
R=rsc
CC=golang-dev
https://golang.org/cl/1907041
2010-07-28 16:33:52 +03:00
Kai Backman
fa4da33315 arm: minor bugfixes.
R=rsc
CC=golang-dev
https://golang.org/cl/1692057
2010-07-28 15:58:35 +03:00
Russ Cox
f20c2e1cf5 gc: more crash avoidance
Fixes #961.
Fixes #962.

R=ken2
CC=golang-dev
https://golang.org/cl/1903043
2010-07-26 17:34:17 -07:00
Russ Cox
607eaea456 gc: fix smaller-than-pointer-sized receivers in interfaces
Fixes #812.

R=ken2
CC=golang-dev
https://golang.org/cl/1904041
2010-07-26 15:25:10 -07:00
Russ Cox
7b240e8135 gc: import dot shadowing bug
R=ken2
CC=golang-dev
https://golang.org/cl/1873047
2010-07-26 14:21:39 -07:00
Russ Cox
0a9a3c128f test: fail is for bad exit status only
R=kaib
CC=golang-dev
https://golang.org/cl/1847043
2010-07-22 08:54:32 -07:00
Kai Backman
8975d36412 arm: fic build3, disable flaky 64 bit test
R=rsc
CC=golang-dev
https://golang.org/cl/1888041
2010-07-21 15:59:11 +03:00
Kai Backman
b7aa561473 arm: fix build2, tweak test/nul1.go arm exclusion
R=rsc
CC=golang-dev
https://golang.org/cl/1866044
2010-07-21 14:51:03 +03:00
Kai Backman
47b6400556 arm: fix build by disabling list copying optimization for 5g.
R=rsc
CC=golang-dev
https://golang.org/cl/1697053
2010-07-21 14:14:21 +03:00
Kai Backman
199e17ba1f fix build
R=rsc
CC=golang-dev
https://golang.org/cl/1742048
2010-07-20 16:20:35 +03:00
Kai Backman
36057e721e more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

R=rsc
CC=dho, golang-dev
https://golang.org/cl/1778041
2010-07-20 15:53:16 +03:00
Russ Cox
4c0de303ce gc: bug294
Fixes #800.

R=ken2
CC=golang-dev
https://golang.org/cl/1855043
2010-07-15 16:42:32 -07:00
Russ Cox
ece6a8c549 gc: bug293
Fixes #846.

R=ken2
CC=golang-dev
https://golang.org/cl/1862042
2010-07-15 16:14:06 -07:00
Russ Cox
cdb446feb5 gc: bug292
Fixes #843.

R=ken2
CC=golang-dev
https://golang.org/cl/1729051
2010-07-15 16:13:47 -07:00
Russ Cox
08a263a991 gc: bug291
Fixes #915.

R=ken2
CC=golang-dev
https://golang.org/cl/1856042
2010-07-15 15:17:42 -07:00
Russ Cox
691d765121 gc: bug274
R=ken2
CC=golang-dev
https://golang.org/cl/1742044
2010-07-15 15:05:56 -07:00
Russ Cox
17f90c68c6 gc: fix handling of types inside function bodies
Fixes #849.
Fixes #920.

R=ken2
CC=golang-dev
https://golang.org/cl/1841042
2010-07-15 14:25:50 -07:00
Robert Griesemer
47b835e4a8 channel tests: added a couple of tests with closed channels
R=rsc
CC=golang-dev
https://golang.org/cl/1774047
2010-07-14 13:18:57 -07:00
Robert Griesemer
d00b479888 select statement: initial set of test cases for corner cases
R=r, rsc
CC=golang-dev
https://golang.org/cl/1772043
2010-07-14 09:55:08 -07:00
Robert Griesemer
bebd22f8e0 fix build
R=rsc
CC=golang-dev
https://golang.org/cl/1815042
2010-07-12 14:53:28 -07:00
Vinu Rajashekhar
89192ce4fe test/fixedbugs/bug243.go: instead of closing stdout,
remove the print statements.

This change is because of the port of gccgo to RTEMS.
These tests use the GCC DejaGNU framework. In some cases,
the tests need to be run on qemu where the status code
cannot be sent back to DejaGNU, so it prints the exit status
by putting a wrapper around the exit and abort calls.

This testcase closes the stdout, and hence prohibits DejaGNU
from knowing the status in such cases, and causes this test
to be wrongly declared as a failure.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/1792042
2010-07-12 13:17:32 -07:00
Ian Lance Taylor
e03a50dd11 Test case that gccgo fails (crashes rather than printing error).
R=rsc
CC=Raj_, golang-dev
https://golang.org/cl/1740044
2010-07-12 06:34:36 -07:00
Russ Cox
81c3e8cabc gc: implement new len spec, range bug fix, optimization
Fixes #885.

R=ken2
CC=golang-dev
https://golang.org/cl/1680048
2010-07-01 18:04:25 -07:00
Russ Cox
47c85ec97a test: override gcc bug when preparing complex divide tables
R=iant
CC=golang-dev
https://golang.org/cl/1666048
2010-06-30 23:34:27 -07:00
Russ Cox
7c9ed7946c 8g: out of register bug fix
Fixes #868.

R=ken2
CC=golang-dev
https://golang.org/cl/1695049
2010-06-30 20:45:50 -07:00
Russ Cox
6d8b8101ea gc: fix crash for nested complex division
R=ken2
CC=golang-dev
https://golang.org/cl/1720043
2010-06-23 10:55:50 -04:00
Russ Cox
8bd99ebff5 test: another listen on ":0" -> "127.0.0.1:0"
R=r
CC=golang-dev
https://golang.org/cl/1664043
2010-06-21 16:34:55 -07:00
Russ Cox
fc090a3a54 reflect: add Type.Bits method, add tags to prohibit conversions
gob: substitute slice for map

R=r
CC=golang-dev
https://golang.org/cl/1699045
2010-06-21 13:19:29 -07:00
Russ Cox
1b79cd2e71 undo changes accidentally included in 09c5add99d50
R=ken2
CC=golang-dev
https://golang.org/cl/1736042
2010-06-20 12:45:39 -07:00
Russ Cox
37c531f51f errchk: fix build - allow matches in multiline error messages
TBR=r
CC=golang-dev
https://golang.org/cl/1734042
2010-06-20 12:05:43 -07:00
Russ Cox
a212d174ac gc: better error messages for interface failures, conversions
x.go:13: cannot use t (type T) as type Reader in assignment:
	T does not implement Reader (Read method requires pointer receiver)
x.go:19: cannot use q (type Q) as type Reader in assignment:
	Q does not implement Reader (missing Read method)
		have read()
		want Read()
x.go:22: cannot use z (type int) as type Reader in assignment:
	int does not implement Reader (missing Read method)

x.go:24: too many arguments to conversion to complex: complex(1, 3)

R=ken2
CC=golang-dev
https://golang.org/cl/1736041
2010-06-20 11:45:53 -07:00
Christopher Wedgwood
34cc011276 test: add missing import for zerodivide
R=rsc
CC=golang-dev, r
https://golang.org/cl/1706043
2010-06-18 22:42:48 -07:00
Russ Cox
21ff75bc0e complex divide: match C99 implementation
R=iant, ken2, r, r2, ken3
CC=golang-dev
https://golang.org/cl/1686044
2010-06-18 15:46:00 -07:00
Russ Cox
c9172fb2a3 runtime: correct fault for 16-bit divide on Leopard
R=r
CC=golang-dev
https://golang.org/cl/1703041
2010-06-14 18:07:17 -07:00
Rob Pike
d482c163be fmt.Print*: reimplement to switch on type first.
This shortens, simplifies and regularizes the code significantly.
(Improvements to reflect could make another step.)
Passes all.bash.

One semantic change occurs: The String() method changes
behavior. It used to run only for string formats such as %s and %q.
Instead, it now runs whenever the item has the method and the
result is then processed by the format as a string. Besides the
regularization, this has three effects:

	1) width is honored for String() items
	2) %x works for String() items
	3) implementations of String that merely recur will recur forever

Regarding point 3, example from the updated documentation:
	type X int
	func (x X) String() string { return Sprintf("%d", x) }
should cast the value before recurring:
	func (x X) String() string { return Sprintf("%d", int(x)) }

R=rsc
CC=golang-dev
https://golang.org/cl/1613045
2010-06-14 17:16:35 -07:00
Rob Pike
dee4db0691 Add test for division by zero.
It fails with 6g. Once 6g is fixed up I will extend the value tests.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/1677043
2010-06-14 15:00:19 -07:00
Russ Cox
6672b40c09 remove uses of ... from tree, add one test
R=r
CC=golang-dev
https://golang.org/cl/1662041
2010-06-14 11:23:11 -07:00
Russ Cox
76da2780c3 gc: less aggressive name binding, for better line numbers in errors
Cleans up a few other corner cases too.

R=ken2
CC=golang-dev
https://golang.org/cl/1592045
2010-06-12 11:17:24 -07:00
Russ Cox
6cd8537fd1 test: check that surrogate pair runes and huge rune values are rejected
R=r
CC=golang-dev
https://golang.org/cl/1615042
2010-06-10 13:30:39 -07:00
Robert Griesemer
fb279e7347 bug286: test case
R=r
CC=golang-dev
https://golang.org/cl/1644042
2010-06-09 16:05:00 -07:00
Russ Cox
a2a7d473f4 gc: more cleanup
* disallow surrogate pair runes.
 * diagnose impossible type assertions
 * eliminate another static buffer.
 * do not overflow lexbuf.
 * add -u flag to disable package unsafe.

R=ken2
CC=golang-dev
https://golang.org/cl/1619042
2010-06-09 11:00:55 -07:00
Russ Cox
42a691b877 fix build: invalid character literals
R=r
CC=golang-dev
https://golang.org/cl/1631041
2010-06-08 22:32:04 -07:00
Russ Cox
565b5dc076 gc: new typechecking rules
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
  interface conversions from type assertions:
  convT2I, assertI2T, etc.
* Correct checking of \U sequences.

Fixes #840.
Fixes #830.
Fixes #778.

R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Russ Cox
6aaef04469 misc cleanup: gofmt + &x -> x[0:] conversion
R=gri
CC=golang-dev
https://golang.org/cl/1620042
2010-06-08 17:51:57 -07:00
Russ Cox
f892540513 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1616041
2010-06-08 16:14:19 -07:00
Russ Cox
57a62a8bcb bug284: make conversion legal, fix error patterns
R=gri
CC=golang-dev
https://golang.org/cl/1612041
2010-06-08 15:51:31 -07:00
Russ Cox
2ec58f73e3 bug285: delete invalid map assignment
*T2 implements I2, but T2 does not.

R=gri
CC=golang-dev
https://golang.org/cl/1613041
2010-06-08 15:50:53 -07:00
Kyle Consalus
47bc1f2e4b Added regex-dna-parallel.go, a pretty trivial parallelization.
R=rsc, r
CC=golang-dev
https://golang.org/cl/972046
2010-06-03 16:20:54 -07:00
Robert Griesemer
86c9aca41e bug285: assignment compatible map keys must be accepted
R=r
CC=golang-dev
https://golang.org/cl/1473042
2010-06-03 14:58:00 -07:00
Robert Griesemer
c0b378ff5c bug284: additional conversion test case
R=r, iant
CC=golang-dev
https://golang.org/cl/1433042
2010-06-02 10:36:19 -07:00
Robert Griesemer
3b1e4b217e bug284: test cases for new conversion rules
R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/1465041
2010-06-02 09:23:04 -07:00
Russ Cox
6a060200cc 8g: out of register bug
Fixes #806.

R=ken2
CC=golang-dev
https://golang.org/cl/1281042
2010-05-24 17:22:51 -07:00
Russ Cox
ea941f09bf gc: more accurate error description
R=ken2
CC=golang-dev
https://golang.org/cl/1284041
2010-05-24 17:07:51 -07:00
Russ Cox
8c2bc4419b gc: fix shift/reduce conflict in go.y export syntax
Fixes #771.

R=ken2
CC=golang-dev
https://golang.org/cl/1267042
2010-05-24 16:55:23 -07:00
Russ Cox
9fc9246bf3 gc: bug281 - bad overlap in stack copy
Fixes #807.

R=ken2
CC=golang-dev
https://golang.org/cl/1283041
2010-05-24 16:54:24 -07:00
Russ Cox
426fef5585 fix build - forgot golden.out
R=ken2
CC=golang-dev
https://golang.org/cl/1274042
2010-05-24 15:26:20 -07:00
Russ Cox
2e9b67afa6 gc: bug277 - new conversion syntax
R=ken2
CC=golang-dev
https://golang.org/cl/1220046
2010-05-24 15:25:30 -07:00
Russ Cox
43c0a46ac6 gc: bug280
Fixes #808.

R=ken2
CC=golang-dev
https://golang.org/cl/1273042
2010-05-24 15:25:09 -07:00
Russ Cox
5e253645d2 gc: bug278
Fixes #804.

R=ken2
CC=golang-dev
https://golang.org/cl/1224045
2010-05-24 14:22:54 -07:00
Russ Cox
80ac15ec12 gc: fix unsafe.Sizeof on ideal constants
R=ken2
CC=golang-dev
https://golang.org/cl/1280041
2010-05-24 14:18:15 -07:00
Robert Griesemer
2034f72139 bug277: tests for conversion syntax
- accepted by gccgo, gofmt
- some not accepted by 6g
- spec revision forthcoming

R=rsc
CC=golang-dev
https://golang.org/cl/1279041
2010-05-24 13:57:34 -07:00
Robert Griesemer
38b2d10bb2 test/hilbert.go: convert to test case and benchmark for big.Rat
R=rsc
CC=golang-dev
https://golang.org/cl/1231044
2010-05-21 20:20:17 -07:00
Robert Griesemer
e2b6022f35 issue 789: keep test case
R=rsc
CC=golang-dev
https://golang.org/cl/1242045
2010-05-21 14:53:54 -07:00
Robert Griesemer
638ef0794f bignum: deprecate by moving into exp directory
R=rsc
CC=golang-dev
https://golang.org/cl/1211047
2010-05-21 14:14:22 -07:00
Russ Cox
709c5b2481 gc: handle use of builtin function outside function call
tweaks & tests of last bug fix too.

R=ken2
CC=golang-dev
https://golang.org/cl/1207044
2010-05-20 22:57:08 -07:00
Ken Thompson
333002bf53 clean up bug 275
R=rsc
CC=golang-dev
https://golang.org/cl/1224044
2010-05-20 21:01:59 -07:00
Ken Thompson
09b2de77b5 fix bug 275
R=rsc
CC=golang-dev
https://golang.org/cl/1198046
2010-05-20 20:56:28 -07:00
Robert Griesemer
ce7487baa8 bug275: cannot apply real() to a complex array element
R=r, ken2
CC=golang-dev
https://golang.org/cl/1260041
2010-05-19 13:10:00 -07:00
Russ Cox
b198c8612e runtime: allow large map values
Fixes #772.

R=ken2
CC=golang-dev
https://golang.org/cl/1206043
2010-05-19 12:57:47 -07:00
Russ Cox
5b8117b98a fix build - arm tests
TBR=kaib
CC=golang-dev
https://golang.org/cl/1256042
2010-05-18 23:27:35 -07:00
Robert Griesemer
434c4378c1 bug274: test case for issue 777
R=r, iant
CC=golang-dev
https://golang.org/cl/1195042
2010-05-13 11:52:04 -07:00
Robert Griesemer
b9caa4ac56 big: completed set of Int division routines & cleanups
- renamed Len -> BitLen, simplified implementation
- renamed old Div, Mod, DivMod -> Que, Rem, QuoRem
- implemented Div, Mod, DivMod (Euclidian definition, more
  useful in a mathematical context)
- fixed a bug in Exp (-0 was possible)
- added extra tests to check normalized results everywhere
- uniformly set Int.neg flag at the end of computations
- minor cosmetic cleanups
- ran all tests

R=rsc
CC=golang-dev
https://golang.org/cl/1091041
2010-05-03 18:48:05 -07:00
Russ Cox
32df678894 gc: bug264
Fixes #692.

R=ken2
CC=golang-dev
https://golang.org/cl/1092041
2010-05-03 17:51:48 -07:00
Russ Cox
f8f83e80b1 test/bench: import new fasta C reference, update Go, optimizations
OLD fasta -n 25000000
	gcc -O2 fasta.c	7.59u 0.06s 7.74r
	gc fasta	9.54u 0.15s 9.84r
	gc_B fasta	9.48u 0.10s 9.62r

NEW fasta -n 25000000
	gcc -O2 fasta.c	2.59u 0.02s 2.66r
	gc fasta	3.00u 0.03s 3.09r
	gc_B fasta	2.72u 0.03s 2.81r

R=r
CC=golang-dev
https://golang.org/cl/1054041
2010-05-03 17:47:59 -07:00
Russ Cox
a9425c70aa test: test of static initialization (fails)
R=ken2
CC=golang-dev
https://golang.org/cl/1090041
2010-05-03 17:21:49 -07:00
Russ Cox
b5f54db359 gc: bug267
R=ken2
CC=golang-dev
https://golang.org/cl/1067042
2010-05-03 15:29:59 -07:00
Russ Cox
28db812c88 test: fix run-arm to count bugs correctly
TBR=kaib
CC=golang-dev
https://golang.org/cl/1080041
2010-05-03 13:24:26 -07:00
Russ Cox
6361f52fc4 gc: be pickier about slice, chan, array, and map sizes
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1032044
2010-05-01 13:15:42 -07:00
Robert Griesemer
58e77990ba big: use fast shift routines
- fixed a couple of bugs in the process
  (shift right was incorrect for negative numbers)
- added more tests and made some tests more robust
- changed pidigits back to using shifts to multiply
  by 2 instead of add

  This improves pidigit -s -n 10000 by approx. 5%:

  user 0m6.496s (old)
  user 0m6.156s (new)

R=rsc
CC=golang-dev
https://golang.org/cl/963044
2010-04-30 21:25:48 -07:00
Russ Cox
c66b49845c 8g: bug272
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1043042
2010-04-30 14:04:34 -07:00
Russ Cox
253fd30e66 gc: bug271
Fixes #662.

R=ken2
CC=golang-dev
https://golang.org/cl/978043
2010-04-30 13:27:08 -07:00
Russ Cox
560283c880 gc: bug270
Fixes #746.

R=ken2
CC=golang-dev
https://golang.org/cl/1040042
2010-04-30 13:04:16 -07:00
Russ Cox
77817e08d5 gc: never include ( ) on singleton func return type
Fixes #749.

R=ken2
CC=golang-dev
https://golang.org/cl/963043
2010-04-29 16:07:14 -07:00
Russ Cox
10eb76b04e gc: bug268
Fixes #745.

R=ken2
CC=golang-dev
https://golang.org/cl/1008045
2010-04-29 15:52:27 -07:00
Robert Griesemer
2f480b10e2 pidigits: ~10% performance win by using adds instead of shifts
user time for pidigits -s -n=10000:
6.466s w/ adds
7.138s w/ shifts

R=rsc
CC=golang-dev
https://golang.org/cl/1021041
2010-04-27 14:06:53 -07:00
Robert Griesemer
d971f71703 6g bug: no need for parens around array index expression
where index is a composite literal

R=rsc
CC=golang-dev
https://golang.org/cl/961044
2010-04-27 13:09:32 -07:00
Kyle Consalus
8b9a73f6a1 Added fannkuch-parallel.go
R=r, rsc
CC=golang-dev
https://golang.org/cl/978042
2010-04-26 22:44:44 -07:00
Russ Cox
d6e4e18c8c gc: more specific error for statements at top level
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/1006041
2010-04-26 22:35:27 -07:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Rob Pike
735db765fb test/bench: reenable chameneosredux for gccgo.
run reverse-complement only once. (garbage is no longer an issue)

R=rsc
CC=golang-dev
https://golang.org/cl/968041
2010-04-21 14:54:19 -07:00
Evan Shaw
76cbbc8a95 big: Add Lsh and Value; convert pidigits to use big
This yields a pretty significant performance boost to pidigits and there are still some improvements to be made. Here are my numbers:

amd64 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.92u 0.02s 22.97r
        gc_B pidigits   22.62u 0.00s 22.65r

amd64 w/ big:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
        gc pidigits     12.68u 0.04s 12.72r
        gc_B pidigits   12.71u 0.03s 12.75r

386 w/ bignum:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.09r
        gc pidigits     44.30u 0.01s 44.35r
        gc_B pidigits   44.29u 0.03s 44.35r

386 w/ big:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.10u 0.00s 2.10r
        gc pidigits     22.70u 0.06s 22.79r
        gc_B pidigits   22.80u 0.09s 22.91r

R=rsc, gri
CC=golang-dev
https://golang.org/cl/881050
2010-04-20 20:39:36 -07:00
Evan Shaw
93c750d80a gc benchmark: Update package list
Some old packages on the list were preventing this benchmark from working.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/820045
2010-04-19 15:41:40 -07:00
Russ Cox
d97bbabbaa gc: cmplx typecheck bug fix
Fixes #729.

R=ken2
CC=golang-dev
https://golang.org/cl/875048
2010-04-19 09:21:51 -07:00
Kai Backman
0b2e0265ae the android runner script
this is a version synthesized from rsc's, dean's and my
	versions. changes and updates:

	- embeds the retval script and pushes a new version to the
          device if needed
	- passes arguments correctly to the program on the device
	- export GOARCH, GOTRACEBACK and GOGC from the local
          environment to the device.
	- added times.out support to run-arm

	enabled a few tests that are now passing and moved the
	GOGC=off workaround to run-arm.

R=dpx
CC=golang-dev, rsc
https://golang.org/cl/880046
2010-04-16 13:06:45 +03:00
Kai Backman
df3a544085 synchronize ARM runner environment variable with run-arm
R=rsc
CC=golang-dev
https://golang.org/cl/912041
2010-04-15 12:47:49 +03:00
Kai Backman
26e846429d support for printing floats:
fmt.Printf("float32 %f\n", float32(1234.56789))
fmt.Printf("float64 %f\n", float64(1234.56789))
->
float32 1234.567871
float64 1234.567890

this is a snapshot. extended instruction support, corner cases
and fixes coming in subseuent cls.

R=rsc
CC=dpx, golang-dev
https://golang.org/cl/876045
2010-04-15 12:43:49 +03:00
Christopher Wedgwood
d80c78b62f test: minor updates to avoid bitrot
R=rsc, r
CC=golang-dev
https://golang.org/cl/854046
2010-04-12 18:10:29 -07:00
Russ Cox
d9254d00f9 gc: zero unnamed return values on entry if func has defer
R=ken2
CC=golang-dev
https://golang.org/cl/891050
2010-04-12 14:28:27 -07:00
Russ Cox
fe7826858c gc: make sure main.main has correct type
R=ken2
CC=golang-dev
https://golang.org/cl/883049
2010-04-11 14:51:35 -07:00
Russ Cox
5963dbac08 runtime: turn divide by zero, nil dereference into panics
tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386.
freebsd untested; will finish in a separate CL.

for now all the panics are errorStrings.
richer structures can be added as necessary
once the mechanism is shaked out.

R=r
CC=golang-dev
https://golang.org/cl/906041
2010-04-08 18:15:30 -07:00
Russ Cox
065ebe8bd4 arm: fix build, attempt #2
TBR=kaib
CC=golang-dev
https://golang.org/cl/897041
2010-04-06 18:30:36 -07:00
Russ Cox
c819a0c72f arm: fix build, attempt #1
TBR=kaib
CC=golang-dev
https://golang.org/cl/883046
2010-04-06 17:56:48 -07:00
Russ Cox
88ce9ce40c runtime: two proc bug fixes
1. Fix bug in GOMAXPROCS when trying to cut number of procs
Race could happen on any system but was
manifesting only on Xen hosted Linux.

2. Fix recover on ARM, where FP != caller SP.

R=r
CC=golang-dev
https://golang.org/cl/880043
2010-04-06 13:48:31 -07:00
Kyle Consalus
edcd70e07a test/bench: add k-nucleotide-parallel
R=rsc
CC=golang-dev
https://golang.org/cl/881042
2010-04-05 22:32:36 -07:00
Russ Cox
6c196015e0 runtime: various arm fixes
* correct symbol table size
  * do not reorder functions in output
  * traceback
  * signal handling
  * use same code for go + defer
  * handle leaf functions in symbol table

R=kaib, dpx
CC=golang-dev
https://golang.org/cl/884041
2010-04-05 12:51:09 -07:00
Russ Cox
f75d0d224f runtime: turn run time errors checks into panics
R=ken2, r
CC=golang-dev
https://golang.org/cl/871042
2010-04-01 22:31:27 -07:00
Russ Cox
ec53627ed5 runtime: correct memory leak in select
* adds pass 3 to dequeue from channels eagerly

various other cleanup/churn:
  * use switch on cas->send in each pass to
    factor out common code.
  * longer goto labels, commented at target
  * be more agressive about can't happen:
    throw instead of print + cope.
  * use "select" instead of "selectgo" in errors
  * use printf for debug prints when possible

R=ken2, ken3
CC=golang-dev, r
https://golang.org/cl/875041
2010-04-01 11:56:18 -07:00
Russ Cox
63e878a750 runtime: make type assertion a runtime.Error, the first of many
R=r
CC=golang-dev
https://golang.org/cl/805043
2010-03-31 15:55:10 -07:00
Russ Cox
b6ad074efc test for panic and recover
R=r, adg
CC=golang-dev
https://golang.org/cl/869041
2010-03-31 11:47:09 -07:00
Russ Cox
9b1507b050 gc: implement panic and recover
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/831042
2010-03-31 11:46:01 -07:00
Russ Cox
c7122a3c58 simplify various code using new map index rule
R=r
CC=golang-dev
https://golang.org/cl/833044
2010-03-30 10:51:11 -07:00
Russ Cox
00f9f0c056 single argument panic
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.

stop on error in doc/progs/run

R=r
CC=golang-dev
https://golang.org/cl/850041
2010-03-30 10:34:57 -07:00
Russ Cox
3908c16ffe gc: bug265
Fixes #700.

R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Robert Griesemer
71f5fa3111 bug265: test case for issue 700
( http://code.google.com/p/go/issues/detail?id=700 )

R=r
CC=golang-dev
https://golang.org/cl/827042
2010-03-29 10:34:16 -07:00
Dean Prichard
55b145e32a arm: fix build
R=rsc
CC=golang-dev
https://golang.org/cl/800041
2010-03-26 23:27:24 -07:00
Russ Cox
97d0e8fe6c gc: allow taking address of out parameters
Fixes #186.

R=ken2
CC=golang-dev
https://golang.org/cl/793041
2010-03-26 18:01:02 -07:00
Russ Cox
4e28cfe970 runtime: run all finalizers in a single goroutine.
eliminate second pass of mark+sweep
by scanning finalizer table specially.

R=r
CC=golang-dev
https://golang.org/cl/782041
2010-03-26 14:15:30 -07:00
Rob Pike
c93273c0f5 bug264 didn't report BUG correctly, caused "fail" from test/run
R=rsc, gri
CC=golang-dev
https://golang.org/cl/762041
2010-03-25 14:27:24 -07:00
Russ Cox
78c27ed650 gc: more syntax errors
R=r
CC=golang-dev
https://golang.org/cl/731041
2010-03-25 12:47:43 -07:00
Robert Griesemer
a291e998c1 bug264: test case for issue 692
R=r
CC=golang-dev
https://golang.org/cl/715042
2010-03-25 10:01:51 -07:00
Dean Prichard
e1fa05f59e arm: disable some problematic tests
test/64bit.go:  segfaults on sheevaplug(armv5)

The following have long runtimes when GC is on.
Sample run time in seconds for android emulator
and sheevaplug
test/stack.go:          4934s   1780s
test/ken/chan.go:        860s    296s
test/gc1.go:             218s     69s

R=rsc, kaib
CC=golang-dev
https://golang.org/cl/749041
2010-03-25 00:23:07 -07:00