Rob Pike
fbfc9dddb2
update tests: nil is no longer integer-compatible
...
R=rsc
DELTA=56 (17 added, 32 deleted, 7 changed)
OCL=20876
CL=20916
2008-12-10 13:55:47 -08:00
Russ Cox
3935610e35
chans and maps of interfaces
...
R=r
DELTA=746 (729 added, 1 deleted, 16 changed)
OCL=20858
CL=20858
2008-12-09 16:16:07 -08:00
Ian Lance Taylor
48e5110151
Tweak comments so that this test passes with gccgo.
...
bug126.go:7:7: error: redefinition of 'none'
bug126.go:6:7: note: previous definition of 'none' was here
R=gri
DELTA=3 (1 added, 0 deleted, 2 changed)
OCL=20563
CL=20723
2008-12-08 11:31:55 -08:00
Ken Thompson
26b357ca5b
range statement
...
R=r
OCL=20667
CL=20667
2008-12-05 18:24:05 -08:00
Rob Pike
2fe97c336d
test pairwise iota assignment
...
R=rsc
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=20638
CL=20641
2008-12-05 15:37:09 -08:00
Ian Lance Taylor
cc352e5c1c
The DejaGNU testsuite harness used by the gccgo testsuite is
...
broken if you give it something which matches everything--the
.* swallows all the error messages. Recognize some reasonable
error text directly.
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=20564
CL=20595
2008-12-05 10:20:34 -08:00
Rob Pike
94a66489ed
bug128 is fixed
...
R=rsc
DELTA=43 (19 added, 24 deleted, 0 changed)
OCL=20551
CL=20551
2008-12-04 20:51:47 -08:00
Russ Cox
dfa5893d4f
preparation for exec.
...
* syscall:
add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall
add syscall.dup2
add syscall.BytePtrPtr
add syscall.Rusage, RusagePtr
add syscall.F_GETFD, F_SETFD, FD_CLOEXEC
* runtime:
clean up, correct signal handling.
can now survive (continue running after) a signal.
R=r
DELTA=394 (286 added, 51 deleted, 57 changed)
OCL=20351
CL=20369
2008-12-03 14:21:28 -08:00
Russ Cox
98431dbfff
golden.out drift
...
TBR=r
OCL=20352
CL=20355
2008-12-03 13:05:56 -08:00
Robert Griesemer
4d76e8e142
- bug: empty switches don't compile
...
R=rsc
DELTA=32 (28 added, 3 deleted, 1 changed)
OCL=20301
CL=20340
2008-12-03 10:41:43 -08:00
Russ Cox
1e1a3c5054
6g gives no error on "0 != nil"
...
R=ken
OCL=20289
CL=20289
2008-12-02 16:35:00 -08:00
Robert Griesemer
b0192ea1a5
bug: constants should not be redeclarable
...
R=rsc
DELTA=9 (9 added, 0 deleted, 0 changed)
OCL=20187
CL=20187
2008-12-01 17:27:57 -08:00
Russ Cox
efc86a74e4
change meaning of $GOMAXPROCS to number of cpus to use,
...
not number of threads. can still starve all the other threads,
but only by looping, not by waiting in a system call.
fix darwin syscall.Syscall6 bug.
fix chanclient bug.
delete $GOMAXPROCS from network tests.
add stripped down printf, sys.printhex to runtime.
R=r
DELTA=355 (217 added, 36 deleted, 102 changed)
OCL=20017
CL=20019
2008-11-25 16:48:10 -08:00
Rob Pike
3489fe958e
compiler catches out of bounds; work around
...
R=ken
OCL=19943
CL=19943
2008-11-24 16:23:49 -08:00
Russ Cox
0f83fa3a0c
convert tests.
...
refine gotest's test selection criteria.
R=r
DELTA=1590 (745 added, 844 deleted, 1 changed)
OCL=19903
CL=19936
2008-11-24 15:17:47 -08:00
Russ Cox
387df5e176
replay CL 19916 and CL 19913 now that the build can handle them
...
TBR=r
OCL=19924
CL=19934
2008-11-24 14:51:33 -08:00
Russ Cox
85fea81d70
Automated g4 rollback of changelist 19916.
...
*** Reason for rollback ***
broke build
*** Original change description ***
utf8: add InString routines for decoding in strings
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
TBR=r
OCL=19920
CL=19920
2008-11-24 13:24:15 -08:00
Russ Cox
b65a930453
utf8: add InString routines for decoding in strings
...
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
* %q go-quoted " string
* %#q go-quoted ` string if possible, " string otherwise
* %x hexadecimal string
* anywhere a string is okay, *[]byte is okay
* flags # 0 - + space
* print value inside interface, not interface itself
* tests
R=r
DELTA=756 (597 added, 121 deleted, 38 changed)
OCL=19888
CL=19916
2008-11-24 13:04:27 -08:00
Russ Cox
0432a34383
make bignum_test a test
...
R=gri
DELTA=967 (468 added, 499 deleted, 0 changed)
OCL=19906
CL=19912
2008-11-24 12:32:31 -08:00
Rob Pike
375b1e2a0e
output of fmt has changed for %g
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19909
CL=19909
2008-11-24 11:59:23 -08:00
Rob Pike
60db3d6d3f
don't print (incorrect anyway) line numbers in panic.
...
R=rsc
DELTA=4 (0 added, 2 deleted, 2 changed)
OCL=19757
CL=19763
2008-11-20 23:16:31 -08:00
Russ Cox
88daac7862
gotestify & gostylify math.
...
R=r
DELTA=682 (275 added, 301 deleted, 106 changed)
OCL=19638
CL=19642
2008-11-19 16:14:31 -08:00
Robert Griesemer
bef9b1713a
- removed uses of vector in favor of array in a few places
...
- fixed make.bash
R=r
DELTA=21 (1 added, 3 deleted, 17 changed)
OCL=19624
CL=19629
2008-11-19 15:16:20 -08:00
Robert Griesemer
165d78717d
- adjust sort.go to use new naming conventions
...
R=rsc
DELTA=31 (0 added, 0 deleted, 31 changed)
OCL=19618
CL=19620
2008-11-19 14:32:15 -08:00
Russ Cox
6cc001c312
return *os.Error instead of bool from strconv.ato*
...
R=r
DELTA=137 (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522
2008-11-18 17:12:07 -08:00
Ian Lance Taylor
d12c1b99c7
Add ERROR comment for errmsg to look for.
...
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19460
CL=19500
2008-11-18 15:58:43 -08:00
Robert Griesemer
6c5fc055c8
import syntax incorrect
...
R=r
OCL=19457
CL=19457
2008-11-18 09:39:34 -08:00
Russ Cox
c78005f648
update golden.out
...
R=r
OCL=19455
CL=19455
2008-11-18 09:35:42 -08:00
Ian Lance Taylor
d8ecead73d
The compiler should reject calling a const as though it were a
...
function. Also update golden.out.
R=r
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=19433
CL=19448
2008-11-18 06:25:21 -08:00
Ian Lance Taylor
1945cc4c3c
The compiler should reject comparisons between ints and nil.
...
R=gri
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=19434
CL=19436
2008-11-17 21:44:05 -08:00
Robert Griesemer
7692a93173
- new() accepts too many arguments
...
R=r
OCL=19413
CL=19413
2008-11-17 16:46:56 -08:00
Robert Griesemer
d58cd7626e
- interface methods must have full function type
...
R=r
OCL=19410
CL=19410
2008-11-17 16:37:13 -08:00
Russ Cox
a1585b676b
fix the easy parts of bug120
...
R=r,ken
DELTA=66 (52 added, 3 deleted, 11 changed)
OCL=19386
CL=19389
2008-11-17 13:58:45 -08:00
Russ Cox
869c3f4cd0
update golden.out.
...
fix bug in run that was missing output.
make run warn about tests in bugs/ that succeed with no output
(should be moved to fixedbugs/).
R=r
DELTA=21 (18 added, 0 deleted, 3 changed)
OCL=19381
CL=19381
2008-11-17 12:44:22 -08:00
Russ Cox
079c00a475
correctly rounded floating-point conversions
...
in new package strconv.
move atoi etc to strconv too.
update fmt, etc to use strconv.
R=r
DELTA=2232 (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380
2008-11-17 12:34:03 -08:00
Russ Cox
f333f4685c
floating point constant errors in 6g
...
R=r
OCL=19379
CL=19379
2008-11-17 12:33:49 -08:00
Ian Lance Taylor
b1e8b5f5b7
The scope rules have been clarified to indicate that a
...
variable may only be named after the complete declaration,
including the initialization statements.
R=gri
DELTA=61 (16 added, 45 deleted, 0 changed)
OCL=19343
CL=19376
2008-11-17 12:19:02 -08:00
Russ Cox
5aa7dc5daf
adopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
...
to make qsort more robust:
* use "ninther" to choose pivot.
* use three-way partition to avoid quadratic
behavior on all-one-value arrays.
also add tests suggested in that paper.
the immediate cause of the slowness we observed was
in fact none of these: the recursive call was sorting
data[0:m] instead of data[a:m].
also rename package to "sort" to match convention.
R=r,gri
DELTA=358 (255 added, 21 deleted, 82 changed)
OCL=19341
CL=19373
2008-11-17 11:51:34 -08:00
Ian Lance Taylor
7dee51f491
The compilers should and do permit interface types to list
...
multiple method names with a single type.
R=r,gri
DELTA=10 (0 added, 10 deleted, 0 changed)
OCL=19292
CL=19298
2008-11-14 17:28:17 -08:00
Russ Cox
c5f21c0dc2
* 6l:
...
if an object in an archive tries to refer
to a file in its original source directory,
ignore it.
* 6ar:
fix bug if archive is empty.
* gobuild:
build archive in current directory.
* math:
use new gobuild Makefile.
* test/math.go:
rename to mathest.go, add // run line, make it run.
R=r
DELTA=494 (277 added, 203 deleted, 14 changed)
OCL=19090
CL=19171
2008-11-13 13:42:26 -08:00
Ian Lance Taylor
c4d8dc0b83
This bug has been fixed; moving it from bugs to fixedbugs.
...
R=gri
DELTA=36 (18 added, 18 deleted, 0 changed)
OCL=19059
CL=19133
2008-11-12 21:59:43 -08:00
Robert Griesemer
20b9bfb136
wrong code for array access
...
R=r
OCL=19107
CL=19109
2008-11-12 14:57:23 -08:00
Ian Lance Taylor
9c9cc2c9d8
Recognize gccgo error messages. This uses GCCGO_ERROR, which
...
is recognized by the gccgo testsuite but is ignored by the
errchk script used with 6g.
method1.go:7:1: error: redefinition of 'M': parameter types changed
method1.go:6:1: note: previous definition of 'M' was here
method1.go:10:1: error: redefinition of 'f': parameter types changed
method1.go:9:1: note: previous definition of 'f' was here
method1.go:13:1: error: redefinition of 'g': parameter names changed
method1.go:12:1: note: previous definition of 'g' was here
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=18962
CL=19058
2008-11-11 18:18:34 -08:00
Ian Lance Taylor
a957ceec35
The scope rules have been changed to say that labels live in a
...
separate per-function namespace.
R=gri
DELTA=24 (8 added, 16 deleted, 0 changed)
OCL=19006
CL=19057
2008-11-11 18:17:54 -08:00
Ian Lance Taylor
07c54425c0
Remove useless "Trace/breakpoint trap" lines using the format
...
that is generated on Goobuntu.
R=r,rsc
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=18973
CL=18976
2008-11-11 10:01:51 -08:00
Rob Pike
203a17c6ec
update tests
...
R=gri
DELTA=28 (12 added, 14 deleted, 2 changed)
OCL=18923
CL=18923
2008-11-10 14:59:15 -08:00
Ian Lance Taylor
f8d7f5bd81
Don't use a type guard with a type which is not an interface.
...
R=r,gri
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18781
CL=18785
2008-11-07 11:44:15 -08:00
Ian Lance Taylor
d5ba668edd
Test case for evaluation order of select statement.
...
R=r
DELTA=47 (47 added, 0 deleted, 0 changed)
OCL=18581
CL=18748
2008-11-06 22:27:32 -08:00
Ian Lance Taylor
9c7374d71b
Erroneous test case. The break statement should break out of
...
a select clause.
R=ken
DELTA=20 (0 added, 20 deleted, 0 changed)
OCL=18731
CL=18739
2008-11-06 17:39:48 -08:00
Rob Pike
175dd773e6
simpleminded ascii to floating point conversion
...
R=rsc
DELTA=111 (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725
2008-11-06 16:32:28 -08:00
Ian Lance Taylor
ce15158502
Test that a break statement inside a select statement breaks
...
out of the enclosing loop.
R=ken
DELTA=20 (20 added, 0 deleted, 0 changed)
OCL=18686
CL=18714
2008-11-06 15:24:10 -08:00
Robert Griesemer
ce164403da
A recreational programming exercise:
...
Multiplication of a Hilbert matrix with its inverse using
Bignum.Rationals as a test case for rational arithmetic.
R=r
OCL=18706
CL=18706
2008-11-06 14:23:49 -08:00
Robert Griesemer
66c6b13b03
- implemented String() and Format functionality in Bignum
...
- added a test
R=r
OCL=18687
CL=18687
2008-11-06 12:13:52 -08:00
Ian Lance Taylor
48d111f0b9
6g dumps core on this input file.
...
R=ken,rsc
DELTA=14 (14 added, 0 deleted, 0 changed)
OCL=18555
CL=18598
2008-11-05 15:27:40 -08:00
Ian Lance Taylor
7fe34ea002
Fix powser1.go to compile with the current 6g, which doesn't
...
recognize methods for a variable whose type is a named type
which is a pointer type. Add bug117 to test this case.
R=r
DELTA=24 (22 added, 0 deleted, 2 changed)
OCL=18547
CL=18554
2008-11-05 12:06:48 -08:00
Ian Lance Taylor
6cd74b03f3
Don't use a named pointer type as a receiver type. The
...
current spec forbids it:
The type specified by the type name is called ``receiver
base type''. The receiver base type must be a type
declared in the current file, and it must not be a pointer
type.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18527
CL=18541
2008-11-05 11:25:30 -08:00
Rob Pike
02f718339b
update golden.out
...
R=rsc
OCL=18482
CL=18484
2008-11-04 14:33:47 -08:00
Robert Griesemer
e2eccf3bd0
install bignum as library
...
R=r
DELTA=3501 (1752 added, 1749 deleted, 0 changed)
OCL=18460
CL=18471
2008-11-04 13:55:18 -08:00
Russ Cox
d289e6344f
move invalid method uses to new test
...
R=iant
DELTA=24 (13 added, 10 deleted, 1 changed)
OCL=18424
CL=18439
2008-11-04 09:45:27 -08:00
Russ Cox
56a7895386
fixed tests
...
R=r
DELTA=124 (62 added, 62 deleted, 0 changed)
OCL=18389
CL=18394
2008-11-03 15:52:34 -08:00
Russ Cox
c249a8de32
rename various magic names.
...
sigi and sigt:
sys·sigi_inter -> sigi·inter
sys·sigt_int -> sigt·int
Package·sigt_Type -> sigt·Package.Type
local type T in file x.go T_x -> T·x
second one T_x_1 -> T·x·1
method names M on T T_M -> T·M
correctly handle local embedded types
init functions are the only place left that use underscores
R=ken
OCL=18377
CL=18377
2008-11-03 15:36:08 -08:00
Ian Lance Taylor
2eb17d7894
Recognize gccgo error message:
...
interface1.go:29:6: error: incompatible type in initialization (missing method Next)
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=18183
CL=18271
2008-10-31 14:55:57 -07:00
Rob Pike
c1198b9b87
update tests
...
R=rsc
DELTA=159 (65 added, 84 deleted, 10 changed)
OCL=18149
CL=18151
2008-10-30 13:26:57 -07:00
Russ Cox
eb5a316fa6
make sure errchk only prints BUG once.
...
using a variable is not sufficient, because
sometimes bug() is called from a subshell.
R=iant
DELTA=7 (2 added, 1 deleted, 4 changed)
OCL=18092
CL=18145
2008-10-30 12:43:32 -07:00
Russ Cox
9639bd0dd7
apply change suggested in CL 16658 review
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18091
CL=18094
2008-10-29 19:59:36 -07:00
Russ Cox
cf9e46fec6
bugs from old gri mail
...
R=gri
OCL=18093
CL=18093
2008-10-29 19:34:47 -07:00
Ian Lance Taylor
e76e9cfc33
Call the right function for int32 values.
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18073
CL=18073
2008-10-29 15:48:34 -07:00
Russ Cox
cc5a382802
update Fmt interface: d=int, ud=uint, d32=int32, d64=int64, etc.
...
R=r
DELTA=202 (60 added, 24 deleted, 118 changed)
OCL=18029
CL=18038
2008-10-29 14:28:19 -07:00
Russ Cox
123bd8f24b
more simple test fixes
...
R=r
OCL=18035
CL=18035
2008-10-29 14:09:48 -07:00
Ken Thompson
9eebfe6c3b
types
...
R=r
OCL=18034
CL=18034
2008-10-29 14:09:32 -07:00
Russ Cox
915e809f86
update golden.out with new type names
...
R=r
OCL=18033
CL=18033
2008-10-29 14:05:00 -07:00
Russ Cox
9cdb8bd502
minor int/float fixes
...
R=ken
OCL=18032
CL=18032
2008-10-29 13:58:12 -07:00
Russ Cox
11a978adf5
shift bug in constant evaluator
...
R=ken
OCL=18031
CL=18031
2008-10-29 13:46:55 -07:00
Rob Pike
5fcb035bca
update golden.out
...
R=ken
OCL=17900
CL=17900
2008-10-27 11:08:01 -07:00
Ken Thompson
24eb30b5d6
test
...
R=r
OCL=17855
CL=17855
2008-10-25 15:26:35 -07:00
Ian Lance Taylor
22a6747999
Per discussion earlier today with r and gri: when an interface
...
object has a value of type "int", it should not automatically
convert to type "int32". That is, the type alias "int" should
be regarded as having been defined as though "type int int32"
appeared outside of the package, and as therefore being a
different type from "int32".
R=ken
DELTA=21 (20 added, 0 deleted, 1 changed)
OCL=17587
CL=17842
2008-10-24 22:40:32 -07:00
Russ Cox
689b28fd96
fix method function type compare bug (again)
...
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
8d3a3dd904
update golden.out
...
R=iant
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=17680
CL=17711
2008-10-23 11:44:01 -07:00
Ian Lance Taylor
7dbee69b58
Match gccgo error messages.
...
convlit.go:17: error: incompatible type in initialization
convlit.go:18: error: incompatible types in binary expression
convlit.go:19: error: incompatible types in binary expression
convlit.go:20: error: incompatible types in binary expression
convlit.go:21: error: incompatible types in binary expression
convlit.go:23: error: cannot convert non-integer constant
convlit.go:24: error: integer type overflow
convlit.go:25: error: floating point overflow
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=17649
CL=17661
2008-10-22 16:09:24 -07:00
Russ Cox
dbabeb1d7a
reject new of function type
...
R=ken
OCL=17598
CL=17598
2008-10-21 18:03:25 -07:00
Russ Cox
beee6915f8
rewrite &Point{1, 2} as allocation
...
R=ken
OCL=17592
CL=17592
2008-10-21 16:53:54 -07:00
Russ Cox
44b0ecc5ca
6g: use full type in sigt[0].name
...
sys: add sys.reflect
runtime: add canfail flag for later
R=ken
OCL=17583
CL=17583
2008-10-21 15:38:26 -07:00
Russ Cox
aacfbb461b
6g:
...
* print int as int, not P.int
* write type info for non-exported types
in its own new section.
ar:
skip over rest of line after $$
R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Ian Lance Taylor
6ae1df9b99
Match error messages generated by gccgo:
...
convlit1.go:6:15: error: composite literal requires array, map, or struct type
convlit1.go:5:16: error: incompatible type for element 0 in composite literal
convlit1.go:10:15: error: incompatible types in binary expression
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=17506
CL=17509
2008-10-20 17:10:03 -07:00
Rob Pike
03a9872fe3
add primitive ftoa, dtoa to strings library.
...
R=rsc
DELTA=72 (69 added, 0 deleted, 3 changed)
OCL=17478
CL=17480
2008-10-20 13:53:20 -07:00
Russ Cox
5fe4cd83a8
do not set t->recur on basic types.
...
the comment talked about printing, but now
t->recur is only used for typehash.
in typehash it is important to compute different
hashes for the different basic types.
add test that makes sure an interface { X() int8 }
cannot be used as interface { X() int64 }
R=ken
OCL=17396
CL=17396
2008-10-17 17:51:29 -07:00
Rob Pike
4bcfffb761
update fixed bugs (and delete an irrelevant one)
...
R=rsc
DELTA=328 (158 added, 170 deleted, 0 changed)
OCL=17353
CL=17359
2008-10-17 11:48:51 -07:00
Russ Cox
925454e932
make sure errchk only says BUG once,
...
so that run's count is correct
R=iant,r
DELTA=20 (12 added, 0 deleted, 8 changed)
OCL=17329
CL=17342
2008-10-17 07:41:18 -07:00
Russ Cox
1163b1db6f
diagnose various conversion problems
...
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Russ Cox
493a9d2f42
put toplevel & check back and add test
...
R=ken
OCL=17307
CL=17307
2008-10-16 14:02:20 -07:00
Russ Cox
59167e5bdb
diagnose export of incomplete type
...
R=ken
OCL=17253
CL=17253
2008-10-15 17:51:23 -07:00
Ken Thompson
8973e1ffb7
basic types/interfaces test
...
R=r
OCL=17247
CL=17247
2008-10-15 17:15:47 -07:00
Rob Pike
13508ceabe
bug is fixed
...
R=ken
OCL=17208
CL=17208
2008-10-15 11:49:34 -07:00
Rob Pike
151c0de8bc
update bug list
...
R=ken
OCL=17169
CL=17169
2008-10-14 19:41:05 -07:00
Russ Cox
82e41cc533
allow trailing comma in braced initialized list
...
R=ken
OCL=17141
CL=17143
2008-10-14 17:10:39 -07:00
Rob Pike
99c5b2ed4d
6g thinks a struct with one entry yields a composite that is a basic conversion
...
R=rsc
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=16989
CL=16998
2008-10-13 12:26:58 -07:00
Robert Griesemer
32d00e6cc6
- added missing ';' according to new rules
...
(no effect on the test, but now parseable)
R=r
OCL=16936
CL=16936
2008-10-10 16:18:01 -07:00
Robert Griesemer
e7c8e78879
- removed extra package clause
...
R=rsc
DELTA=2 (0 added, 2 deleted, 0 changed)
OCL=16927
CL=16927
2008-10-10 14:50:23 -07:00
Russ Cox
7e241107f1
test of new empty productions
...
R=gri
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=16765
CL=16767
2008-10-08 15:33:18 -07:00
Russ Cox
b4f8e01acb
more interface checks:
...
- pointer to interface cannot have methods
- record type names for better runtime error
R=r,ken
DELTA=85 (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
2008-10-08 09:21:57 -07:00
Russ Cox
e6cd1e445b
remove uses of *T as an implicit forward declaration of T
...
R=gri,r
OCL=16648
CL=16652
2008-10-07 12:59:54 -07:00
Russ Cox
eb452f4b6e
test that mutually recursive interfaces compile
...
R=r
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=16639
CL=16647
2008-10-07 12:36:39 -07:00
Russ Cox
983f06bdb6
update code to follow new semicolon rules:
...
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
2008-10-07 12:31:31 -07:00
Rob Pike
7ee60b174d
sys.stringtorune doesn't need a length parameter.
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=16600
CL=16630
2008-10-07 10:03:34 -07:00
Russ Cox
74e2e087e2
change type names to go live at the name, so that
...
type T struct {
next *T
}
and
type T *struct {
next T
}
are valid without needing forward declarations.
add "type T struct" syntax for forward struct declarations.
add "type T interface" syntax, but commented out
(need to fix semicolons first)
R=ken
DELTA=452 (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
2008-10-06 16:44:17 -07:00
Rob Pike
717de79976
change in spec results in non-error
...
R=gri
DELTA=4 (0 added, 3 deleted, 1 changed)
OCL=16565
CL=16579
2008-10-06 16:27:14 -07:00
Ian Lance Taylor
be0c25ee93
Change old-style export declaration to new style export of
...
type definition.
R=r
DELTA=3 (0 added, 2 deleted, 1 changed)
OCL=16537
CL=16545
2008-10-06 13:12:03 -07:00
Rob Pike
98c208ee1d
bug026 and bug060 are fixed. update.
...
R=rsc
DELTA=87 (37 added, 50 deleted, 0 changed)
OCL=16498
CL=16507
2008-10-05 08:34:48 -07:00
Russ Cox
f464beb61d
fix method use bug in powser1.
...
R=r
DELTA=7 (2 added, 2 deleted, 3 changed)
OCL=16495
CL=16499
2008-10-04 22:11:26 -07:00
Russ Cox
2e1bb4a4cf
add method test & fix method name bugs
...
R=ken,r
DELTA=86 (72 added, 9 deleted, 5 changed)
OCL=16488
CL=16488
2008-10-04 02:51:03 -07:00
Russ Cox
7766b12ead
const bug, name bug - working on both
...
R=r
DELTA=43 (43 added, 0 deleted, 0 changed)
OCL=16468
CL=16475
2008-10-03 17:06:24 -07:00
Russ Cox
b8babed7c2
new import/export format
...
package flag
export type flag.Flag struct { name flag.string; usage flag.string; \
value flag.Value; next *flag.Flag }
type flag.string string
type flag.Value interface { AsBool () (? *flag.BoolValue); \
AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
type flag.BoolValue struct { val flag.bool; p *flag.bool }
type flag.IntValue struct { val flag.int64; p *flag.int64 }
type flag.StringValue struct { val flag.string; p *flag.string }
type flag.bool bool
func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
func (e *flag.StringValue) AsInt () (? *flag.IntValue)
...
the \ continuations are for this message, not real.
changed delimiter for import from (( )) to $$ $$.
replaced mksys.bash with mksys.c
changed sys.go to use leading export,
fake package name is now SYS not foop
don't always require ; on forward func decls
R=ken,r
DELTA=1827 (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
2008-10-03 16:15:55 -07:00
Ian Lance Taylor
8d0ed065dc
With the cleanup of method types, this test case is now
...
invalid. The receiver type is not permitted to be a pointer
type. Since 6g currently accepts it, this moves the test case
back to the bugs directory.
R=gri
DELTA=22 (11 added, 11 deleted, 0 changed)
OCL=16284
CL=16336
2008-10-01 17:01:42 -07:00
Russ Cox
77a911bcc1
update golden.out
...
R=r
OCL=16250
CL=16250
2008-09-30 15:45:49 -07:00
Russ Cox
5ed04d71fb
tests of new func arg code
...
R=r
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=16212
CL=16223
2008-09-30 14:08:43 -07:00
Rob Pike
ca6d4238a4
update golden for new error messages
...
R=rsc
OCL=16213
CL=16213
2008-09-30 13:07:38 -07:00
Rob Pike
fa2b4cbf44
104, 107, 108: they are known to fail, so mark them appropriately.
...
update golden
add the "goroutines" test
R=iant
DELTA=74 (36 added, 23 deleted, 15 changed)
OCL=16194
CL=16206
2008-09-30 12:31:47 -07:00
Ian Lance Taylor
aadd32223d
Test that floating point constants resolve to type "float".
...
Currently 6g seems to resolve them to type "double".
R=ken,r
DELTA=30 (30 added, 0 deleted, 0 changed)
OCL=16132
CL=16152
2008-09-29 18:17:42 -07:00
Russ Cox
785afb0847
make bugs not fail
...
R=r
DELTA=6 (0 added, 0 deleted, 6 changed)
OCL=16110
CL=16114
2008-09-29 13:16:22 -07:00
Ian Lance Taylor
08df4dcf7d
Storing an out of range constant into a variable should
...
ideally cause the compiler to give an error. Right now 6g
warns about large shifts but does not give an error. This CL
removes the out of range shift from shift.go, so that it will
work with gccgo, and adds a test case in bugs/ to be fixed at
a later date.
R=ken,r
DELTA=23 (9 added, 14 deleted, 0 changed)
OCL=16085
CL=16088
2008-09-29 11:03:21 -07:00
Russ Cox
43c5e63c00
Darwin kqueue/kevent-based network FDs
...
R=r
OCL=15998
CL=16004
2008-09-26 14:46:28 -07:00
Russ Cox
d448d18cb4
test and fix non-blocking chan ops on buffered chans
...
R=ken
DELTA=68 (19 added, 0 deleted, 49 changed)
OCL=15966
CL=15969
2008-09-26 11:47:04 -07:00
Ian Lance Taylor
6270e70b76
Add test case for 6g bug: result variable does not hide the
...
package name in the scope.
R=r
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=15913
CL=15926
2008-09-25 20:31:03 -07:00
Russ Cox
eeeaf6b931
6g misparses negative constants in imports
...
R=r
DELTA=8 (8 added, 0 deleted, 0 changed)
OCL=15893
CL=15898
2008-09-25 16:32:39 -07:00
Robert Griesemer
b6429768c6
bug: package identifier not visible
...
(should be in the scope chain like any other identifier)
R=r
DELTA=16 (16 added, 0 deleted, 0 changed)
OCL=15884
CL=15884
2008-09-25 15:45:19 -07:00
Ian Lance Taylor
b70d42f323
6g currently accepts setting a string value to an integer
...
constant without an explicit conversion. I think that is a
bug. This adds a test case for it.
Also, change errchk to include the string BUG in error
messages, so that failures are included in the count reported
by the run shell script.
R=r,ken
DELTA=11 (7 added, 0 deleted, 4 changed)
OCL=15857
CL=15880
2008-09-25 15:08:52 -07:00
Russ Cox
5383e28ea0
change string([]byte) to pass array, rather than &a[0],
...
to string convert. if the byte array has length 0,
the computation of &a[0] throws an index bounds error.
for fixed size arrays, this ends up invoking arrays2d
unnecessarily, but it works.
R=ken
DELTA=304 (44 added, 28 deleted, 232 changed)
OCL=15674
CL=15678
2008-09-22 20:12:15 -07:00
Rob Pike
4d12c0e170
add os.Getenv()
...
R=rsc
DELTA=51 (50 added, 0 deleted, 1 changed)
OCL=15665
CL=15667
2008-09-22 17:31:41 -07:00
Russ Cox
c14924bcc8
implement zoneinfo reader
...
R=r
DELTA=348 (338 added, 0 deleted, 10 changed)
OCL=15648
CL=15660
2008-09-22 16:41:14 -07:00
Russ Cox
173ca8a2d0
re-fix bug067, update golden.out
...
R=r
DELTA=9 (4 added, 3 deleted, 2 changed)
OCL=15655
CL=15655
2008-09-22 16:16:22 -07:00
Russ Cox
fb40f88c40
test cleanup
...
- do not print tracebacks if $GOTRACEBACK=0
- set GOTRACEBACK=0 during tests
- filter out pc numbers in errors
R=r
DELTA=70 (22 added, 30 deleted, 18 changed)
OCL=15618
CL=15642
2008-09-22 13:47:53 -07:00
Russ Cox
fb2c66710c
compiler changes:
...
export.c:
- only expose explicitly exported types to importer
- fix behind your back
go.h:
- add deep() prototype (fixes 64-bit linux crash on time.go)
go.y:
- add a new syntax error case
walk.c:
- allow a,b = f() where f is func ptr (fixes bug088)
R=ken
OCL=15617
CL=15630
2008-09-22 12:45:01 -07:00
Ken Thompson
8a9752dcfb
another async select bug
...
R=r
OCL=15599
CL=15599
2008-09-20 19:56:40 -07:00
Rob Pike
9ebd9d3b7d
fix some tests
...
R=ken
OCL=15598
CL=15598
2008-09-20 15:16:48 -07:00
Ken Thompson
934a19fa4b
channel test
...
R=r
OCL=15587
CL=15587
2008-09-19 20:52:59 -07:00
Ian Lance Taylor
66b261a082
Check for specific error messages in the testsuite. This
...
permits testing that the compiler emits error messages for
specific lines that match egrep regexps. The desired error
messages are expressed using comments of the form
// ERROR "regexp"
R=r
DELTA=90 (73 added, 8 deleted, 9 changed)
OCL=15513
CL=15566
2008-09-19 14:39:49 -07:00
Russ Cox
72e3b204e4
add gobuild.
...
use gobuild-generated Makefile for math and os.
other makefile tweaks.
move math/main.go to test/math.go
R=r
OCL=15529
CL=15537
2008-09-19 11:55:46 -07:00
Robert Griesemer
6a0fb60866
- added item to TODO list in go_spec
...
- filed a bug
R=r
OCL=15517
CL=15517
2008-09-18 23:16:22 -07:00
Russ Cox
68209ed5e3
fix printing of -(1<<63)
...
R=r
OCL=15441
CL=15445
2008-09-17 14:08:52 -07:00
Russ Cox
9350ef4eea
add network listening & tests
...
R=r,presotto
OCL=15410
CL=15440
2008-09-17 13:49:23 -07:00
Rob Pike
27c0eb8431
update tests to new communications syntax
...
powser1.go has not been tested - waiting for compiler to catch up
R=ken
OCL=15415
CL=15415
2008-09-16 19:33:40 -07:00
Russ Cox
4dfc7f0f14
fix / work around bugs in bufio test
...
R=r
DELTA=11 (8 added, 0 deleted, 3 changed)
OCL=15405
CL=15405
2008-09-16 14:15:54 -07:00
Rob Pike
85f8d4501a
fix some broken tests (tests themselves were wrong)
...
R=gri,rsc
OCL=15310
CL=15402
2008-09-16 14:03:43 -07:00
Rob Pike
c3b397bd99
var bug is fixed
...
R=rsc
OCL=15400
CL=15400
2008-09-16 14:02:41 -07:00
Rob Pike
6f38063369
update bugs
...
delete bug100.go since the compiler is doing what we agreed.
R=gri
OCL=15367
CL=15367
2008-09-15 14:27:15 -07:00
Robert Griesemer
ddc7bc5aba
test program to generate multiples of a set of factors
...
(as written, factors are 2, 3, and 5)
R=r
OCL=15286
CL=15286
2008-09-12 17:39:29 -07:00
Russ Cox
7c9e2c2b6c
buffered input & output
...
R=r
DELTA=812 (803 added, 0 deleted, 9 changed)
OCL=15225
CL=15280
2008-09-12 16:42:53 -07:00
Russ Cox
22731159b0
array literals not initialized
...
R=r
DELTA=11 (11 added, 0 deleted, 0 changed)
OCL=15222
CL=15276
2008-09-12 16:35:02 -07:00
Russ Cox
729bc5c0c7
rudimentary string utilities.
...
R=r
DELTA=314 (306 added, 8 deleted, 0 changed)
OCL=15074
CL=15263
2008-09-12 16:12:20 -07:00
Russ Cox
96b906498a
out of bounds bug
...
R=r
DELTA=9 (9 added, 0 deleted, 0 changed)
OCL=15223
CL=15223
2008-09-12 09:43:21 -07:00