]> Cypherpunks repositories - gostls13.git/log
gostls13.git
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

16 years agoread and write never return -1 now: error return is through the error variable only
Rob Pike [Wed, 19 Nov 2008 06:32:01 +0000 (22:32 -0800)]
read and write never return -1 now: error return is through the error variable only

R=rsc
DELTA=13  (9 added, 0 deleted, 4 changed)
OCL=19538
CL=19570

16 years agoperm is [] instead of map
Ken Thompson [Wed, 19 Nov 2008 03:59:56 +0000 (19:59 -0800)]
perm is [] instead of map

R=r
OCL=19569
CL=19569

16 years agoneed ./ on local files
Ken Thompson [Wed, 19 Nov 2008 03:36:36 +0000 (19:36 -0800)]
need ./ on local files

R=rsc
OCL=19567
CL=19567

16 years agooops
Ken Thompson [Wed, 19 Nov 2008 03:27:15 +0000 (19:27 -0800)]
oops

R=r
OCL=19566
CL=19566

16 years ago- support for alignment via tabs instead of blanks
Robert Griesemer [Wed, 19 Nov 2008 03:25:43 +0000 (19:25 -0800)]
- support for alignment via tabs instead of blanks
- exclude a test due to syntax errors

R=r
OCL=19563
CL=19565

16 years agofirst cut at optimizing
Ken Thompson [Wed, 19 Nov 2008 03:24:37 +0000 (19:24 -0800)]
first cut at optimizing

R=r
OCL=19564
CL=19564

16 years agomake Copyn take and return int64.
Russ Cox [Wed, 19 Nov 2008 02:45:51 +0000 (18:45 -0800)]
make Copyn take and return int64.
add Copy.

R=gri
DELTA=52  (37 added, 1 deleted, 14 changed)
OCL=19557
CL=19559

16 years ago- untab app (snapshot - not quite complete)
Robert Griesemer [Wed, 19 Nov 2008 02:44:17 +0000 (18:44 -0800)]
- untab app (snapshot - not quite complete)

R=r
OCL=19558
CL=19558

16 years agoCopyn
Robert Griesemer [Wed, 19 Nov 2008 02:08:05 +0000 (18:08 -0800)]
Copyn

R=rsc
DELTA=34  (34 added, 0 deleted, 0 changed)
OCL=19541
CL=19545

16 years agoadd -chatty flag to test.
Russ Cox [Wed, 19 Nov 2008 01:52:05 +0000 (17:52 -0800)]
add -chatty flag to test.
was supposed to be in some other cl but got dropped.

R=r
DELTA=21  (16 added, 2 deleted, 3 changed)
OCL=19531
CL=19539

16 years agostop flag reading before lone - arg.
Russ Cox [Wed, 19 Nov 2008 01:23:11 +0000 (17:23 -0800)]
stop flag reading before lone - arg.

R=r
DELTA=5  (3 added, 0 deleted, 2 changed)
OCL=19520
CL=19529

16 years agofix build for newbies
Russ Cox [Wed, 19 Nov 2008 01:22:31 +0000 (17:22 -0800)]
fix build for newbies

R=r
OCL=19526
CL=19528

16 years agoanother shift bug
Ken Thompson [Wed, 19 Nov 2008 01:15:42 +0000 (17:15 -0800)]
another shift bug

R=r
OCL=19525
CL=19525

16 years agomore tests for strconv; convert to gotest.
Russ Cox [Wed, 19 Nov 2008 01:12:14 +0000 (17:12 -0800)]
more tests for strconv; convert to gotest.

R=r
DELTA=219  (186 added, 32 deleted, 1 changed)
OCL=19508
CL=19523

16 years agoreturn *os.Error instead of bool from strconv.ato*
Russ Cox [Wed, 19 Nov 2008 01:12:07 +0000 (17:12 -0800)]
return *os.Error instead of bool from strconv.ato*

R=r
DELTA=137  (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522

16 years agogobuild changes.
Russ Cox [Wed, 19 Nov 2008 01:11:56 +0000 (17:11 -0800)]
gobuild changes.
* handles multiple packages per directory
* scans directory for files if given no arguments
* infers package name
* includes test rule invoking gotest

R=r
DELTA=746  (444 added, 150 deleted, 152 changed)
OCL=19504
CL=19521

16 years agoroll tests into one binary
Russ Cox [Wed, 19 Nov 2008 00:13:25 +0000 (16:13 -0800)]
roll tests into one binary

R=r
DELTA=145  (27 added, 27 deleted, 91 changed)
OCL=19423
CL=19502

16 years agoAdd ERROR comment for errmsg to look for.
Ian Lance Taylor [Tue, 18 Nov 2008 23:58:43 +0000 (15:58 -0800)]
Add ERROR comment for errmsg to look for.

R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=19460
CL=19500

16 years agotesting support library
Rob Pike [Tue, 18 Nov 2008 23:29:10 +0000 (15:29 -0800)]
testing support library

R=rsc
OCL=19496
CL=19496

16 years agoallow files to be named on the command line
Rob Pike [Tue, 18 Nov 2008 22:17:13 +0000 (14:17 -0800)]
allow files to be named on the command line

R=rsc
DELTA=3  (1 added, 1 deleted, 1 changed)
OCL=19485
CL=19485

16 years agonew gotest shell script (will be a proper command some day, probably)
Rob Pike [Tue, 18 Nov 2008 22:12:14 +0000 (14:12 -0800)]
new gotest shell script (will be a proper command some day, probably)
automates construction and execution of unit tests.

R=rsc
DELTA=60  (58 added, 0 deleted, 2 changed)
OCL=19482
CL=19484

16 years agoadd build step to install debuggers setgid procmod.
Russ Cox [Tue, 18 Nov 2008 18:08:46 +0000 (10:08 -0800)]
add build step to install debuggers setgid procmod.
they have to go in /usr/local/bin
because the setgid bit is ignored in /Users.

R=r
DELTA=54  (49 added, 0 deleted, 5 changed)
OCL=19424
CL=19463

16 years agoimport syntax incorrect
Robert Griesemer [Tue, 18 Nov 2008 17:39:34 +0000 (09:39 -0800)]
import syntax incorrect

R=r
OCL=19457
CL=19457

16 years agoupdate golden.out
Russ Cox [Tue, 18 Nov 2008 17:35:42 +0000 (09:35 -0800)]
update golden.out

R=r
OCL=19455
CL=19455

16 years agouse correct lineno in nod even if yacc has looked ahead.
Russ Cox [Tue, 18 Nov 2008 17:32:05 +0000 (09:32 -0800)]
use correct lineno in nod even if yacc has looked ahead.
makes lineno correct for statements without semicolons.

R=ken
OCL=19454
CL=19454

16 years agoThe compiler should reject calling a const as though it were a
Ian Lance Taylor [Tue, 18 Nov 2008 14:25:21 +0000 (06:25 -0800)]
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

16 years agoThe compiler should reject comparisons between ints and nil.
Ian Lance Taylor [Tue, 18 Nov 2008 05:44:05 +0000 (21:44 -0800)]
The compiler should reject comparisons between ints and nil.

R=gri
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=19434
CL=19436

16 years ago- factored out tabwriter a separate writer filter
Robert Griesemer [Tue, 18 Nov 2008 03:58:52 +0000 (19:58 -0800)]
- factored out tabwriter a separate writer filter
  (to be moved into std lib eventually)
- rewrote tabwriter to use byte buffers instead of strings
  (byte buffers to be moved into stdlib eventually)
- support for recent syntax changes
- no space printed after function name and before function parameters
- comments still disabled due to a known bug

R=r
OCL=19430
CL=19430

16 years ago- allow for multiple method names per function type in an interface decl.
Robert Griesemer [Tue, 18 Nov 2008 02:11:36 +0000 (18:11 -0800)]
- allow for multiple method names per function type in an interface decl.
- added some initial language with respect to exports

R=r
DELTA=95  (47 added, 31 deleted, 17 changed)
OCL=19407
CL=19426

16 years ago* faster atof for common cases
Russ Cox [Tue, 18 Nov 2008 01:22:51 +0000 (17:22 -0800)]
* faster atof for common cases
  (gets 3x speedup in go; got 40x in c)
* handle and test overflow

R=r
DELTA=217  (200 added, 0 deleted, 17 changed)
OCL=19399
CL=19422

16 years agowork around more commonly-unreachable 6g code sequences.
Russ Cox [Tue, 18 Nov 2008 01:16:50 +0000 (17:16 -0800)]
work around more commonly-unreachable 6g code sequences.

R=r
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=19405
CL=19420

16 years agoadd gobuild to build
Russ Cox [Tue, 18 Nov 2008 00:59:04 +0000 (16:59 -0800)]
add gobuild to build

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=19404
CL=19415

16 years ago- new() accepts too many arguments
Robert Griesemer [Tue, 18 Nov 2008 00:46:56 +0000 (16:46 -0800)]
- new() accepts too many arguments

R=r
OCL=19413
CL=19413

16 years ago- interface methods must have full function type
Robert Griesemer [Tue, 18 Nov 2008 00:37:13 +0000 (16:37 -0800)]
- interface methods must have full function type

R=r
OCL=19410
CL=19410

16 years agofix the easy parts of bug120
Russ Cox [Mon, 17 Nov 2008 21:58:45 +0000 (13:58 -0800)]
fix the easy parts of bug120

R=r,ken
DELTA=66  (52 added, 3 deleted, 11 changed)
OCL=19386
CL=19389

16 years agosilence compiler warning
Ken Thompson [Mon, 17 Nov 2008 20:55:22 +0000 (12:55 -0800)]
silence compiler warning

R=r
OCL=19382
CL=19382

16 years agoupdate golden.out.
Russ Cox [Mon, 17 Nov 2008 20:44:22 +0000 (12:44 -0800)]
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

16 years agocorrectly rounded floating-point conversions
Russ Cox [Mon, 17 Nov 2008 20:34:03 +0000 (12:34 -0800)]
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

16 years agofloating point constant errors in 6g
Russ Cox [Mon, 17 Nov 2008 20:33:49 +0000 (12:33 -0800)]
floating point constant errors in 6g

R=r
OCL=19379
CL=19379

16 years agoFirst pieces of malloc.
Russ Cox [Mon, 17 Nov 2008 20:32:35 +0000 (12:32 -0800)]
First pieces of malloc.

R=r
DELTA=756  (754 added, 0 deleted, 2 changed)
OCL=19266
CL=19378

16 years agoThe scope rules have been clarified to indicate that a
Ian Lance Taylor [Mon, 17 Nov 2008 20:19:02 +0000 (12:19 -0800)]
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

16 years agoadopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
Russ Cox [Mon, 17 Nov 2008 19:51:34 +0000 (11:51 -0800)]
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

16 years agoPackage-export proposal:
Robert Griesemer [Mon, 17 Nov 2008 17:51:56 +0000 (09:51 -0800)]
Package-export proposal:
- syntax change
- missing: corresponding language

DELTA=5  (2 added, 0 deleted, 3 changed)
OCL=19221
CL=19352

16 years agorandom permutation function
Ken Thompson [Sun, 16 Nov 2008 21:02:47 +0000 (13:02 -0800)]
random permutation function
func perm(n int) *map[int]int

R=r
OCL=19340
CL=19340

16 years agofix bugs in package locals
Russ Cox [Sat, 15 Nov 2008 01:31:29 +0000 (17:31 -0800)]
fix bugs in package locals

R=ken
OCL=19299
CL=19299

16 years agoThe compilers should and do permit interface types to list
Ian Lance Taylor [Sat, 15 Nov 2008 01:28:17 +0000 (17:28 -0800)]
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

16 years agoconflicting scopes should cause error exit
Rob Pike [Sat, 15 Nov 2008 01:28:11 +0000 (17:28 -0800)]
conflicting scopes should cause error exit

TBR=rsc
OCL=19297
CL=19297

16 years agopackage-local declarations using keyword "package".
Russ Cox [Sat, 15 Nov 2008 00:35:08 +0000 (16:35 -0800)]
package-local declarations using keyword "package".

R=r
DELTA=129  (81 added, 0 deleted, 48 changed)
OCL=19283
CL=19291