Commit Graph

917 Commits

Author SHA1 Message Date
Robert Griesemer
a947d0d0c1 test case for issue 471
R=iant
CC=golang-dev
https://golang.org/cl/183084
2009-12-29 14:01:09 -08:00
Ian Lance Taylor
939bab606a Add a test for issue 337.
gccgo currently miscompiles this test.

R=rsc
CC=golang-dev
https://golang.org/cl/181050
2009-12-23 22:08:27 -08:00
Ian Lance Taylor
fa98cf6eef More evaluation order tests, for global variables and switch.
gccgo currently fails this test.

R=rsc
CC=golang-dev
https://golang.org/cl/179108
2009-12-18 21:59:47 -08:00
Russ Cox
0d668259dc gc: method expressions on concrete types
R=ken2
https://golang.org/cl/180092
2009-12-18 17:24:58 -08:00
Adam Langley
50d6c81d4a runtime: fix race condition
(Thanks to ken and rsc for pointing this out)

rsc:
	ken pointed out that there's a race in the new
	one-lock-per-channel code.  the issue is that
	if one goroutine has gone to sleep doing

	select {
	case <-c1:
	case <-c2:
	}

	and then two more goroutines try to send
	on c1 and c2 simultaneously, the way that
	the code makes sure only one wins is the
	selgen field manipulation in dequeue:

	       // if sgp is stale, ignore it
	       if(sgp->selgen != sgp->g->selgen) {
		       //prints("INVALID PSEUDOG POINTER\n");
		       freesg(c, sgp);
		       goto loop;
	       }

	       // invalidate any others
	       sgp->g->selgen++;

	but because the global lock is gone both
	goroutines will be fiddling with sgp->g->selgen
	at the same time.

This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.

Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.

R=rsc
CC=golang-dev
https://golang.org/cl/180068
2009-12-18 12:25:53 -08:00
Russ Cox
6a4b2492b3 gc: fix compiler crash
R=ken2
CC=dho
https://golang.org/cl/179097
2009-12-17 15:08:55 -08:00
Russ Cox
d16bc7a9f2 runtime: return zero value in x, ok = <-c when ok == false
Fixes #401.

R=ken2
https://golang.org/cl/180053
2009-12-15 16:59:23 -08:00
Russ Cox
c715b58dad gc: fix import name resolution
Fixes #403.

R=ken2
https://golang.org/cl/180052
2009-12-15 16:44:28 -08:00
Russ Cox
5d754bfaea gc: bug fixes.
* better error for lookup of unexported field
  * do not assign "ideal string" type to typed string literal
  * do not confuse methods and fields during interface check

Fixes #410.
Fixes #411.
Fixes #426.

R=ken2
https://golang.org/cl/179069
2009-12-15 16:22:04 -08:00
Russ Cox
101f499fa5 gc: allow ... in method lists
R=ken2
https://golang.org/cl/179070
2009-12-15 16:20:37 -08:00
Robert Griesemer
45ca9f7a9e 1) Change default gofmt default settings for
parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

5th and last set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180050
2009-12-15 15:41:46 -08:00
Russ Cox
d122bb2193 gc: double-check usage of ...
Fixes #423.

R=ken2
https://golang.org/cl/180045
2009-12-15 14:26:50 -08:00
Russ Cox
0282cc5e74 gc: var x, ok = m[y]
Fixes #384.

R=ken2
https://golang.org/cl/179061
2009-12-15 14:26:33 -08:00
Ian Lance Taylor
84e7cb0611 Tweak test to work with both 6g and gccgo.
Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.

6g:
bug215.go:12: invalid recursive type A

gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’

R=rsc
https://golang.org/cl/180044
2009-12-15 13:57:24 -08:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -08:00
Robert Griesemer
9bf0aab938 trailing comma's are not accepted with current syntax
R=rsc, ken2
https://golang.org/cl/174047
2009-12-10 13:14:44 -08:00
Russ Cox
b301351df9 test/fixedbug: drop obsolete bug125, bug166
R=gri
CC=golang-dev
https://golang.org/cl/173044
2009-12-10 12:54:30 -08:00
Robert Griesemer
581530e441 make test/ken safe for optional semis
R=rsc, ken2, ken3
https://golang.org/cl/174042
2009-12-10 12:53:23 -08:00
Robert Griesemer
60d4e30dbb make test/fixedbugs save for optional semis
R=rsc
https://golang.org/cl/173045
2009-12-10 11:25:54 -08:00
Robert Griesemer
4d44d6a3d6 missed a couple of files in test
R=rsc, r
https://golang.org/cl/172045
2009-12-09 21:39:20 -08:00
Robert Griesemer
542099d78f making some more non-gofmt'ed files save for new semicolon rule
R=rsc, r
https://golang.org/cl/171051
2009-12-09 19:27:08 -08:00
Robert Griesemer
5f5dcfbc15 - gofmt these files
- remove use of implicit string concatenation
- these appear to be the only files correctly compiling under test
  that used implicit string concatenation

R=rsc
https://golang.org/cl/172043
2009-12-09 16:55:03 -08:00
Russ Cox
86c0c54d27 test/bench: faster fasta (mostly due to bufio fix)
R=r
https://golang.org/cl/165083
2009-12-07 19:39:09 -08:00
Roger Peppe
ea98e4b5e9 changes necessary to get the new chameneosredux onto shootout.alioth.debian.org .
it's now there: http://shootout.alioth.debian.org/u32q/benchmark.php?test=chameneosredux&lang=all&box=1!

R=r, rsc
CC=golang-dev
https://golang.org/cl/167043
2009-12-07 10:06:51 -08:00
Russ Cox
864c6bcbc7 test/bench: use range in reverse-complement
1.9s	gcc reverse-complement.c

reverse-complement.go
4.5s / 3.5s	original, with/without bounds checks
3.5s / 3.3s	bounds check reduction
3.3s / 2.8s	smarter garbage collector
2.6s / 2.3s	assembler bytes.IndexByte
2.5s / 2.1s	even smarter garbage collector
2.3s / 2.1s	fix optimizer unnecessary spill bug
2.0s / 1.9s	change loop to range (this CL)

R=r
https://golang.org/cl/166072
2009-12-04 21:44:29 -08:00
Russ Cox
e2b23e42a8 test/bench: dead code in reverse-complement
R=r
https://golang.org/cl/165065
2009-12-04 19:25:25 -08:00
Russ Cox
609eeee817 make Native Client support build again,
add README explaining how to try the
web demos.

Fixes #339.

R=r
CC=barry.d.silverman, bss, vadim
https://golang.org/cl/165057
2009-12-04 10:11:32 -08:00
Russ Cox
9da6666a8a gc: check for assignment to private fields during initialization
R=ken2
https://golang.org/cl/165055
2009-12-03 22:09:58 -08:00
Russ Cox
c6e316a4b9 gc: handle _ = <-c in select.
Fixes #238.

R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
05a1eb1ab0 gc: recursive type error
Fixes #245.

R=ken2
https://golang.org/cl/164094
2009-12-03 01:12:02 -08:00
Russ Cox
41861a8812 gc: better diagnosis of initialization loops
Fixes bug 292.

R=ken2
https://golang.org/cl/164093
2009-12-03 00:51:03 -08:00
Russ Cox
e733766dda gc: minor import grammar bug fixes
Fixes #364.

R=ken2
https://golang.org/cl/164092
2009-12-03 00:10:32 -08:00
Russ Cox
272d156357 gc: function argument ordering bug
Fixes #370.

R=ken2
https://golang.org/cl/163097
2009-12-02 23:54:51 -08:00
Rob Pike
b0683bd77a move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes.

R=rsc
CC=golang-dev
https://golang.org/cl/163085
2009-12-02 22:02:14 -08:00
Roger Peppe
99d0c3d85d change command-line argument to be
unnamed, not require -n, in line with other
entries.

R=rsc
CC=r
https://golang.org/cl/162061
2009-11-30 15:16:40 -08:00
Sergey 'SnakE' Gromov
842d69b03d Make tests run on systems missing time utility
R=rsc
CC=golang-dev
https://golang.org/cl/164047
2009-11-30 15:07:57 -08:00
Russ Cox
b7c4314ecb gc: correct type check for x, ok map assignment
Fixes #288.

R=ken2
https://golang.org/cl/157162
2009-11-24 16:11:48 -08:00
Rob Pike
eb33c0bb35 timing log update for new version of chameneos
R=rsc
CC=golang-dev, rog
https://golang.org/cl/160054
2009-11-24 14:19:43 -08:00
Robert Griesemer
001a8b11ff Change to container/vector interface:
- removed New(len int) in favor of new(Vector).Resize(len, cap)
- removed Init(len int) in favor of Resize(len, cap)
- runs all.bash

Fixes #294.

R=rsc, r, r1
https://golang.org/cl/157143
2009-11-24 13:43:18 -08:00
Roger Peppe
9f17353250 chameneosredux test modified, bug fixed, faster
based on suggestion from arvindht@gmail.com

R=r, rsc, r1
https://golang.org/cl/157091
2009-11-24 11:45:30 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
19dae0799b gofmt -r 'α[β:len(α)] -> α[β:]' -w test/bench
except chameneosredux which i know is being edited

require gofmt for test/bench

R=r
https://golang.org/cl/157110
2009-11-20 13:11:42 -08:00
Russ Cox
aa4c638b7b x[y:] for strings
R=ken2
https://golang.org/cl/157114
2009-11-20 11:42:28 -08:00
Russ Cox
652f55672d x[lo:] - gc and runtime.
* add runtime sliceslice1 for x[lo:]
  * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
  * port cgen_inline into 8g, 5g.
  * use native memmove in maps

R=ken2
https://golang.org/cl/157106
2009-11-20 09:11:46 -08:00
Russ Cox
688ffc1dc1 test/bench revisions;
* reverse-complement: port C algorithm to Go
	saves 30% on my MacBook Pro and makes it a fairer comparison.
  * test reverse-complement with and without GC (another 15%)
  * revise timing.sh to work on more systems
  * avoid two glibcisms in fasta.c

R=r
https://golang.org/cl/156110
2009-11-20 08:59:11 -08:00
Robert Griesemer
5fd4f76802 bug219: parsing difficulties with 6g
R=r, rsc
https://golang.org/cl/157085
2009-11-19 00:04:30 -08:00
Rob Pike
9682ee4e04 - flip in and out to exercise overlap check a little (could do better)
- actually test the results

R=rsc, ken2
CC=golang-dev
https://golang.org/cl/156094
2009-11-18 22:26:36 -08:00
Rob Pike
797cc4904c test for copy()
R=rsc, ken2
CC=golang-dev
https://golang.org/cl/156084
2009-11-18 15:31:22 -08:00
Rob Pike
e70cedfaec remove bytes.Copy
replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Robert Griesemer
3c5dbb036b bug218.go: testcase for issue 238
R=rsc
https://golang.org/cl/154172
2009-11-16 17:53:39 -08:00
Russ Cox
ef46a9ddac gc: fix up floating point NaN comparisons
Fixes #167.

R=ken2
https://golang.org/cl/155062
2009-11-15 17:24:14 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Kai Backman
8e5854ae17 make arm pass match what's working on real hardware
R=rsc
https://golang.org/cl/154097
2009-11-14 20:08:22 -08:00
Russ Cox
98811f41b8 test/interface/receiver.go: expand to do dynamic
versions of static checks in receiver1.go

R=r
https://golang.org/cl/155045
2009-11-14 19:28:13 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Rob Pike
0263103a05 move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.

Fixes #110.

R=rsc
CC=golang-dev
https://golang.org/cl/152131
2009-11-14 12:23:24 -08:00
Russ Cox
662ee8704c test/run: use bash, not sh.
use bash builtin time instead of
assuming /usr/bin/time exists.

R=r
https://golang.org/cl/152124
2009-11-13 13:10:53 -08:00
Russ Cox
f3a97293b1 test/run: unset GREP_OPTIONS
Fixes #116.

R=r
https://golang.org/cl/152106
2009-11-12 14:55:26 -08:00
Russ Cox
da776791c4 drop output from nilptr tests;
too hard to make it the same everywhere.
still checking for non-zero exit status though.

disable core files while running tests

R=r
http://go/go-review/1026037
2009-11-09 23:11:36 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Rob Pike
ceb6031ecd delete TODO now that compiler is better at %
adjust an inconsistency in reflect/type.go's package comment

R=rsc
http://go/go-review/1026029
2009-11-08 20:45:39 -08:00
Kai Backman
52c549fc9b make 5g executables run on android/arm hardware. change OABI
usage to EABI.

        go/test: passes 85% (296/347) on random android phone.

R=rsc
http://go/go-review/1024003
2009-11-05 22:53:08 -08:00
Ian Lance Taylor
2f1d6a5d91 Cleaned up gccgo error messages require minor adjustment to
test.

const1.go:27: error: integer constant overflow
const1.go:29: error: integer constant overflow
const1.go:30: error: integer constant overflow
const1.go:31: error: integer constant overflow
const1.go:32: error: integer constant overflow
const1.go:33: error: integer constant overflow
const1.go:33: error: integer constant overflow
const1.go:34: error: integer constant overflow
const1.go:37: error: integer constant overflow
const1.go:38: error: integer constant overflow
const1.go:40: error: integer constant overflow
const1.go:41: error: integer constant overflow
const1.go:43: error: integer constant overflow
const1.go:44: error: integer constant overflow
const1.go:45: error: integer constant overflow
const1.go:48: error: integer constant overflow
const1.go:50: error: integer constant overflow
const1.go:51: error: integer constant overflow
const1.go:52: error: integer constant overflow
const1.go:53: error: integer constant overflow
const1.go:55: error: integer constant overflow
const1.go:56: error: division by zero
const1.go:59: error: floating point constant overflow
const1.go:61: error: floating point constant overflow
const1.go:62: error: division by zero
const1.go:47: error: integer constant overflow
const1.go:49: error: integer constant overflow
const1.go:60: error: floating point constant overflow
const1.go:68: error: argument 1 has incompatible type (cannot use type int8 as type int)
const1.go:69: error: argument 1 has incompatible type (cannot use type int8 as type int)
const1.go:70: error: argument 1 has incompatible type (cannot use type uint8 as type int)
const1.go:72: error: argument 1 has incompatible type (cannot use type float32 as type int)
const1.go:73: error: argument 1 has incompatible type (cannot use type float as type int)
const1.go:74: error: floating point constant truncated to integer
const1.go:76: error: argument 1 has incompatible type (cannot use type float64 as type int)
const1.go:77: error: argument 1 has incompatible type
const1.go:78: error: argument 1 has incompatible type

R=rsc
http://go/go-review/1022001
2009-11-05 16:04:45 -08:00
Ian Lance Taylor
74a52ee75f Set LANG to control sorting. This affects the order in which
tests are processed, and thus the run.out output.  The default
LANG on Fedora 10, en_US.utf8, causes the tests to be sorted
differently--e.g., arrayindex1.go and arrayindex.go are sorted
in the opposite order.

R=r, rsc
http://go/go-review/1018022
2009-11-02 13:17:12 -08:00
Ian Lance Taylor
6358cac7d8 We should not silently permit a named type to match an unnamed
type.  This is OK in a conversion but not in an assignment.

R=rsc
http://go/go-review/1016024
2009-11-02 11:58:47 -08:00
Rob Pike
a82465103f use the new routine regexp.MustCompile to clean up some code that uses global regexps.
R=rsc, gri
CC=go-dev
http://go/go-review/1016025
2009-11-02 11:37:52 -08:00
Ian Lance Taylor
102357f028 Recognize gccgo error message.
runtime.go:19:10: error: reference to undefined identifier ‘runtime.printbool’

R=rsc
http://go/go-review/1018018
2009-11-02 10:12:40 -08:00
Robert Griesemer
e6f85af2bb cleaning up bug132
R=rsc
http://go/go-review/1017012
2009-11-02 09:42:53 -08:00
Russ Cox
9dd2e1e30f nil pointer checks in 8g.
fix nil pointer check in 6g.
was dereferencing after the ADD;
dereference before instead.

R=ken@golang.org
CC=iant
http://go/go-review/1016022
2009-11-01 21:04:16 -08:00
Kai Backman
770b872752 clone and futex
go/test: passes 99% (343/347)

R=rsc
http://go/go-review/1016004
2009-10-29 21:21:14 -07:00
Ian Lance Taylor
f305d04943 Bug: 6g accepts fallthrough in type switch.
R=r
CC=go-dev
http://go/go-review/1016006
2009-10-29 15:41:02 -07:00
Ian Lance Taylor
eb63c3fec4 Test that the compiler rejects map types which should not be
compatible.

R=rsc
CC=go-dev
http://go/go-review/1018001
2009-10-28 17:09:24 -07:00
Ian Lance Taylor
5e6194cc1b Recognize gccgo error messages.
rename1.go:10:8: error: expected type
rename1.go:11:10: error: expected function
rename1.go:13:8: error: incompatible types in binary expression

R=rsc
http://go/go-review/1015013
2009-10-26 16:06:46 -07:00
Kai Backman
dfeceddd3f make 5l ignore multiple defs, remove use of multiple
defs from embed1 and gotest

R=rsc
http://go/go-review/1014009
2009-10-25 11:59:58 -07:00
Kai Backman
68d5c51287 fix conditional branch instructions for unsigned ints and
float. fix sgen endianess in sgen character copying.

        go/test: passes 97% (336/345)

R=rsc
http://go/go-review/1015007
2009-10-24 22:47:25 -07:00
Kai Backman
f860bc0f4e fixed len/cap for chan. disable gc for now.
go/test: passes 93% (323/345)

R=rsc
http://go/go-review/1015006
2009-10-23 20:31:03 -07:00
Kai Backman
942d6590d9 one more argsize fix. we were copying with the correct
alignment but not enough (duh).

R=rsc
APPROVED=rsc
DELTA=16  (13 added, 0 deleted, 3 changed)
OCL=36020
CL=36024
2009-10-23 11:03:16 -07:00
Russ Cox
219fb02042 fix build after Mercurial move.
various missing or incorrect files.

R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -07:00
Ian Lance Taylor
d7ad3c4e86 Match gccgo error messages.
bug205.go:14:12: error: index must be integer
bug205.go:15:12: error: index must be integer
bug205.go:16:12: error: incompatible type for map index

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35957
CL=35960
2009-10-21 11:42:09 -07:00
Ian Lance Taylor
fbba532fa0 gccgo does not distinguish "use" and "assign" in these error
messages.  Match gccgo output.

named1.go:32:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:33:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:35:5: error: incompatible type for map index (cannot use type bool as type Bool)
named1.go:36:12: error: incompatible type for map assignment (cannot use type Bool as type bool)
named1.go:38:5: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:40:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:42:5: error: incompatible type for receive (cannot use type bool as type Bool)
named1.go:46:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:50:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:53:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:54:5: error: incompatible types in assignment (cannot use type bool as type Bool)

R=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=35943
CL=35943
2009-10-20 23:11:00 -07:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
02fd255a14 bug162, over and over
R=ken
OCL=35919
CL=35919
2009-10-20 08:03:43 -07:00
Russ Cox
d6b64f273f forgot to include in 35898.
R=ken
OCL=35917
CL=35917
2009-10-20 06:44:50 -07:00
Kai Backman
dde4090372 removed tempalloc/tempfree and replaced with tempname
go/test: passes 88% (304/345)

R=rsc
APPROVED=rsc
DELTA=67  (3 added, 54 deleted, 10 changed)
OCL=35910
CL=35910
2009-10-19 22:47:25 -07:00
Kai Backman
33a7bcf315 getcallerpc and setcallerpc
go/test: passes 87% (303/345)

R=rsc
APPROVED=rsc
DELTA=19  (5 added, 6 deleted, 8 changed)
OCL=35903
CL=35906
2009-10-19 21:58:16 -07:00
Russ Cox
a15648658f bug196
R=ken
OCL=35905
CL=35905
2009-10-19 21:10:29 -07:00
Russ Cox
62c4818ee0 bug136
R=ken
OCL=35902
CL=35904
2009-10-19 20:39:18 -07:00
Kai Backman
a15aa05ae2 first version of closures. test/closure doesn't yet pass.
go/test: passes 87% (300/343)

R=rsc
APPROVED=rsc
DELTA=125  (125 added, 0 deleted, 0 changed)
OCL=35893
CL=35900
2009-10-19 19:59:39 -07:00
Russ Cox
1be74762c1 bug169
R=ken
OCL=35899
CL=35899
2009-10-19 19:55:17 -07:00
Russ Cox
4c3a85d73a 6g bug fixes:
* bug211
 * embedded interfaces with lowercase methods
 * var _ = f() at top level

R=ken
OCL=35898
CL=35898
2009-10-19 19:27:40 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Russ Cox
4db52d4ff8 duplicate of bug190
R=gri
DELTA=16  (0 added, 16 deleted, 0 changed)
OCL=35892
CL=35895
2009-10-19 18:46:46 -07:00
Kai Backman
b4896b496e function literals
go/test: passes 86% (297/343)

R=rsc
APPROVED=rsc
DELTA=14  (10 added, 1 deleted, 3 changed)
OCL=35881
CL=35884
2009-10-19 12:44:08 -07:00
Rob Pike
36ccbbdfc6 fiddling while rome burns: explain why tests are commented out
R=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=35874
CL=35880
2009-10-19 11:54:59 -07:00
Rob Pike
e32883df01 bug 211: duplicate interface methods not caught by 6g
R=gri
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=35852
CL=35876
2009-10-19 11:47:42 -07:00
Robert Griesemer
b0dcc6b9a4 bug210
R=rsc
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=35847
CL=35847
2009-10-16 13:31:35 -07:00
Russ Cox
22a5c78f44 rename sys functions to runtime,
because they are in package runtime.

another step to enforcing package boundaries.

R=r
DELTA=732  (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
2009-10-15 23:10:49 -07:00
Kai Backman
545dbd810c fix OINDEX address generation, leftover misunderstanding about
how scale works on amd64/386

go/test: passes 85% (294/342)

R=rsc
APPROVED=rsc
DELTA=27  (26 added, 1 deleted, 0 changed)
OCL=35815
CL=35818
2009-10-15 22:16:31 -07:00
Russ Cox
4e4097d9d9 386 shift bug; wasn't zero-extending 16- and 8-bit counts
+test

R=ken
OCL=35801
CL=35801
2009-10-15 16:32:45 -07:00
Kai Backman
c7f837be00 disable ken/complit for arm
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=35753
CL=35755
2009-10-14 21:46:50 -07:00
Rob Pike
f6d67c9e95 write stack traces and panics to stderr
R=rsc
DELTA=31  (5 added, 3 deleted, 23 changed)
OCL=35700
CL=35700
2009-10-13 22:48:03 -07:00
Kai Backman
101f7cbd61 changed 5c 64 bit word ordering to little endian so it matches
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.

go/test: passes 83% (287/342)

R=rsc
APPROVED=rsc
DELTA=156  (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
2009-10-12 13:35:28 -07:00
Russ Cox
2372408189 sort errors by line number
turn off testdclstack and "not used" errors
when there are syntax errors.

BUG=2181825
R=ken
OCL=35606
CL=35608
2009-10-12 11:03:48 -07:00
Russ Cox
867e10f241 fix build
TBR=r
OCL=35592
CL=35592
2009-10-11 23:38:44 -07:00
Kai Backman
6d0983ae46 64bit and float code generation. fmt compiles but
reflect is broken so fmt doesn't work.

go/test: passes 83% (285/342)

R=rsc
APPROVED=rsc
DELTA=415  (240 added, 29 deleted, 146 changed)
OCL=35576
CL=35588
2009-10-11 20:01:11 -07:00
Russ Cox
7b5da358ca handle compiler crash better:
need to use exec to avoid seeing
shell output about the crash.

R=iant
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=35542
CL=35560
2009-10-09 16:44:40 -07:00
Russ Cox
c736b6579f bug209
R=ken
OCL=35546
CL=35546
2009-10-09 16:01:32 -07:00
Robert Griesemer
d5c4142758 bug209.go
R=rsc
DELTA=23  (22 added, 1 deleted, 0 changed)
OCL=35529
CL=35537
2009-10-09 15:28:09 -07:00
Russ Cox
ebd27d62fd time tests; sort -nr times.out | sed 10q is illuminating.
cut the slowest tests  down from a few seconds
to under half a second.

R=r
DELTA=21  (6 added, 1 deleted, 14 changed)
OCL=35509
CL=35519
2009-10-09 11:18:32 -07:00
Russ Cox
f0bde7c51b fix nacl build
R=r
DELTA=23  (5 added, 0 deleted, 18 changed)
OCL=35510
CL=35518
2009-10-09 11:15:19 -07:00
Kai Backman
6084dcdd07 floating point calc, added a few more packages that pass
go/test: passes 80% (274/340)

R=rsc
APPROVED=rsc
DELTA=61  (59 added, 0 deleted, 2 changed)
OCL=35506
CL=35517
2009-10-09 07:37:49 -07:00
Russ Cox
d8b461dfca rewrite errchk in perl for speed (compared to bash)
R=iant
DELTA=125  (51 added, 53 deleted, 21 changed)
OCL=35508
CL=35511
2009-10-09 00:39:32 -07:00
Russ Cox
680ee6af63 add & fix bug208, from ken.
fix bug198.

R=ken
OCL=35504
CL=35507
2009-10-08 23:03:34 -07:00
Russ Cox
55edf49a01 add & fix bug207: rewritten if condition
was discarding initialization work.

R=ken
OCL=35454
CL=35457
2009-10-07 22:19:42 -07:00
Kai Backman
116beb2653 - moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)
- 64 bit OMINUS
- added bunch of missing arm syscalls

R=rsc
APPROVED=rsc
DELTA=203  (189 added, 3 deleted, 11 changed)
OCL=35412
CL=35414
2009-10-06 16:39:38 -07:00
Kai Backman
5afce0ca85 64 bit cmp and some sgen tweaks
go/test: passes 75% (256/339)

R=rsc
APPROVED=rsc
DELTA=142  (53 added, 4 deleted, 85 changed)
OCL=35367
CL=35375
2009-10-06 09:47:46 -07:00
Kai Backman
b691447207 fix arm test to actual return success/fail and expose runcgo
build breakage.

R=rsc
APPROVED=rsc
DELTA=10  (4 added, 2 deleted, 4 changed)
OCL=35362
CL=35365
2009-10-05 21:51:34 -07:00
Russ Cox
11d3805579 clean more
R=r
DELTA=40  (9 added, 3 deleted, 28 changed)
OCL=35277
CL=35305
2009-10-03 10:38:03 -07:00
Kai Backman
3e5a817d07 a few more code generation bugs and an interface alignment issue.
go/test: passes 74% (251/339)

R=rsc
APPROVED=rsc
DELTA=40  (34 added, 0 deleted, 6 changed)
OCL=35254
CL=35275
2009-10-02 09:06:51 -07:00
Kai Backman
57f834aeff generate float registers correctly.
go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243
2009-10-01 13:52:55 -07:00
Kai Backman
8fd53f4754 cgen_asop sudoaddable
R=rsc
APPROVED=rsc
DELTA=14  (4 added, 0 deleted, 10 changed)
OCL=35190
CL=35210
2009-10-01 06:50:59 -07:00
Kai Backman
a1b4796394 fixed a few calls to gcmp and some really bothched OINDEX code
(how did that happen?)

go/test: passes 70% (238/339)

R=rsc
APPROVED=rsc
DELTA=18  (10 added, 0 deleted, 8 changed)
OCL=35185
CL=35188
2009-09-30 18:56:37 -07:00
Kai Backman
399d23d4f4 load binary op arguments into registers
go/test: passes 69% (237/339)

R=rsc
APPROVED=rsc
DELTA=12  (3 added, 9 deleted, 0 changed)
OCL=35178
CL=35180
2009-09-30 14:28:18 -07:00
Russ Cox
6f1698774d undo 35108 (disallow parens around type in struct literal).
allow parens around [...]int in struct literal.

R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Kai Backman
187cc1eb49 fix munging of pointer.
go/test: passes 69% (235/339)

R=rsc
APPROVED=rsc
DELTA=5  (4 added, 1 deleted, 0 changed)
OCL=35107
CL=35109
2009-09-29 16:07:59 -07:00
Russ Cox
9c3c140984 disallow parens around type in struct literal syntax,
per discussion with gri.

R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Kai Backman
8ccf8240f4 fixed alignment issue resulting from confusion around the
meaning of out args.

go/test: passes 68% (231/339)

R=rsc
APPROVED=rsc
DELTA=13  (7 added, 0 deleted, 6 changed)
OCL=35072
CL=35080
2009-09-29 07:27:49 -07:00
Kai Backman
24bfaaf07a - added gcmp for proper ACMP generation, changed all call
sites plus optimized constant code a bit (one less register
  used).
- changed conditional branches, might need a re-tweak later
- gave up on agen OINDEX and copied/fixed the version in 8g

go/test: passes 66% (225/339)

R=rsc
APPROVED=rsc
DELTA=148  (67 added, 32 deleted, 49 changed)
OCL=35040
CL=35055
2009-09-28 15:40:13 -07:00
Russ Cox
7743ffead4 disallow interface { x, y() }
R=ken
OCL=35042
CL=35044
2009-09-28 14:05:34 -07:00
Russ Cox
78ebe2b392 test: comparisons have type bool
R=r
DELTA=81  (57 added, 24 deleted, 0 changed)
OCL=34991
CL=34996
2009-09-24 17:54:47 -07:00
Rob Pike
f448057b8a Sqrt in assembler is worth 3-4X for nbody
R=rsc
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=34987
CL=34987
2009-09-24 14:47:34 -07:00
Russ Cox
285b6021e9 missing files; cleaned up g4 nothave output.
fixes 386 build.

R=r
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34979
CL=34981
2009-09-24 13:38:18 -07:00
Russ Cox
567673fc42 nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
2009-09-22 16:56:28 -07:00
Rob Pike
b9493ded12 updated numbers after more slice inlining
R=rsc
DELTA=57  (57 added, 0 deleted, 0 changed)
OCL=34896
CL=34901
2009-09-22 14:13:40 -07:00
Kai Backman
8ce5f6e14a fix bad code generation.
go/test: passes 64% (215/337) tests

metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.

R=rsc
APPROVED=rsc
DELTA=228  (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899
2009-09-22 13:13:23 -07:00
Russ Cox
ce46cbe89e test of named operations
R=r
DELTA=305  (305 added, 0 deleted, 0 changed)
OCL=34848
CL=34875
2009-09-21 22:45:19 -07:00
Russ Cox
f0536598b1 fix build
R=kaib
OCL=34823
CL=34823
2009-09-18 21:17:16 -07:00
Kai Backman
e4eaf4c24e expanded arm regression testing. will go away once 5g is compliant
R=rsc
APPROVED=rsc
DELTA=300  (297 added, 0 deleted, 3 changed)
OCL=34813
CL=34821
2009-09-18 19:09:29 -07:00
Kai Backman
1c71ab1808 added emulator support for arm.
R=rsc
APPROVED=rsc
DELTA=7  (3 added, 0 deleted, 4 changed)
OCL=34661
CL=34820
2009-09-18 19:09:12 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
ae54cf73ca last round: non-package code
R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
2009-09-15 12:42:24 -07:00
Russ Cox
1a3198907b fix "declared and not used" in tests;
also template/template.go, missed last time.

R=r
DELTA=116  (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
28eba4877b fix "declared and not used" errors in non-test code.
R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Rob Pike
5e11bb259b add tests for the func()() case
R=gri
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601
2009-09-14 13:09:53 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Russ Cox
757fe32fe7 fix bug206 output on different platforms
TBR=r
OCL=34524
CL=34524
2009-09-10 13:43:15 -07:00
Robert Griesemer
82540ebdf0 bug206
R=rsc
DELTA=51  (51 added, 0 deleted, 0 changed)
OCL=34516
CL=34516
2009-09-10 10:30:36 -07:00
Russ Cox
aa6e81dd71 a few more blank tests
R=ken
OCL=34500
CL=34500
2009-09-09 16:59:41 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00