]> Cypherpunks repositories - gostls13.git/log
gostls13.git
16 years agoadd mutex.Mutex
Russ Cox [Thu, 4 Dec 2008 20:51:36 +0000 (12:51 -0800)]
add mutex.Mutex

R=r
DELTA=349  (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472

16 years agofix build - forgot these files
Russ Cox [Thu, 4 Dec 2008 18:18:53 +0000 (10:18 -0800)]
fix build - forgot these files

TBR=r
OCL=20448
CL=20448

16 years agoadd stub routines stackalloc() and stackfree().
Russ Cox [Thu, 4 Dec 2008 16:30:54 +0000 (08:30 -0800)]
add stub routines stackalloc() and stackfree().
run oldstack on g0's stack, just like newstack does,
so that oldstack can free the old stack.

R=r
DELTA=53  (44 added, 0 deleted, 9 changed)
OCL=20404
CL=20433

16 years agoadd time.Tick()
Russ Cox [Thu, 4 Dec 2008 00:40:00 +0000 (16:40 -0800)]
add time.Tick()

R=r
DELTA=130  (115 added, 1 deleted, 14 changed)
OCL=20376
CL=20385

16 years ago- fixed a bug with import printing (missing separator between alias and string)
Robert Griesemer [Wed, 3 Dec 2008 23:47:30 +0000 (15:47 -0800)]
- fixed a bug with import printing (missing separator between alias and string)
- rewrote declaration printing - was unreadable before
- no semicolons after closing "}" for types

R=r
OCL=20379
CL=20379

16 years agopreparation for exec.
Russ Cox [Wed, 3 Dec 2008 22:21:28 +0000 (14:21 -0800)]
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

16 years agoclean stack trace code.
Russ Cox [Wed, 3 Dec 2008 22:20:23 +0000 (14:20 -0800)]
clean stack trace code.
format is unchanged but shows all frames
(old loop stopped one frame early).

wreck=; 6.out
cannot convert type *main.S·interface2 to interface main.I·interface2: missing method Foo
throw: interface conversion
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x256d

throw+0x46 /home/rsc/go/src/runtime/runtime.c:68
throw(0x863a, 0x0)
hashmap+0x188 /home/rsc/go/src/runtime/iface.c:167
hashmap(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
sys·ifaceT2I+0xa8 /home/rsc/go/src/runtime/iface.c:201
sys·ifaceT2I(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
main·main+0x4e /home/rsc/go/src/runtime/rt0_amd64_darwin.s:87
main·main()
mainstart+0xf /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart()
sys·goexit /home/rsc/go/src/runtime/proc.c:110
sys·goexit()

R=r
DELTA=44  (5 added, 15 deleted, 24 changed)
OCL=20358
CL=20368

16 years agoMake strconv.atof("-0") return -0
Russ Cox [Wed, 3 Dec 2008 21:29:13 +0000 (13:29 -0800)]
Make strconv.atof("-0") return -0
and update test.

R=iant
DELTA=11  (3 added, 1 deleted, 7 changed)
OCL=20350
CL=20362

16 years agoimport/export of exact mp floating constants
Ken Thompson [Wed, 3 Dec 2008 21:17:26 +0000 (13:17 -0800)]
import/export of exact mp floating constants
new syntax for exact mp floating constants
     decimal_int ( "p" | "P" ) [ "+" | "-" ] decimal_int
     the value is decimal1 * 2^decimal2

R=r
OCL=20357
CL=20357

16 years agogolden.out drift
Russ Cox [Wed, 3 Dec 2008 21:05:56 +0000 (13:05 -0800)]
golden.out drift

TBR=r
OCL=20352
CL=20355

16 years ago- bug: empty switches don't compile
Robert Griesemer [Wed, 3 Dec 2008 18:41:43 +0000 (10:41 -0800)]
- bug: empty switches don't compile

R=rsc
DELTA=32  (28 added, 3 deleted, 1 changed)
OCL=20301
CL=20340

16 years agosmall code improvement to
Ken Thompson [Wed, 3 Dec 2008 03:54:51 +0000 (19:54 -0800)]
small code improvement to
used scaled indexing

R=r
OCL=20308
CL=20310

16 years agotruncating of float constants when
Ken Thompson [Wed, 3 Dec 2008 01:03:47 +0000 (17:03 -0800)]
truncating of float constants when
used in float64 or float32 contexts

R=r
OCL=20297
CL=20297

16 years ago- oversight: extra allow source-level line breaks inside statement lists
Robert Griesemer [Wed, 3 Dec 2008 01:01:31 +0000 (17:01 -0800)]
- oversight: extra allow source-level line breaks inside statement lists
- fixed printing of empty structs/interfaces
- enable two more tests

R=r
OCL=20296
CL=20296

16 years ago- fine-tuning of white space
Robert Griesemer [Wed, 3 Dec 2008 00:49:44 +0000 (16:49 -0800)]
- fine-tuning of white space
- by default consider extra newlines in src for better formatting
- additional flags for control (-newlines, -maxnewlines, -optsemicolons)
- don't print ()'s around single anonymous result types

Status: Comparing the output of pretty with the input for larger files
shows mostly whitespace/formatting differences, which is what is desired.

TODO:
- Handling of overlong lines
- some esoteric cases which look funny

R=r
OCL=20293
CL=20293

16 years ago6g gives no error on "0 != nil"
Russ Cox [Wed, 3 Dec 2008 00:35:00 +0000 (16:35 -0800)]
6g gives no error on "0 != nil"

R=ken
OCL=20289
CL=20289

16 years agoThe flag and fmt libraries are now available from gccgo by
Ian Lance Taylor [Tue, 2 Dec 2008 20:52:47 +0000 (12:52 -0800)]
The flag and fmt libraries are now available from gccgo by
default.  Fix PRETTY_OBJS to include compilation.o rather than
compilation.go.

R=gri
DELTA=10  (0 added, 8 deleted, 2 changed)
OCL=20248
CL=20257

16 years agoremove reference to non-existent mparith.h
Russ Cox [Tue, 2 Dec 2008 01:35:15 +0000 (17:35 -0800)]
remove reference to non-existent mparith.h

R=ken
OCL=20188
CL=20188

16 years agobug: constants should not be redeclarable
Robert Griesemer [Tue, 2 Dec 2008 01:27:57 +0000 (17:27 -0800)]
bug: constants should not be redeclarable

R=rsc
DELTA=9  (9 added, 0 deleted, 0 changed)
OCL=20187
CL=20187

16 years agomulti precision floating point
Ken Thompson [Tue, 2 Dec 2008 01:22:05 +0000 (17:22 -0800)]
multi precision floating point

R=r
OCL=20185
CL=20185

16 years ago- enabled comment printing by default
Robert Griesemer [Tue, 2 Dec 2008 01:20:59 +0000 (17:20 -0800)]
- enabled comment printing by default
- changed tab width to 8 chars by default to make test run properly
- excluded 4 files that are not idempotently printed
- fixed a couple of incorrect file position recordings in parser
- fine-tuned layout engine
- white-space formatting reasonable, but not perfect
- no handling of overlong lines
R=r

To use with smaller tabs:           pretty -tabwidth=4 file.go
To use with blanks instead of tabs: pretty -usetabs=0 file.go

OCL=20184
CL=20184

16 years agobe more precise in ftoa_test.
Russ Cox [Tue, 2 Dec 2008 00:03:09 +0000 (16:03 -0800)]
be more precise in ftoa_test.

R=ken
OCL=20173
CL=20173

16 years ago- better comment formatting, starting to look good
Robert Griesemer [Mon, 1 Dec 2008 22:03:20 +0000 (14:03 -0800)]
- better comment formatting, starting to look good
- comment printing still disabled by default because idempotency test fails
- whitespace control better but not perfect yet
- snapshot before making some heuristics changes

R=r
OCL=20151
CL=20151

16 years agoadd blank line (response to post-submit review of CL 19422)
Russ Cox [Mon, 1 Dec 2008 18:26:23 +0000 (10:26 -0800)]
add blank line (response to post-submit review of CL 19422)

TBR=r
OCL=20127
CL=20127

16 years ago- collect addition source position information in parser
Robert Griesemer [Thu, 27 Nov 2008 01:07:45 +0000 (17:07 -0800)]
- collect addition source position information in parser
  for end of declarations, blocks, parameter lists, etc.
- use extra src positions to more accurately print comments
- fine-tuned low-level printing routine for comments
- added better debugging support

Status:
- comments now appear at the right place (inbetween the right tokens)
- newline control needs improvement (not very hard)
- comment printing disabled for now because pretty is not idempotent
with it; to enable: -comments

R=r
OCL=20079
CL=20079

16 years ago- snapshot of state before trying yet another, hopefully better working
Robert Griesemer [Wed, 26 Nov 2008 21:23:26 +0000 (13:23 -0800)]
- snapshot of state before trying yet another, hopefully better working
way to integrate comments into the generated output
- various simplificatins and cleanups throughout

R=r
OCL=20062
CL=20062

16 years agonew stacktrace format
Russ Cox [Wed, 26 Nov 2008 01:17:54 +0000 (17:17 -0800)]
new stacktrace format

sys·gosched+0x25 /home/rsc/go/src/runtime/proc.c:477
sys·gosched()
chanrecv+0x29e /home/rsc/go/src/runtime/chan.c:277
chanrecv(0x4be80, 0x0, 0x4cf88, 0x0, 0x0, ...)
sys·chanrecv1+0x5b /home/rsc/go/src/runtime/chan.c:355
sys·chanrecv1(0x4be80, 0x0)
once·Server+0x26 /home/rsc/go/src/lib/strconv/atoi.go:-41
once·Server()

the last line is broken (atoi.go:-41) but that's not new.

R=r
DELTA=46  (19 added, 14 deleted, 13 changed)
OCL=20018
CL=20026

16 years agochange meaning of $GOMAXPROCS to number of cpus to use,
Russ Cox [Wed, 26 Nov 2008 00:48:10 +0000 (16:48 -0800)]
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

16 years ago- fixed a problem with flushing
Robert Griesemer [Tue, 25 Nov 2008 22:06:59 +0000 (14:06 -0800)]
- fixed a problem with flushing
- added extra tests

R=r
DELTA=164  (107 added, 20 deleted, 37 changed)
OCL=20002
CL=20004

16 years agogotest: change pattern to Test([^a-z].*)?
Russ Cox [Tue, 25 Nov 2008 20:49:17 +0000 (12:49 -0800)]
gotest: change pattern to Test([^a-z].*)?
warn about files with no tests
be clear about where testing warnings come from

R=r
DELTA=18  (12 added, 3 deleted, 3 changed)
OCL=19988
CL=19993

16 years ago- delete vector.go - not needed anymore
Robert Griesemer [Tue, 25 Nov 2008 18:08:49 +0000 (10:08 -0800)]
- delete vector.go - not needed anymore
- runs all.bash

R=r
DELTA=121  (0 added, 121 deleted, 0 changed)
OCL=19960
CL=19983

16 years agomake a (rudimentary) ByteBuffer and put it in package "io".
Rob Pike [Tue, 25 Nov 2008 17:41:58 +0000 (09:41 -0800)]
make a (rudimentary) ByteBuffer and put it in package "io".
fix up protocol buffers to use it.

R=rsc
DELTA=1232  (612 added, 572 deleted, 48 changed)
OCL=19964
CL=19981

16 years agouse pc/ln table to print source lines in traceback
Russ Cox [Tue, 25 Nov 2008 17:23:36 +0000 (09:23 -0800)]
use pc/ln table to print source lines in traceback

r45=; 6.out
oops
panic PC=0x400316
0x400316?zi /home/rsc/go/src/runtime/rt0_amd64_linux.s:83
main·g(4195177, 0, 4205661, ...)
main·g(0x400369, 0x402c5d, 0x403e49, ...)
0x40034c?zi /home/rsc/go/src/runtime/x.go:24
main·f(4205661, 0, 4210249, ...)
main·f(0x402c5d, 0x403e49, 0x1, ...)
0x400368?zi /home/rsc/go/src/runtime/x.go:37
main·main(4210249, 0, 1, ...)
main·main(0x403e49, 0x1, 0x7fff9d894bd8, ...)
0x402c5c?zi /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart(1, 0, 2643020760, ...)
mainstart(0x1, 0x7fff9d894bd8, 0x0, ...)
r45=;

R=r
DELTA=251  (198 added, 25 deleted, 28 changed)
OCL=19965
CL=19979

16 years ago% x inserts spaces between hex bytes in string/*[]byte
Russ Cox [Tue, 25 Nov 2008 17:23:13 +0000 (09:23 -0800)]
% x inserts spaces between hex bytes in string/*[]byte

R=r
DELTA=7  (7 added, 0 deleted, 0 changed)
OCL=19967
CL=19978

16 years agoadd author lines
Russ Cox [Tue, 25 Nov 2008 17:22:58 +0000 (09:22 -0800)]
add author lines

R=r
DELTA=150  (147 added, 0 deleted, 3 changed)
OCL=19968
CL=19977

16 years ago- move error handling out of scanner
Robert Griesemer [Tue, 25 Nov 2008 02:24:21 +0000 (18:24 -0800)]
- move error handling out of scanner
- use more of the existing library code

R=r
OCL=19957
CL=19959

16 years agobetter code for += -= ^= |= and &=
Ken Thompson [Tue, 25 Nov 2008 01:51:26 +0000 (17:51 -0800)]
better code for += -= ^= |= and &=

R=r
OCL=19953
CL=19953

16 years agocompiler catches out of bounds; work around
Rob Pike [Tue, 25 Nov 2008 00:23:49 +0000 (16:23 -0800)]
compiler catches out of bounds; work around

R=ken
OCL=19943
CL=19943

16 years agoadd hash to build; rm pkg/* in clean.bash
Russ Cox [Mon, 24 Nov 2008 23:18:29 +0000 (15:18 -0800)]
add hash to build; rm pkg/* in clean.bash

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=19935
CL=19937

16 years agoconvert tests.
Russ Cox [Mon, 24 Nov 2008 23:17:47 +0000 (15:17 -0800)]
convert tests.
refine gotest's test selection criteria.

R=r
DELTA=1590  (745 added, 844 deleted, 1 changed)
OCL=19903
CL=19936

16 years agoreplay CL 19916 and CL 19913 now that the build can handle them
Russ Cox [Mon, 24 Nov 2008 22:51:33 +0000 (14:51 -0800)]
replay CL 19916 and CL 19913 now that the build can handle them

TBR=r
OCL=19924
CL=19934

16 years agoremove old .6 after install,
Russ Cox [Mon, 24 Nov 2008 22:51:01 +0000 (14:51 -0800)]
remove old .6 after install,
so that compilation of other .6
will use the copy in goroot/pkg

R=r
DELTA=3  (1 added, 0 deleted, 2 changed)
OCL=19931
CL=19933

16 years agoreally restore helpful error rules
Rob Pike [Mon, 24 Nov 2008 22:23:53 +0000 (14:23 -0800)]
really restore helpful error rules

R=rsc
OCL=19929
CL=19929

16 years agorestore helpful error rules
Rob Pike [Mon, 24 Nov 2008 22:15:53 +0000 (14:15 -0800)]
restore helpful error rules

R=rsc
OCL=19928
CL=19928

16 years ago1. retract general field names
Ken Thompson [Mon, 24 Nov 2008 22:01:12 +0000 (14:01 -0800)]
1. retract general field names
2. array bounds bug
3. ... optimization bug

R=r
OCL=19927
CL=19927

16 years agoadd missing file
Rob Pike [Mon, 24 Nov 2008 21:47:52 +0000 (13:47 -0800)]
add missing file

R=rsc
OCL=19926
CL=19926

16 years agoAutomated g4 rollback of changelist 19913.
Russ Cox [Mon, 24 Nov 2008 21:29:59 +0000 (13:29 -0800)]
Automated g4 rollback of changelist 19913.

*** Reason for rollback ***

broke build

*** Original change description ***

bufio.ReadRune

TBR=r
OCL=19923
CL=19923

16 years agoAutomated g4 rollback of changelist 19916.
Russ Cox [Mon, 24 Nov 2008 21:24:15 +0000 (13:24 -0800)]
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

16 years agoutf8: add InString routines for decoding in strings
Russ Cox [Mon, 24 Nov 2008 21:04:27 +0000 (13:04 -0800)]
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

16 years agobufio.ReadRune
Robert Griesemer [Mon, 24 Nov 2008 20:35:07 +0000 (12:35 -0800)]
bufio.ReadRune

R=rsc
DELTA=32  (29 added, 0 deleted, 3 changed)
OCL=19809
CL=19913

16 years agomake bignum_test a test
Russ Cox [Mon, 24 Nov 2008 20:32:31 +0000 (12:32 -0800)]
make bignum_test a test

R=gri
DELTA=967  (468 added, 499 deleted, 0 changed)
OCL=19906
CL=19912

16 years agohash writers: adler32, crc32, md5, sha1.
Russ Cox [Mon, 24 Nov 2008 20:30:40 +0000 (12:30 -0800)]
hash writers: adler32, crc32, md5, sha1.
all could probably be made faster.

R=r
DELTA=929  (929 added, 0 deleted, 0 changed)
OCL=19879
CL=19911

16 years agooutput of fmt has changed for %g
Rob Pike [Mon, 24 Nov 2008 19:59:23 +0000 (11:59 -0800)]
output of fmt has changed for %g

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=19909
CL=19909

16 years agogobuild:
Russ Cox [Mon, 24 Nov 2008 19:21:56 +0000 (11:21 -0800)]
gobuild:
recognize "// package foo" in non-go files
recognize "gobuild: ignore" to exclude from build

R=r
DELTA=10  (7 added, 2 deleted, 1 changed)
OCL=19878
CL=19905

16 years agofix %g 20 -> "2e+01" want "20"
Russ Cox [Mon, 24 Nov 2008 01:27:44 +0000 (17:27 -0800)]
fix %g 20 -> "2e+01" want "20"

R=r
DELTA=11  (10 added, 0 deleted, 1 changed)
OCL=19885
CL=19887

16 years agoindexing optimizations and bug fix
Ken Thompson [Mon, 24 Nov 2008 01:26:49 +0000 (17:26 -0800)]
indexing optimizations and bug fix

R=r
OCL=19886
CL=19886

16 years agodelete stack mark strings
Russ Cox [Mon, 24 Nov 2008 01:08:55 +0000 (17:08 -0800)]
delete stack mark strings
in favor of using in-memory copy of symbol table.

$ ls -l pretty pretty.big
-rwxr-xr-x  1 rsc  eng  439516 Nov 21 16:43 pretty
-rwxr-xr-x  1 rsc  eng  580984 Nov 21 16:20 pretty.big
$

R=r
DELTA=446  (238 added, 178 deleted, 30 changed)
OCL=19851
CL=19884

16 years agosetup for keywords in fieldnames
Ken Thompson [Sun, 23 Nov 2008 23:58:48 +0000 (15:58 -0800)]
setup for keywords in fieldnames

R=r
OCL=19883
CL=19883

16 years agoreg and peep
Ken Thompson [Sun, 23 Nov 2008 01:58:53 +0000 (17:58 -0800)]
reg and peep

R=r
OCL=19871
CL=19871

16 years agoutf8 routines in go; a start.
Russ Cox [Sat, 22 Nov 2008 00:13:31 +0000 (16:13 -0800)]
utf8 routines in go; a start.
also:
* parse flags in testing.Main.
* add make test in src/lib.

R=r
DELTA=323  (323 added, 0 deleted, 0 changed)
OCL=19831
CL=19850

16 years agofix 6l bug - moved symbol table without
Russ Cox [Sat, 22 Nov 2008 00:13:11 +0000 (16:13 -0800)]
fix 6l bug - moved symbol table without
recording correct place in mach tables
used by debuggers.

R=r
DELTA=4  (0 added, 2 deleted, 2 changed)
OCL=19810
CL=19849

16 years agofix build - missed update that added tabwriter
Russ Cox [Fri, 21 Nov 2008 21:05:09 +0000 (13:05 -0800)]
fix build - missed update that added tabwriter

TBR=r
OCL=19804
CL=19804

16 years agoconvert lib to a Makefile,
Russ Cox [Fri, 21 Nov 2008 20:36:16 +0000 (12:36 -0800)]
convert lib to a Makefile,
mainly for "make bufio.install".

R=r
DELTA=144  (80 added, 62 deleted, 2 changed)
OCL=19760
CL=19799

16 years ago- implemented arbitrary padding char for tabwriter
Robert Griesemer [Fri, 21 Nov 2008 17:35:49 +0000 (09:35 -0800)]
- implemented arbitrary padding char for tabwriter
- implemented right-to-left alignment (numerical results)
- better comments and error handling
- added more tests
- updated dependent files

R=r
DELTA=232  (175 added, 11 deleted, 46 changed)
OCL=19761
CL=19780

16 years agodon't print (incorrect anyway) line numbers in panic.
Rob Pike [Fri, 21 Nov 2008 07:16:31 +0000 (23:16 -0800)]
don't print (incorrect anyway) line numbers in panic.

R=rsc
DELTA=4  (0 added, 2 deleted, 2 changed)
OCL=19757
CL=19763

16 years agoautomatically add tabs after newlines
Rob Pike [Fri, 21 Nov 2008 02:10:46 +0000 (18:10 -0800)]
automatically add tabs after newlines

R=gri
DELTA=12  (10 added, 0 deleted, 2 changed)
OCL=19758
CL=19758

16 years ago- move tabwriter into library
Robert Griesemer [Fri, 21 Nov 2008 01:39:41 +0000 (17:39 -0800)]
- move tabwriter into library
- added preliminary tests (more to do)
- renamed type from TabWriter -> Writer
- adjusted my code where necessary

R=r
DELTA=825  (474 added, 346 deleted, 5 changed)
OCL=19744
CL=19753

16 years agosymbol table changes
Russ Cox [Fri, 21 Nov 2008 01:32:18 +0000 (17:32 -0800)]
symbol table changes

* add gotype string to symbol table
* fill in gotype in 6l for known funcs/vars
* print gotype with nm -t

* load symbol and pc/ln tables into memory at magic address 0x99<<32.
* add sys.symdat() to retrieve raw bytes of symbol table
  and pc/ln table.

most of this should be considered experimental
and subject to change.

R=r
DELTA=157  (128 added, 0 deleted, 29 changed)
OCL=19746
CL=19750

16 years agotweak pcs in traceback so they point to calling line instead of line after call.
Rob Pike [Fri, 21 Nov 2008 01:19:45 +0000 (17:19 -0800)]
tweak pcs in traceback so they point to calling line instead of line after call.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=19745
CL=19745

16 years ago- correct error handling throughout
Robert Griesemer [Fri, 21 Nov 2008 00:26:43 +0000 (16:26 -0800)]
- correct error handling throughout
- documentation, cleanups
- more options

R=r
OCL=19736
CL=19736

16 years agorun tests in file order, not alphabetical
Rob Pike [Thu, 20 Nov 2008 23:22:32 +0000 (15:22 -0800)]
run tests in file order, not alphabetical

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=19723
CL=19727

16 years agonew flags to 6cov
Russ Cox [Thu, 20 Nov 2008 19:58:07 +0000 (11:58 -0800)]
new flags to 6cov

-s print source lines
-n x don't print about sections < x lines long.

R=r
DELTA=69  (57 added, 1 deleted, 11 changed)
OCL=19697
CL=19708

16 years agoslightly simpler math.Pow per gri's suggestion
Russ Cox [Thu, 20 Nov 2008 19:56:48 +0000 (11:56 -0800)]
slightly simpler math.Pow per gri's suggestion

R=gri
DELTA=28  (2 added, 9 deleted, 17 changed)
OCL=19707
CL=19707

16 years agoadd math to tests; clean a bit
Russ Cox [Thu, 20 Nov 2008 18:54:11 +0000 (10:54 -0800)]
add math to tests; clean a bit

R=r
DELTA=33  (12 added, 9 deleted, 12 changed)
OCL=19688
CL=19696

16 years agomore accurate Log, Exp, Pow.
Russ Cox [Thu, 20 Nov 2008 18:54:02 +0000 (10:54 -0800)]
more accurate Log, Exp, Pow.
move test.go to alll_test.go.

R=r
DELTA=1024  (521 added, 425 deleted, 78 changed)
OCL=19687
CL=19695

16 years agorefine gobuild: the files must be *_test.go not *test.go
Rob Pike [Thu, 20 Nov 2008 03:43:32 +0000 (19:43 -0800)]
refine gobuild: the files must be *_test.go not *test.go
this causes complications

R=rsc
DELTA=1724  (849 added, 856 deleted, 19 changed)
OCL=19667
CL=19667

16 years agochange naming convention for tests from
Rob Pike [Thu, 20 Nov 2008 03:11:01 +0000 (19:11 -0800)]
change naming convention for tests from
test*.go
to
*test.go

R=rsc
DELTA=1747  (864 added, 855 deleted, 28 changed)
OCL=19666
CL=19666

16 years agoa few Errorfs should have been Error
Rob Pike [Thu, 20 Nov 2008 02:43:04 +0000 (18:43 -0800)]
a few Errorfs should have been Error

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=19662
CL=19664

16 years ago- array-ify code, remove local implementation
Robert Griesemer [Thu, 20 Nov 2008 00:49:50 +0000 (16:49 -0800)]
- array-ify code, remove local implementation

R=r
OCL=19648
CL=19651

16 years ago- full support for sorting (assumes array elements implement LessInterface
Robert Griesemer [Thu, 20 Nov 2008 00:23:45 +0000 (16:23 -0800)]
- full support for sorting (assumes array elements implement LessInterface
- better test reporting

R=r
DELTA=43  (24 added, 0 deleted, 19 changed)
OCL=19641
CL=19645

16 years agogotestify & gostylify math.
Russ Cox [Thu, 20 Nov 2008 00:14:31 +0000 (16:14 -0800)]
gotestify & gostylify math.

R=r
DELTA=682  (275 added, 301 deleted, 106 changed)
OCL=19638
CL=19642

16 years agogotestify regexp
Rob Pike [Wed, 19 Nov 2008 23:38:46 +0000 (15:38 -0800)]
gotestify regexp

R=rsc
DELTA=101  (53 added, 25 deleted, 23 changed)
OCL=19635
CL=19637

16 years agouse new test framework in array test
Robert Griesemer [Wed, 19 Nov 2008 23:17:58 +0000 (15:17 -0800)]
use new test framework in array test

R=r
DELTA=30  (2 added, 5 deleted, 23 changed)
OCL=19627
CL=19632

16 years ago- removed uses of vector in favor of array in a few places
Robert Griesemer [Wed, 19 Nov 2008 23:16:20 +0000 (15:16 -0800)]
- 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

16 years agoadd a type testing.T and use it in tests.
Rob Pike [Wed, 19 Nov 2008 22:38:05 +0000 (14:38 -0800)]
add a type testing.T and use it in tests.
update uses of gotest.
minor tweak to testing structure for protobuf.

R=rsc
DELTA=276  (71 added, 75 deleted, 130 changed)
OCL=19614
CL=19621

16 years ago- adjust sort.go to use new naming conventions
Robert Griesemer [Wed, 19 Nov 2008 22:32:15 +0000 (14:32 -0800)]
- adjust sort.go to use new naming conventions

R=rsc
DELTA=31  (0 added, 0 deleted, 31 changed)
OCL=19618
CL=19620

16 years agoaccept empty list of package imports.
Russ Cox [Wed, 19 Nov 2008 22:27:48 +0000 (14:27 -0800)]
accept empty list of package imports.

R=ken
OCL=19617
CL=19617

16 years agonew Makefile generated by gobuild
Robert Griesemer [Wed, 19 Nov 2008 22:24:53 +0000 (14:24 -0800)]
new Makefile generated by gobuild

R=rsc
DELTA=9  (7 added, 0 deleted, 2 changed)
OCL=19613
CL=19613

16 years agolook for .6 before .a; accept archives with 0 length __.SYMDEF
Russ Cox [Wed, 19 Nov 2008 22:21:44 +0000 (14:21 -0800)]
look for .6 before .a; accept archives with 0 length __.SYMDEF

TBR=r
OCL=19612
CL=19612

16 years ago- array lib (essentially vector, more complete)
Robert Griesemer [Wed, 19 Nov 2008 22:05:21 +0000 (14:05 -0800)]
- array lib (essentially vector, more complete)
- TODO replace vector

R=r
DELTA=314  (313 added, 0 deleted, 1 changed)
OCL=19592
CL=19609

16 years agoavoid problem overwriting read-only quietgcc
Russ Cox [Wed, 19 Nov 2008 21:01:32 +0000 (13:01 -0800)]
avoid problem overwriting read-only quietgcc

TBR=r
OCL=19600
CL=19600

16 years agobuild with warnings enabled.
Russ Cox [Wed, 19 Nov 2008 20:54:44 +0000 (12:54 -0800)]
build with warnings enabled.

new script "quietgcc" installed in $HOME/bin during make.bash
runs gcc with warnings, turns off inappropriate ones,
greps out useless output.

quietgcc also makes sure to run the correct 64-bit gcc.

R=r
DELTA=38  (36 added, 0 deleted, 2 changed)
OCL=17493
CL=19599

16 years agogobuild: add coverage rule, ignore files in package main.
Russ Cox [Wed, 19 Nov 2008 20:52:30 +0000 (12:52 -0800)]
gobuild: add coverage rule, ignore files in package main.

R=r
DELTA=55  (41 added, 11 deleted, 3 changed)
OCL=19594
CL=19598

16 years agocoverage tweaks
Russ Cox [Wed, 19 Nov 2008 20:51:25 +0000 (12:51 -0800)]
coverage tweaks

* handle new 6g shift sequence
* assume 6.out

R=r
DELTA=24  (20 added, 0 deleted, 4 changed)
OCL=19593
CL=19596

16 years agoessentially 100% coverage of strconv in tests.
Russ Cox [Wed, 19 Nov 2008 20:50:34 +0000 (12:50 -0800)]
essentially 100% coverage of strconv in tests.
fix a few bugs.

R=r
DELTA=294  (275 added, 9 deleted, 10 changed)
OCL=19595
CL=19595

16 years agogotest, via testing.go, should warn you if you failed to create any tests.
Rob Pike [Wed, 19 Nov 2008 19:50:58 +0000 (11:50 -0800)]
gotest, via testing.go, should warn you if you failed to create any tests.
when chatty, it should tell you how many there are.

R=rsc
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=19590
CL=19590

16 years agosaving 2 lines :-)
Robert Griesemer [Wed, 19 Nov 2008 18:20:52 +0000 (10:20 -0800)]
saving 2 lines :-)

R=rsc
DELTA=5  (0 added, 2 deleted, 3 changed)
OCL=19562
CL=19585

16 years agosilence gcc warnings: missing prototypes and unused variables
Russ Cox [Wed, 19 Nov 2008 17:49:06 +0000 (09:49 -0800)]
silence gcc warnings: missing prototypes and unused variables

R=ken
OCL=19583
CL=19583

16 years agoleave 6.out around after gotest;
Russ Cox [Wed, 19 Nov 2008 17:40:54 +0000 (09:40 -0800)]
leave 6.out around after gotest;
delete it in make clean.

R=r
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=19542
CL=19581

16 years agochange array slice error to include bounds
Russ Cox [Wed, 19 Nov 2008 17:35:36 +0000 (09:35 -0800)]
change array slice error to include bounds

$ 6.out
slice[5:12] of [10] array
throw: array slice
SIGSEGV: segmentation violation

R=r
DELTA=15  (13 added, 0 deleted, 2 changed)
OCL=19540
CL=19580