]> Cypherpunks repositories - gostls13.git/log
gostls13.git
16 years agoweekly snapshot:
Robert Griesemer [Sat, 2 May 2009 02:32:41 +0000 (19:32 -0700)]
weekly snapshot:
- template-driven ast printing now can successfully
  reproduce entire Go programs

next steps:
- fine-tuning of output
- print interspersed comments
- cleanup and testing against all Go programs
- replace astprinter

R=r
OCL=28181
CL=28181

16 years agocode optmization
Ken Thompson [Sat, 2 May 2009 01:55:16 +0000 (18:55 -0700)]
code optmization
drip init function if it doesnt do anything

R=r
OCL=28180
CL=28180

16 years agocode improvement
Ken Thompson [Sat, 2 May 2009 01:07:33 +0000 (18:07 -0700)]
code improvement
better calling of morestack

R=r
OCL=28179
CL=28179

16 years agoclarifying ambiguity of evaluation order
Robert Griesemer [Sat, 2 May 2009 00:00:16 +0000 (17:00 -0700)]
clarifying ambiguity of evaluation order

R=r
DELTA=16  (0 added, 3 deleted, 13 changed)
OCL=28133
CL=28178

16 years agoCopied 8g/6g into 5g. Used sharp tools to coax a .5 file out
Kai Backman [Fri, 1 May 2009 20:21:53 +0000 (13:21 -0700)]
Copied 8g/6g into 5g. Used sharp tools to coax a .5 file out
of 5g. 5l balks at the output and running 5g with -S shows
the true extent of the disaster. Still, better than
yesterday. Maybe.

Tested on the canonical:

package main
func main() {
}

R=rsc
APPROVED=rsc
DELTA=4182  (4181 added, 0 deleted, 1 changed)
OCL=27601
CL=28175

16 years ago- incorporated feedback per rsc
Robert Griesemer [Thu, 30 Apr 2009 21:43:06 +0000 (14:43 -0700)]
- incorporated feedback per rsc
- fixed a bug and added corresponding test case

R=rsc
DELTA=114  (18 added, 29 deleted, 67 changed)
OCL=28114
CL=28128

16 years agobug146: array/slice conversion before I left missed conversions
Russ Cox [Thu, 30 Apr 2009 20:49:58 +0000 (13:49 -0700)]
bug146: array/slice conversion before I left missed conversions

R=ken
OCL=28120
CL=28124

16 years agoauto-detect whether to use IPv6 or IPv4 kernel interface
Russ Cox [Thu, 30 Apr 2009 20:41:36 +0000 (13:41 -0700)]
auto-detect whether to use IPv6 or IPv4 kernel interface

R=r
DELTA=12  (9 added, 0 deleted, 3 changed)
OCL=28096
CL=28118

16 years agobetter error messages, not that anyone ever sees them
Russ Cox [Thu, 30 Apr 2009 20:40:55 +0000 (13:40 -0700)]
better error messages, not that anyone ever sees them

R=r
DELTA=30  (9 added, 1 deleted, 20 changed)
OCL=28104
CL=28117

16 years agochange 6l library directory flag to -L,
Russ Cox [Thu, 30 Apr 2009 20:32:39 +0000 (13:32 -0700)]
change 6l library directory flag to -L,
to match traditional c linkers.

R=r
DELTA=42  (8 added, 12 deleted, 22 changed)
OCL=28101
CL=28115

16 years agodon't print binary data. add TODO for better errors.
Rob Pike [Thu, 30 Apr 2009 06:33:48 +0000 (23:33 -0700)]
don't print binary data. add TODO for better errors.

TBR=rsc
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=28066
CL=28070

16 years agorename variables for clarity.
Rob Pike [Thu, 30 Apr 2009 05:16:53 +0000 (22:16 -0700)]
rename variables for clarity.
add test for structure alignment/offset.

R=gri
DELTA=49  (35 added, 0 deleted, 14 changed)
OCL=28068
CL=28068

16 years agoConversion from array to slices should work like assignment:
Ian Lance Taylor [Thu, 30 Apr 2009 03:15:59 +0000 (20:15 -0700)]
Conversion from array to slices should work like assignment:
you should be able to convert a pointer to an array to a
slice, you should not be able to convert an array to a slice.
Currently 6g works the other way around.

R=ken,rsc
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=28033
CL=28067

16 years agodon't set CLONE_PTRACE -- it confuses strace
Russ Cox [Thu, 30 Apr 2009 01:54:44 +0000 (18:54 -0700)]
don't set CLONE_PTRACE -- it confuses strace

R=r
DELTA=4  (3 added, 1 deleted, 0 changed)
OCL=28063
CL=28065

16 years agoif the process stops with SIGTRAP (breakpoint),
Russ Cox [Thu, 30 Apr 2009 01:53:01 +0000 (18:53 -0700)]
if the process stops with SIGTRAP (breakpoint),
don't relay the signal when restarting it.

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=28060
CL=28064

16 years agoBug in reflect found by gri. Structs in 6g have a minimum alignment.
Rob Pike [Thu, 30 Apr 2009 01:51:12 +0000 (18:51 -0700)]
Bug in reflect found by gri.  Structs in 6g have a minimum alignment.
iant: will this be ok in gccgo?

R=rsc
DELTA=9  (8 added, 0 deleted, 1 changed)
OCL=28059
CL=28062

16 years agodrop unused result name - trivial change.
Rob Pike [Thu, 30 Apr 2009 01:20:09 +0000 (18:20 -0700)]
drop unused result name - trivial change.

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

16 years agoexit with error status EPIPE if
Russ Cox [Thu, 30 Apr 2009 01:18:42 +0000 (18:18 -0700)]
exit with error status EPIPE if
one fd gets too many EPIPEs in a row
during write.

R=r
DELTA=10  (9 added, 0 deleted, 1 changed)
OCL=28057
CL=28057

16 years agoIgnore SIGPIPE such that write returns EPIPE.
Brendan O'Dea [Thu, 30 Apr 2009 00:36:58 +0000 (17:36 -0700)]
Ignore SIGPIPE such that write returns EPIPE.

Currently a http server will be killed on receipt of SIGPIPE
if a client closes a socket which the server is trying to
write to.

R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27959
CL=28055

16 years agoFix channels used by WaitWrite (http server hangs on writes
Brendan O'Dea [Thu, 30 Apr 2009 00:36:37 +0000 (17:36 -0700)]
Fix channels used by WaitWrite (http server hangs on writes
which hit EAGAIN).

R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27955
CL=28054

16 years agotypo in spec
Robert Griesemer [Wed, 29 Apr 2009 18:45:08 +0000 (11:45 -0700)]
typo in spec

R=tgs
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=28032
CL=28032

16 years agoSome adjustments to godoc:
Robert Griesemer [Wed, 29 Apr 2009 02:11:37 +0000 (19:11 -0700)]
Some adjustments to godoc:
- work-around for incorrect import path
- added tmpl root in order to run against a goroot w/o templates
- clarifications

Daily snapshot of syntax-driven formatter. Some progress.

Updated gccgo Makefile.

TBR=r
OCL=28004
CL=28004

16 years agoallow "defer close(chan)"
Ken Thompson [Wed, 29 Apr 2009 00:20:18 +0000 (17:20 -0700)]
allow "defer close(chan)"
bug found by anton

R=r
OCL=28001
CL=28001

16 years agobug 139
Ken Thompson [Tue, 28 Apr 2009 20:52:56 +0000 (13:52 -0700)]
bug 139

R=r
OCL=27987
CL=27987

16 years agobug131 has been fixed with no change
Ken Thompson [Tue, 28 Apr 2009 20:04:01 +0000 (13:04 -0700)]
bug131 has been fixed with no change

R=r
OCL=27980
CL=27980

16 years agobug 145
Ken Thompson [Tue, 28 Apr 2009 19:28:31 +0000 (12:28 -0700)]
bug 145

R=r
OCL=27979
CL=27979

16 years agofix for broken build
Robert Griesemer [Tue, 28 Apr 2009 16:56:33 +0000 (09:56 -0700)]
fix for broken build

TBR=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27969
CL=27969

16 years agoRecognize gcco error messages.
Ian Lance Taylor [Tue, 28 Apr 2009 14:16:03 +0000 (07:16 -0700)]
Recognize gcco error messages.

declbad.go:15:3: error: variables redeclared but no variable is new
declbad.go:20:3: error: redefinition of 'f'
declbad.go:19:3: note: previous definition of 'f' was here
declbad.go:25:3: error: redefinition of 'i'
declbad.go:24:3: note: previous definition of 'i' was here
declbad.go:30:3: error: variables redeclared but no variable is new
declbad.go:35:3: error: redefinition of 'i'
declbad.go:34:3: note: previous definition of 'i' was here
declbad.go:40:3: error: variables redeclared but no variable is new
declbad.go:45:3: error: variables redeclared but no variable is new

R=r
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=27934
CL=27957

16 years agoAdd a HTTP handler to the exvar package.
David Symonds [Tue, 28 Apr 2009 11:26:07 +0000 (04:26 -0700)]
Add a HTTP handler to the exvar package.

R=r
APPROVED=r
DELTA=20  (11 added, 6 deleted, 3 changed)
OCL=27782
CL=27950

16 years agoAdd more dependencies for lib/go.
David Symonds [Tue, 28 Apr 2009 04:52:30 +0000 (21:52 -0700)]
Add more dependencies for lib/go.
This makes "make nuke install" work again.

R=r
APPROVED=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=27929
CL=27932

16 years agoimplement .alternates
Rob Pike [Tue, 28 Apr 2009 04:04:46 +0000 (21:04 -0700)]
implement .alternates

R=rsc
OCL=27928
CL=27928

16 years agoFix the chunked encoding - terminate the chunk with CRLF.
Stephen Ma [Mon, 27 Apr 2009 07:38:04 +0000 (00:38 -0700)]
Fix the chunked encoding - terminate the chunk with CRLF.

R=rsc
APPROVED=r
DELTA=11  (10 added, 0 deleted, 1 changed)
OCL=27723
CL=27879

16 years agoAdd string-valued variables to exvar.
David Symonds [Mon, 27 Apr 2009 03:57:01 +0000 (20:57 -0700)]
Add string-valued variables to exvar.

R=r
APPROVED=r
DELTA=62  (58 added, 1 deleted, 3 changed)
OCL=27756
CL=27877

16 years agoflags.Usage() calls fmt.Fprintf() with incorrect args
Brendan O'Dea [Mon, 27 Apr 2009 01:36:17 +0000 (18:36 -0700)]
flags.Usage() calls fmt.Fprintf() with incorrect args

R=r
APPROVED=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27777
CL=27876

16 years ago- install doc in lib/go
Robert Griesemer [Sun, 26 Apr 2009 00:01:41 +0000 (17:01 -0700)]
- install doc in lib/go
- adjust dependent files

R=rsc
DELTA=1132  (567 added, 562 deleted, 3 changed)
OCL=27862
CL=27862

16 years ago- minor formatting and capitalization (export) changes
Robert Griesemer [Sat, 25 Apr 2009 23:52:30 +0000 (16:52 -0700)]
- minor formatting and capitalization (export) changes

TBR=rsc
OCL=27861
CL=27861

16 years ago- renamed docprinter.go -> doc.go
Robert Griesemer [Sat, 25 Apr 2009 23:48:00 +0000 (16:48 -0700)]
- renamed docprinter.go -> doc.go
- adjusted dependent files
  (no changes in doc.go)

TBR=rsc
OCL=27860
CL=27860

16 years agodaily snapshot:
Robert Griesemer [Sat, 25 Apr 2009 23:36:17 +0000 (16:36 -0700)]
daily snapshot:
- more work on template-driven ast formatting
- added preliminary test suite
- added documentation

TBR=r
OCL=27858
CL=27858

16 years agocannot declare a variable in new scope with same name as type in outer scope
Robert Griesemer [Sat, 25 Apr 2009 20:41:56 +0000 (13:41 -0700)]
cannot declare a variable in new scope with same name as type in outer scope
(same as bug144.go but for types instead of constants)

TBR=ken
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=27855
CL=27855

16 years agodaily snapshot:
Robert Griesemer [Sat, 25 Apr 2009 00:22:58 +0000 (17:22 -0700)]
daily snapshot:
- more work on template-driven ast printing

R=r
OCL=27851
CL=27851

16 years agorecognize a defined constant
Ken Thompson [Fri, 24 Apr 2009 23:43:31 +0000 (16:43 -0700)]
recognize a defined constant
as a new name in a later declaration
(bug 144)

R=r
OCL=27850
CL=27850

16 years ago- fixed a couple of potential end-less loops
Robert Griesemer [Fri, 24 Apr 2009 19:59:09 +0000 (12:59 -0700)]
- fixed a couple of potential end-less loops
  (no progress in presence of syntax errors)
- end parsing early if source doesn't start
  proper package clause

R=iant
DELTA=18  (7 added, 6 deleted, 5 changed)
OCL=27840
CL=27842

16 years ago- cannot declare local variable named like a constant in outer scope
Robert Griesemer [Fri, 24 Apr 2009 04:54:07 +0000 (21:54 -0700)]
- cannot declare local variable named like a constant in outer scope
- submitted per discussion w/ ken

TBR=ken
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=27824
CL=27826

16 years agodaily snapshot:
Robert Griesemer [Fri, 24 Apr 2009 04:53:01 +0000 (21:53 -0700)]
daily snapshot:
- minor bug fixes in pretty, godoc
- first cut at template-driven printing of ast

TBR=r
OCL=27825
CL=27825

16 years agoClear upper bits of 64-bit indexing register when using types smaller than 64 bits.
Ben Eitzen [Fri, 24 Apr 2009 01:23:34 +0000 (18:23 -0700)]
Clear upper bits of 64-bit indexing register when using types smaller than 64 bits.

APPROVED=ken
OCL=27811
CL=27823

16 years agofixed typo in EBNF of ENBF
Robert Griesemer [Thu, 23 Apr 2009 21:42:21 +0000 (14:42 -0700)]
fixed typo in EBNF of ENBF

R=iant
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27801
CL=27806

16 years agoadd {.tab}
Rob Pike [Wed, 22 Apr 2009 07:53:35 +0000 (00:53 -0700)]
add {.tab}
fix a couple of comments

TBR=rsc
OCL=27716
CL=27716

16 years agoallow godoc to match on regular expressions.
Rob Pike [Wed, 22 Apr 2009 05:46:19 +0000 (22:46 -0700)]
allow godoc to match on regular expressions.
if the name contains a metacharacter, use regexp matching;
otherwise require strict equality.

now
godoc flag '.*Var'
can give you all the FooVar functions.

R=gri
DELTA=19  (19 added, 0 deleted, 0 changed)
OCL=27711
CL=27713

16 years agofix template.
Rob Pike [Wed, 22 Apr 2009 05:26:08 +0000 (22:26 -0700)]
fix template.
.or works in .repeated so remove the comment.
the bug was in the template: .section executes iff the field is non-empty.

R=gri
DELTA=13  (6 added, 7 deleted, 0 changed)
OCL=27710
CL=27712

16 years agoExtend fixedbugs/bug143.go with function return values,
David Symonds [Wed, 22 Apr 2009 03:26:26 +0000 (20:26 -0700)]
Extend fixedbugs/bug143.go with function return values,
as a regression test for the fix made in s2/27706.

R=r
APPROVED=r
DELTA=14  (13 added, 0 deleted, 1 changed)
OCL=27707
CL=27709

16 years agoClean up some more code after bug143 was fixed.
David Symonds [Wed, 22 Apr 2009 03:24:28 +0000 (20:24 -0700)]
Clean up some more code after bug143 was fixed.

R=r
APPROVED=r
DELTA=6  (0 added, 5 deleted, 1 changed)
OCL=27708
CL=27708

16 years ago2 minor bugs.
Ken Thompson [Wed, 22 Apr 2009 02:52:13 +0000 (19:52 -0700)]
2 minor bugs.
lv context for some [] operations
calling implicit(*map) before walk.

R=r
OCL=27706
CL=27706

16 years agobug in shift of longer operand
Ken Thompson [Wed, 22 Apr 2009 02:38:58 +0000 (19:38 -0700)]
bug in shift of longer operand
by a shorter operand. the bits
in the difference were not cheared.

R=r
OCL=27705
CL=27705

16 years agoremove lots of accumulated crud:
Robert Griesemer [Wed, 22 Apr 2009 01:37:48 +0000 (18:37 -0700)]
remove lots of accumulated crud:
- delete utility files which contained functionality that is now elsewhere
  (or saved the files away for now)
- cleanup Makefile (remove unnecessary deps)
- minor adjustments to godoc, fixed a couple of bugs
- make pretty.go self-contained

TBR=r
DELTA=625  (81 added, 510 deleted, 34 changed)
OCL=27700
CL=27702

16 years agoBug 143 is fixed, so clean up some of exvar.
David Symonds [Wed, 22 Apr 2009 01:36:53 +0000 (18:36 -0700)]
Bug 143 is fixed, so clean up some of exvar.

R=r
APPROVED=r
DELTA=8  (3 added, 1 deleted, 4 changed)
OCL=27699
CL=27701

16 years agobug143 is fixed
Rob Pike [Wed, 22 Apr 2009 01:11:34 +0000 (18:11 -0700)]
bug143 is fixed

R=dsymonds
DELTA=58  (26 added, 32 deleted, 0 changed)
OCL=27698
CL=27698

16 years agosupply default indirection to
Ken Thompson [Wed, 22 Apr 2009 00:00:08 +0000 (17:00 -0700)]
supply default indirection to
map indexing - bug 143

R=r
OCL=27695
CL=27695

16 years agoChange exvar to use a goroutine channel worker instead of a mutex for synchronisation.
David Symonds [Tue, 21 Apr 2009 23:50:09 +0000 (16:50 -0700)]
Change exvar to use a goroutine channel worker instead of a mutex for synchronisation.
Also it should be more testable, as there's less global state.

R=r
APPROVED=r
DELTA=113  (38 added, 12 deleted, 63 changed)
OCL=27653
CL=27694

16 years agominor adjustment to comment formatting for better godoc output
Robert Griesemer [Tue, 21 Apr 2009 22:30:17 +0000 (15:30 -0700)]
minor adjustment to comment formatting for better godoc output

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=27687
CL=27689

16 years agominor adjustments to comments for better godoc output
Robert Griesemer [Tue, 21 Apr 2009 22:14:34 +0000 (15:14 -0700)]
minor adjustments to comments for better godoc output

R=r
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=27686
CL=27688

16 years ago- documentation for bignum package
Robert Griesemer [Tue, 21 Apr 2009 17:52:00 +0000 (10:52 -0700)]
- documentation for bignum package
- removed some constants from public interface

R=r
DELTA=375  (238 added, 14 deleted, 123 changed)
OCL=27636
CL=27668

16 years agoupdate golden for bug 143
Rob Pike [Tue, 21 Apr 2009 07:05:19 +0000 (00:05 -0700)]
update golden for bug 143

R=dsymonds
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=27654
CL=27654

16 years agoRefactor exvar to use interface types, and add mapVar.
David Symonds [Tue, 21 Apr 2009 05:38:14 +0000 (22:38 -0700)]
Refactor exvar to use interface types, and add mapVar.

R=r
APPROVED=r
DELTA=170  (136 added, 6 deleted, 28 changed)
OCL=27628
CL=27652

16 years agoAdd bug143 to demonstrate bug with "v, ok :=" on pointers to maps.
David Symonds [Tue, 21 Apr 2009 04:03:38 +0000 (21:03 -0700)]
Add bug143 to demonstrate bug with "v, ok :=" on pointers to maps.

R=r
APPROVED=r
DELTA=26  (26 added, 0 deleted, 0 changed)
OCL=27651
CL=27651

16 years agorewrite template library:
Rob Pike [Tue, 21 Apr 2009 01:51:13 +0000 (18:51 -0700)]
rewrite template library:
- separate parsing from execution
- rearrange code for organizational clarity
- provide execution errors and parse-time errors
- implement .or for repeated

TBR=rsc
OCL=27650
CL=27650

16 years agoMove iterable package to usr/dsymonds/.
David Symonds [Tue, 21 Apr 2009 01:13:14 +0000 (18:13 -0700)]
Move iterable package to usr/dsymonds/.

R=r
APPROVED=r
DELTA=598  (330 added, 266 deleted, 2 changed)
OCL=27627
CL=27649

16 years ago- book-keeping in the TODO section:
Robert Griesemer [Mon, 20 Apr 2009 22:32:20 +0000 (15:32 -0700)]
- book-keeping in the TODO section:
  - removed closed, resolved, or off-the-table items
  - consolidated remaining items
- no changes to the spec

R=r
DELTA=116  (1 added, 102 deleted, 13 changed)
OCL=27596
CL=27640

16 years agomissing '}' (found by pretty)
Robert Griesemer [Mon, 20 Apr 2009 22:23:21 +0000 (15:23 -0700)]
missing '}' (found by pretty)

R=r
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=27633
CL=27639

16 years agoOops, forgot to commit this change.
David Symonds [Mon, 20 Apr 2009 07:43:10 +0000 (00:43 -0700)]
Oops, forgot to commit this change.

R=r
APPROVED=r
DELTA=3  (1 added, 0 deleted, 2 changed)
OCL=27624
CL=27626

16 years agoUse the mutex in exvar.Set since map access is not atomic.
David Symonds [Mon, 20 Apr 2009 07:42:08 +0000 (00:42 -0700)]
Use the mutex in exvar.Set since map access is not atomic.

Imagine your var has a value of zero. If you have a goroutine calling Set(5),
and another calling Increment(+1), then you only want one of these outcomes:
  - Set completes first, and then Increment occurs => 6
  - Increment completes first, and then Set occurs => 5

However, you could get a sequence:
  - read (for Increment) 0
  - set (for Set) 5
  - write (for Increment) 1
This results in a value of 1, which is undesirable.

Kudos to dnadasi for catching this.

R=r
APPROVED=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=27625
CL=27625

16 years agoAdd Inject function to iterable package.
David Symonds [Mon, 20 Apr 2009 06:52:29 +0000 (23:52 -0700)]
Add Inject function to iterable package.
Fix a couple of style mistakes.

R=r,rsc
APPROVED=r
DELTA=34  (30 added, 1 deleted, 3 changed)
OCL=27623
CL=27623

16 years agoInitial cut at an "exported variables" (exvar) package.
David Symonds [Mon, 20 Apr 2009 04:17:27 +0000 (21:17 -0700)]
Initial cut at an "exported variables" (exvar) package.

This handles integer-valued vars in a singleton struct, and exports functions
for incrementing, setting and getting those vars, as well as rendering all the
vars in a standard format.

Demonstrate the use of the exvar package in the http/triv server.

R=dcross,r
APPROVED=r
DELTA=122  (122 added, 0 deleted, 0 changed)
OCL=27617
CL=27622

16 years agotypo in message
Rob Pike [Mon, 20 Apr 2009 04:12:48 +0000 (21:12 -0700)]
typo in message

R=ken
OCL=27621
CL=27621

16 years agoadd another test to decl to see that result vars are redeclarable.
Rob Pike [Mon, 20 Apr 2009 04:12:13 +0000 (21:12 -0700)]
add another test to decl to see that result vars are redeclarable.

R=ken
OCL=27620
CL=27620

16 years agoReadn is a silly name when there's no n. Change to FullRead.
Rob Pike [Mon, 20 Apr 2009 04:02:29 +0000 (21:02 -0700)]
Readn is a silly name when there's no n.  Change to FullRead.

R=gri
DELTA=15  (0 added, 0 deleted, 15 changed)
OCL=27619
CL=27619

16 years agospec change for redeclaration
Rob Pike [Mon, 20 Apr 2009 03:04:15 +0000 (20:04 -0700)]
spec change for redeclaration

R=iant,gri
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=27615
CL=27618

16 years agotests for redeclaration in :=
Rob Pike [Sun, 19 Apr 2009 00:21:00 +0000 (17:21 -0700)]
tests for redeclaration in :=

R=ken
DELTA=71  (71 added, 0 deleted, 0 changed)
OCL=27616
CL=27616

16 years agothe Big Error Shift applied to lib/time/zoneinfo.go.
Rob Pike [Sat, 18 Apr 2009 23:44:13 +0000 (16:44 -0700)]
the Big Error Shift applied to lib/time/zoneinfo.go.

R=gri
DELTA=22  (5 added, 0 deleted, 17 changed)
OCL=27608
CL=27614

16 years agomixed old/new declaration
Ken Thompson [Sat, 18 Apr 2009 20:58:04 +0000 (13:58 -0700)]
mixed old/new declaration
exact spec:
a) must be a multi-assignment w :=
b) a proper subset of the lhs
   can be declared in same block
   with the same type with no
   "redeclaration" error

R=r
OCL=27610
CL=27610

16 years agoadd -P pkgdir option to 6l to have it look first in pkgdir for a package.
Rob Pike [Sat, 18 Apr 2009 02:39:45 +0000 (19:39 -0700)]
add -P pkgdir option to 6l to have it look first in pkgdir for a package.
this allows gotest to find the locally built package when doing
make
gotest
without this option, one would have to say
make install
gotest
which kinda defeats the purpose

based on discussions with rsc.

R=ken,rsc
DELTA=12  (10 added, 1 deleted, 1 changed)
OCL=27606
CL=27606

16 years agoStep 2 of the Big Error Shift.
Rob Pike [Fri, 17 Apr 2009 07:36:15 +0000 (00:36 -0700)]
Step 2 of the Big Error Shift.
Change the representation of errors in "os" to be cleaner.
(But they are not really representative of the power of the new scheme.)
Step 3 will be to remove all references to os.NewError.
Step 4 will be to delete the second half of lib/os/error.go.

R=rsc
OCL=27587
CL=27587

16 years agoStep 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors...
Rob Pike [Fri, 17 Apr 2009 07:08:24 +0000 (00:08 -0700)]
Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated.

Step 2 will make os's error support internally much cleaner.

R=rsc
OCL=27586
CL=27586

16 years agomake string(array) take []byte only (and thus *[10]byte but not [10]byte)
Russ Cox [Fri, 17 Apr 2009 06:07:30 +0000 (23:07 -0700)]
make string(array) take []byte only (and thus *[10]byte but not [10]byte)

R=ken
OCL=27581
CL=27585

16 years agomake string take []byte only, so have to use *[10]byte to convert
Russ Cox [Fri, 17 Apr 2009 06:07:15 +0000 (23:07 -0700)]
make string take []byte only, so have to use *[10]byte to convert

R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=27578
CL=27584

16 years agoregenerate makefile with installed gobuild
Russ Cox [Fri, 17 Apr 2009 06:07:00 +0000 (23:07 -0700)]
regenerate makefile with installed gobuild

R=r
DELTA=23  (8 added, 0 deleted, 15 changed)
OCL=27577
CL=27583

16 years agospec edits for array slice change
Russ Cox [Fri, 17 Apr 2009 06:06:48 +0000 (23:06 -0700)]
spec edits for array slice change

R=r
DELTA=6  (0 added, 2 deleted, 4 changed)
OCL=27532
CL=27582

16 years agofix linux build
Rob Pike [Fri, 17 Apr 2009 05:43:34 +0000 (22:43 -0700)]
fix linux build

R=rsc
OCL=27579
CL=27579

16 years agoConvert go tree to hierarchical pkg directory:
Russ Cox [Fri, 17 Apr 2009 03:52:37 +0000 (20:52 -0700)]
Convert go tree to hierarchical pkg directory:

import (
"vector" -> "container/vector"
"ast" -> "go/ast"
"sha1" -> "hash/sha1"
etc.
)

and update Makefiles.  Because I did the conversion
semi-automatically, I sorted all the import blocks
as a post-processing.  Some files have therefore
changed that didn't strictly need to.

Rename local packages to lower case.
The upper/lower distinction doesn't work on OS X
and complicates the "single-package directories
with the same package name as directory name"
heuristic used by gobuild and godoc to create
the correlation between source and binary locations.
Now that we have a plan to avoid globally unique
names, the upper/lower is unnecessary.

The renamings will cause trouble for a few users,
but so will the change in import paths.
This way, the two maintenance fixes are rolled into
one inconvenience.

R=r
OCL=27573
CL=27575

16 years agobuild packages in obj/ subdirectory that mimics $GOROOT/pkg.
Russ Cox [Fri, 17 Apr 2009 03:52:13 +0000 (20:52 -0700)]
build packages in obj/ subdirectory that mimics $GOROOT/pkg.
for example, if building in src/lib/container,
objects go in obj/container/, so that 6g -Iobj
will find "container/vector".

install packages in hierarchy in $GOROOT.

this change only updates gobuild.
another change will have to update all
the sources to refer to "container/vector" etc
and regenerate all the Makefiles.

there are some pretty lame functions here
(e.g., Mkdir, Remove, the Getenv("PWD"))
but i will implement better ones in another CL.

R=r
DELTA=117  (99 added, 2 deleted, 16 changed)
OCL=27550
CL=27574

16 years agodocument template
Rob Pike [Fri, 17 Apr 2009 00:44:23 +0000 (17:44 -0700)]
document template

R=rsc
DELTA=92  (73 added, 0 deleted, 19 changed)
OCL=27566
CL=27572

16 years agoregenerate Makefiles.
Russ Cox [Thu, 16 Apr 2009 07:18:37 +0000 (00:18 -0700)]
regenerate Makefiles.
fix bug in RPC.go (import "RPC" not "rpc.pb")

R=r
DELTA=483  (261 added, 64 deleted, 158 changed)
OCL=27547
CL=27549

16 years agorewrite gobuild in go.
Russ Cox [Thu, 16 Apr 2009 07:18:11 +0000 (00:18 -0700)]
rewrite gobuild in go.

R=r
DELTA=1305  (704 added, 590 deleted, 11 changed)
OCL=27546
CL=27548

16 years agopanicln: emit just one newline
Russ Cox [Thu, 16 Apr 2009 05:38:09 +0000 (22:38 -0700)]
panicln: emit just one newline

R=ken
OCL=27537
CL=27545

16 years agofix gotest by fixing nm -s to print in file order by storing a sequence number
Rob Pike [Thu, 16 Apr 2009 04:57:55 +0000 (21:57 -0700)]
fix gotest by fixing nm -s to print in file order by storing a sequence number
as the .6 file is read.   now tests will be run in file order.

R=rsc
DELTA=9  (6 added, 1 deleted, 2 changed)
OCL=27542
CL=27544

16 years agofix one word for consistency.
Rob Pike [Thu, 16 Apr 2009 04:49:50 +0000 (21:49 -0700)]
fix one word for consistency.

R=gri
OCL=27543
CL=27543

16 years agoupdate tutorial for new slicing rules.
Rob Pike [Thu, 16 Apr 2009 03:53:07 +0000 (20:53 -0700)]
update tutorial for new slicing rules.

R=rsc
DELTA=13  (6 added, 0 deleted, 7 changed)
OCL=27539
CL=27541

16 years agotweak grammar and associated prose to permit things like x.y in range clauses.
Rob Pike [Thu, 16 Apr 2009 03:51:17 +0000 (20:51 -0700)]
tweak grammar and associated prose to permit things like x.y in range clauses.

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

16 years agospec for range on strings
Rob Pike [Thu, 16 Apr 2009 03:28:25 +0000 (20:28 -0700)]
spec for range on strings

R=rsc,iant
DELTA=17  (11 added, 0 deleted, 6 changed)
OCL=27529
CL=27535

16 years agocode changes for array conversion.
Russ Cox [Thu, 16 Apr 2009 03:27:45 +0000 (20:27 -0700)]
code changes for array conversion.
as a reminder, the old conversion
was that you could write

var arr [10]byte;
var slice []byte;
slice = arr;

but now you have to write

slice = &arr;

the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).

also, removed utf8.EncodeRuneToString
in favor of string(rune).

R=r
DELTA=83  (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534

16 years agocompiler implementation of array slice change
Russ Cox [Thu, 16 Apr 2009 03:27:22 +0000 (20:27 -0700)]
compiler implementation of array slice change

R=ken
OCL=27533
CL=27533