]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agosudoaddable odot
Kai Backman [Mon, 6 Jul 2009 16:23:41 +0000 (09:23 -0700)]
sudoaddable odot

R=rsc
APPROVED=rsc
DELTA=7  (0 added, 1 deleted, 6 changed)
OCL=31189
CL=31191

15 years agofix float32 comparison. was doing l op l instead of l op r.
Russ Cox [Mon, 6 Jul 2009 16:05:33 +0000 (09:05 -0700)]
fix float32 comparison.  was doing l op l instead of l op r.

R=ken
OCL=31190
CL=31190

15 years agoagen, sgen, cgen_callret, cgen_asop, D_ADDR handling, gmove
Kai Backman [Mon, 6 Jul 2009 13:42:37 +0000 (06:42 -0700)]
agen, sgen, cgen_callret, cgen_asop, D_ADDR handling, gmove
8bit and 16bit, some optoas, replaced Addr.index with
Addr.name

empty function compiles, mutex compiles

R=rsc
APPROVED=rsc
DELTA=908  (83 added, 41 deleted, 784 changed)
OCL=31127
CL=31188

15 years agofixed bug that cause -g to segfault
Kai Backman [Mon, 6 Jul 2009 13:36:25 +0000 (06:36 -0700)]
fixed bug that cause -g to segfault

R=rsc
APPROVED=rsc
DELTA=48  (30 added, 16 deleted, 2 changed)
OCL=31152
CL=31187

15 years agoRemove assumption about google.com being the default search domain.
David Symonds [Sun, 5 Jul 2009 22:00:11 +0000 (15:00 -0700)]
Remove assumption about google.com being the default search domain.

R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31151
CL=31168

15 years agoanother seg fault
Ken Thompson [Sat, 4 Jul 2009 20:59:08 +0000 (13:59 -0700)]
another seg fault

R=r
OCL=31156
CL=31156

15 years agobug163
Russ Cox [Fri, 3 Jul 2009 20:34:05 +0000 (13:34 -0700)]
bug163

R=ken
OCL=31149
CL=31149

15 years agochange bug163 to use actual non-letter in identifier
Russ Cox [Fri, 3 Jul 2009 20:33:00 +0000 (13:33 -0700)]
change bug163 to use actual non-letter in identifier

R=r,iant
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31146
CL=31148

15 years agoput gob into the standard build
Rob Pike [Fri, 3 Jul 2009 19:54:59 +0000 (12:54 -0700)]
put gob into the standard build

R=rsc
DELTA=77  (76 added, 0 deleted, 1 changed)
OCL=31147
CL=31147

15 years agomaps have == so maps should work as map keys.
Russ Cox [Fri, 3 Jul 2009 16:45:15 +0000 (09:45 -0700)]
maps have == so maps should work as map keys.
fix tests of bad map keys to use slices instead.

R=r
DELTA=7  (0 added, 1 deleted, 6 changed)
OCL=31123
CL=31145

15 years agomaps have == so maps are okay as map keys.
Russ Cox [Fri, 3 Jul 2009 16:44:59 +0000 (09:44 -0700)]
maps have == so maps are okay as map keys.
alignment issue is fixed.

R=ken
OCL=31124
CL=31144

15 years agosys.cas for mutex
Kai Backman [Fri, 3 Jul 2009 05:05:06 +0000 (22:05 -0700)]
sys.cas for mutex

R=rsc
APPROVED=rsc
DELTA=28  (28 added, 0 deleted, 0 changed)
OCL=31128
CL=31130

15 years agominor comment and debug flag for dumping all oplooks.
Kai Backman [Fri, 3 Jul 2009 04:35:39 +0000 (21:35 -0700)]
minor comment and debug flag for dumping all oplooks.

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=31016
CL=31126

15 years agomove Structrnd to runtime.h
Russ Cox [Fri, 3 Jul 2009 04:25:46 +0000 (21:25 -0700)]
move Structrnd to runtime.h

R=ken
OCL=31125
CL=31125

15 years agoslices
Rob Pike [Fri, 3 Jul 2009 01:02:42 +0000 (18:02 -0700)]
slices

R=rsc
DELTA=59  (44 added, 13 deleted, 2 changed)
OCL=31105
CL=31105

15 years agoindirection on array elements.
Rob Pike [Fri, 3 Jul 2009 00:21:48 +0000 (17:21 -0700)]
indirection on array elements.

R=rsc
DELTA=57  (34 added, 10 deleted, 13 changed)
OCL=31098
CL=31101

15 years agoadd Uitoa etc.
Russ Cox [Thu, 2 Jul 2009 23:57:46 +0000 (16:57 -0700)]
add Uitoa etc.

R=r
DELTA=113  (89 added, 9 deleted, 15 changed)
OCL=31087
CL=31096

15 years agoarrays, not slices, and only with non-pointer elements.
Rob Pike [Thu, 2 Jul 2009 23:43:46 +0000 (16:43 -0700)]
arrays, not slices, and only with non-pointer elements.
(actually slices encode but do not decode yet)

R=rsc
DELTA=221  (82 added, 65 deleted, 74 changed)
OCL=31095
CL=31095

15 years agomake a description of the slice header public
Rob Pike [Thu, 2 Jul 2009 23:28:04 +0000 (16:28 -0700)]
make a description of the slice header public

R=rsc
DELTA=18  (3 added, 0 deleted, 15 changed)
OCL=31086
CL=31094

15 years agofix atoi test
Russ Cox [Thu, 2 Jul 2009 23:24:44 +0000 (16:24 -0700)]
fix atoi test

R=r
DELTA=28  (5 added, 0 deleted, 23 changed)
OCL=31093
CL=31093

15 years agoRecognize gccgo error message.
Ian Lance Taylor [Thu, 2 Jul 2009 22:55:17 +0000 (15:55 -0700)]
Recognize gccgo error message.

bug022.go:8:13: error: attempt to index object which is not array, string, or map

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

15 years agoRecognize gccgo error messages.
Ian Lance Taylor [Thu, 2 Jul 2009 22:54:57 +0000 (15:54 -0700)]
Recognize gccgo error messages.

(Amusing side note: the GNU coding standards say: Please do
not use the term "illegal" to refer to erroneous input to a
computer program.  Please use "invalid" for this, and reserve
the term "illegal" for activities prohibited by law.)

indirect1.go:35:3: error: argument must be string or array or slice or map
indirect1.go:36:3: error: argument must be string or array or slice or map
indirect1.go:38:3: error: argument must be string or array or slice or map
indirect1.go:41:3: error: argument must be string or array or slice or map
indirect1.go:42:3: error: argument must be string or array or slice or map
indirect1.go:44:3: error: argument must be string or array or slice or map
indirect1.go:55:3: error: argument must be string or array or slice or map
indirect1.go:56:3: error: argument must be string or array or slice or map
indirect1.go:58:3: error: argument must be string or array or slice or map
indirect1.go:61:3: error: argument must be array or slice
indirect1.go:62:3: error: argument must be array or slice
indirect1.go:64:3: error: argument must be array or slice

R=rsc
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=31081
CL=31088

15 years ago- store trailing comments after top-level declarations in ast
Robert Griesemer [Thu, 2 Jul 2009 22:38:36 +0000 (15:38 -0700)]
- store trailing comments after top-level declarations in ast
- remove a test case w/ syntax errors from test suite

R=rsc
DELTA=104  (44 added, 5 deleted, 55 changed)
OCL=31078
CL=31085

15 years agoencode and decode for nested structures.
Rob Pike [Thu, 2 Jul 2009 20:43:47 +0000 (13:43 -0700)]
encode and decode for nested structures.
fix a bug in delta encoding: only update the delta-base if something is marshaled.

R=rsc
DELTA=154  (94 added, 56 deleted, 4 changed)
OCL=31069
CL=31071

15 years agoencoders and decoders for string, []uint8
Rob Pike [Thu, 2 Jul 2009 18:21:01 +0000 (11:21 -0700)]
encoders and decoders for string, []uint8

R=rsc
DELTA=165  (145 added, 6 deleted, 14 changed)
OCL=31051
CL=31056

15 years agofix bug in $GOROOT handling: error calling Getenv.
Rob Pike [Thu, 2 Jul 2009 16:47:25 +0000 (09:47 -0700)]
fix bug in $GOROOT handling: error calling Getenv.

R=gri
OCL=31047
CL=31047

15 years agonow that we have a separate indirection test, simplify the scalar tests.
Rob Pike [Thu, 2 Jul 2009 16:22:38 +0000 (09:22 -0700)]
now that we have a separate indirection test, simplify the scalar tests.

R=rsc
DELTA=562  (8 added, 424 deleted, 130 changed)
OCL=31039
CL=31045

15 years agosimplify decoders. error checking is done higher up.
Rob Pike [Thu, 2 Jul 2009 16:22:30 +0000 (09:22 -0700)]
simplify decoders.  error checking is done higher up.
if there is an error, we will write one more value into the struct but in return
we do fewer tests in the decode.

R=rsc
DELTA=56  (0 added, 42 deleted, 14 changed)
OCL=31041
CL=31044

15 years agofix bug in decoders: got indirection wrong when allocation not required.
Rob Pike [Thu, 2 Jul 2009 15:21:42 +0000 (08:21 -0700)]
fix bug in decoders: got indirection wrong when allocation not required.
write indirection test.

next step: cut down scalar tests since indirection is centralized.

R=rsc
DELTA=114  (83 added, 3 deleted, 28 changed)
OCL=31020
CL=31037

15 years agomove dereference code out of the ops and into the interpreter loops.
Rob Pike [Thu, 2 Jul 2009 06:04:27 +0000 (23:04 -0700)]
move dereference code out of the ops and into the interpreter loops.

R=rsc
DELTA=574  (40 added, 149 deleted, 385 changed)
OCL=31017
CL=31019

15 years agoEncode and decode engines for gobs.
Rob Pike [Thu, 2 Jul 2009 01:25:13 +0000 (18:25 -0700)]
Encode and decode engines for gobs.

R=rsc
DELTA=468  (292 added, 18 deleted, 158 changed)
OCL=31008
CL=31012

15 years agoadd test, fix bug: structs that differ in their
Russ Cox [Wed, 1 Jul 2009 23:45:09 +0000 (16:45 -0700)]
add test, fix bug: structs that differ in their
first field were not being handled correctly
because the visited map did not include the type.

R=r
OCL=31006
CL=31006

15 years agoFix a doc typo.
David Symonds [Wed, 1 Jul 2009 22:07:20 +0000 (15:07 -0700)]
Fix a doc typo.

R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=30967
CL=30990

15 years agoclean up some BUG/TODO in go code
Russ Cox [Wed, 1 Jul 2009 14:32:04 +0000 (07:32 -0700)]
clean up some BUG/TODO in go code

R=r
DELTA=23  (1 added, 12 deleted, 10 changed)
OCL=30957
CL=30980

15 years agochange alignment rules: roll receiver into
Russ Cox [Wed, 1 Jul 2009 03:02:07 +0000 (20:02 -0700)]
change alignment rules: roll receiver into
input parameters, move output parameters
into their own struct.

R=ken
OCL=30954
CL=30966

15 years agoremove declarations for functions that cannot be called from c
Russ Cox [Wed, 1 Jul 2009 03:01:59 +0000 (20:01 -0700)]
remove declarations for functions that cannot be called from c
(because they return values in the input parameters).

R=iant
DELTA=12  (0 added, 11 deleted, 1 changed)
OCL=30952
CL=30965

15 years agoconvert string runtime to use cgo.
Russ Cox [Wed, 1 Jul 2009 03:01:50 +0000 (20:01 -0700)]
convert string runtime to use cgo.

now that cgo2c can handle it,
merge x.c and x_go.cgo into
a single x.cgo, for x=float,malloc,sema.

R=r
DELTA=1950  (954 added, 996 deleted, 0 changed)
OCL=30951
CL=30964

15 years agoin preparation for changing 6g's behavior to
Russ Cox [Wed, 1 Jul 2009 03:01:41 +0000 (20:01 -0700)]
in preparation for changing 6g's behavior to
align the output args separately from the input args,
change cgo2c to insert the necessary padding
when the two arg lists are concatenated in the c
translation.

for example, there is a runtime

func indexstring(s string, i int32) (b byte)

right now in 6g those arguments are aligned in one
struct with s at offset 0, i at 16, and b at 20.
soon the b byte will be in its own struct and structs
are 8 aligned, so it will be b at 24.

right now cgo2c generates:

void indexstring(string s, int32 i, byte b)

this CL makes it generate, in --6g mode:

void indexstring(string s, int32 i, uint32, byte b)

this is valid 6c input, although not valid gcc input.
(the code is being generated for 6c only anyway.)

also, allow C code to be mixed in among the Go funcs.
every instance of the token `func' is expected to start
a new go func.

R=iant
DELTA=145  (118 added, 0 deleted, 27 changed)
OCL=30949
CL=30963

15 years agoscalar decoders
Rob Pike [Wed, 1 Jul 2009 00:59:41 +0000 (17:59 -0700)]
scalar decoders

R=rsc
DELTA=897  (728 added, 14 deleted, 155 changed)
OCL=30955
CL=30955

15 years agopass the state to the encoders and decoders so error handling can be centralized.
Rob Pike [Tue, 30 Jun 2009 23:20:31 +0000 (16:20 -0700)]
pass the state to the encoders and decoders so error handling can be centralized.

R=rsc
DELTA=172  (40 added, 6 deleted, 126 changed)
OCL=30941
CL=30944

15 years agoencoders for booleans and numbers.
Rob Pike [Tue, 30 Jun 2009 22:37:46 +0000 (15:37 -0700)]
encoders for booleans and numbers.

R=rsc
DELTA=610  (597 added, 5 deleted, 8 changed)
OCL=30934
CL=30939

15 years agodelete io.ByteBuffer
Russ Cox [Tue, 30 Jun 2009 03:53:05 +0000 (20:53 -0700)]
delete io.ByteBuffer

R=r
DELTA=25  (0 added, 15 deleted, 10 changed)
OCL=30892
CL=30892

15 years agobug163 bug164 bug166
Russ Cox [Tue, 30 Jun 2009 00:46:22 +0000 (17:46 -0700)]
bug163 bug164 bug166

R=ken
OCL=30889
CL=30889

15 years agobug041 not a bug.
Russ Cox [Tue, 30 Jun 2009 00:21:33 +0000 (17:21 -0700)]
bug041 not a bug.
can now forward declare across files

R=r
DELTA=15  (0 added, 15 deleted, 0 changed)
OCL=30873
CL=30880

15 years agoio.StringBytes -> strings.Bytes
Russ Cox [Mon, 29 Jun 2009 22:24:23 +0000 (15:24 -0700)]
io.StringBytes -> strings.Bytes
io.ByteBuffer -> bytes.Buffer

left io.ByteBuffer stub around for now,
for protocol compiler.

R=r
OCL=30861
CL=30872

15 years agointeger encode/decode
Rob Pike [Mon, 29 Jun 2009 22:15:07 +0000 (15:15 -0700)]
integer encode/decode

R=rsc
DELTA=185  (175 added, 10 deleted, 0 changed)
OCL=30863
CL=30871

15 years agomake use of forward method declaration
Russ Cox [Mon, 29 Jun 2009 22:13:56 +0000 (15:13 -0700)]
make use of forward method declaration

R=r
DELTA=11  (0 added, 6 deleted, 5 changed)
OCL=30862
CL=30870

15 years agoallow forward declaration of struct in another file
Russ Cox [Mon, 29 Jun 2009 22:13:37 +0000 (15:13 -0700)]
allow forward declaration of struct in another file
(in the same package).

allow forward method declaration to be satisfied
by implementation in another file (in the same package).
all methods must be declared in the same file
as the receiver type.

R=ken
OCL=30864
CL=30869

15 years agobogus test: planning to allow forward declarations
Russ Cox [Mon, 29 Jun 2009 22:13:18 +0000 (15:13 -0700)]
bogus test: planning to allow forward declarations
of structs/interfaces in other files in the package.

R=r
DELTA=12  (0 added, 12 deleted, 0 changed)
OCL=30865
CL=30868

15 years agoadd os.Hostname
Russ Cox [Mon, 29 Jun 2009 20:44:46 +0000 (13:44 -0700)]
add os.Hostname

R=r
DELTA=188  (182 added, 3 deleted, 3 changed)
OCL=30856
CL=30860

15 years ago6g appears to permit semicolons to be omitted after qualified
Ian Lance Taylor [Mon, 29 Jun 2009 19:52:08 +0000 (12:52 -0700)]
6g appears to permit semicolons to be omitted after qualified
identifiers.  This is not one of the exceptions permitted by
th spec.

R=ken,rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30844
CL=30852

15 years agoadd []byte as a special case: it will have a special, efficient encoding.
Rob Pike [Mon, 29 Jun 2009 18:29:47 +0000 (11:29 -0700)]
add []byte as a special case: it will have a special, efficient encoding.

R=rsc
DELTA=16  (9 added, 1 deleted, 6 changed)
OCL=30846
CL=30846

15 years agofix gobuild bug
Rob Pike [Mon, 29 Jun 2009 18:19:38 +0000 (11:19 -0700)]
fix gobuild bug

R=rsc
DELTA=4  (3 added, 0 deleted, 1 changed)
OCL=30845
CL=30845

15 years agoworking on bgen
Kai Backman [Sat, 27 Jun 2009 05:04:30 +0000 (22:04 -0700)]
working on bgen
- removed smallint optimizations
- lifted raddr from 5c
- add back %R, was used in gc/* causing -g to crash
- changed naddr OREGISTER to emit D_REG instead of D_OREG

R=rsc
APPROVED=rsc
DELTA=74  (38 added, 28 deleted, 8 changed)
OCL=30799
CL=30822

15 years agoGetenv: almost no one wants the error, so make it return a string that may be empty.
Rob Pike [Sat, 27 Jun 2009 03:28:41 +0000 (20:28 -0700)]
Getenv: almost no one wants the error, so make it return a string that may be empty.
Getenverror is the new name for the old routine that returns an error too.

R=rsc
DELTA=35  (7 added, 7 deleted, 21 changed)
OCL=30818
CL=30821

15 years agothe first time a structure type appears when printing, identify it by name:
Rob Pike [Sat, 27 Jun 2009 03:28:06 +0000 (20:28 -0700)]
the first time a structure type appears when printing, identify it by name:
type Foo struct { a int; next *Foo }
produces
"Foo = struct { a int; next Foo }"

R=rsc
OCL=30797
CL=30820

15 years agoAdding more debug output when 5l encounters a bad op
Kai Backman [Fri, 26 Jun 2009 20:44:25 +0000 (13:44 -0700)]
Adding more debug output when 5l encounters a bad op
combination.

R=rsc
APPROVED=rsc
DELTA=69  (68 added, 0 deleted, 1 changed)
OCL=30798
CL=30801

15 years agomore changes to make 5g code generation arm compatible.
Kai Backman [Fri, 26 Jun 2009 11:08:20 +0000 (04:08 -0700)]
more changes to make 5g code generation arm compatible.

R=rsc
APPROVED=rsc
DELTA=72  (12 added, 52 deleted, 8 changed)
OCL=30748
CL=30793

15 years agogobs part 1: types.
Rob Pike [Fri, 26 Jun 2009 05:08:51 +0000 (22:08 -0700)]
gobs part 1: types.
not ready to be part of the standard build yet; this is just a checkpoint.

R=rsc
DELTA=361  (361 added, 0 deleted, 0 changed)
OCL=30782
CL=30785

15 years agohttp Request parsing, plus a convenient accessor.
David Symonds [Fri, 26 Jun 2009 04:05:44 +0000 (21:05 -0700)]
http Request parsing, plus a convenient accessor.

R=rsc
APPROVED=rsc
DELTA=95  (40 added, 14 deleted, 41 changed)
OCL=30727
CL=30784

15 years agobug165
Russ Cox [Fri, 26 Jun 2009 04:02:39 +0000 (21:02 -0700)]
bug165

R=ken
OCL=30783
CL=30783

15 years agoChange os.Error convention:
Russ Cox [Fri, 26 Jun 2009 03:24:55 +0000 (20:24 -0700)]
Change os.Error convention:
echo back context of call in error if likely to be useful.

For example, if os.Open("/etc/passwd", os.O_RDONLY)
fails with syscall.EPERM, it returns as the os.Error

&PathError{
Op: "open",
Path: "/etc/passwd"
Error: os.EPERM
}

which formats as

open /etc/passwd: permission denied

Not converted:

datafmt
go/...
google/...
regexp
tabwriter
template

R=r
DELTA=1153  (561 added, 156 deleted, 436 changed)
OCL=30738
CL=30781

15 years agoseparate local path lookup from standard package directories
Russ Cox [Fri, 26 Jun 2009 03:15:56 +0000 (20:15 -0700)]
separate local path lookup from standard package directories

R=ken
OCL=30760
CL=30779

15 years agoadd ./ to imports where necessary
Russ Cox [Fri, 26 Jun 2009 03:13:56 +0000 (20:13 -0700)]
add ./ to imports where necessary

R=r
DELTA=51  (4 added, 4 deleted, 43 changed)
OCL=30759
CL=30778

15 years agocannot have interfaces refer to themselves as map keys
Rob Pike [Fri, 26 Jun 2009 01:44:28 +0000 (18:44 -0700)]
cannot have interfaces refer to themselves as map keys

R=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30774
CL=30774

15 years agoallow
Russ Cox [Fri, 26 Jun 2009 01:19:05 +0000 (18:19 -0700)]
allow

package main
type t interface
type t interface{ m(map[t]bool) }
type m map[t] int

making it work without the forward declaration will require a second pass.

R=ken
OCL=30773
CL=30773

15 years agothe any fix was too aggressive; allow any in any import.
Russ Cox [Thu, 25 Jun 2009 23:57:56 +0000 (16:57 -0700)]
the any fix was too aggressive; allow any in any import.

R=ken
OCL=30768
CL=30768

15 years agopackage main
Russ Cox [Thu, 25 Jun 2009 23:42:08 +0000 (16:42 -0700)]
package main
const foo = []int{1,2}

x.go:3: expression must be a constant

instead of

x.go:3: fatal error: gettype: addtop

R=ken
OCL=30767
CL=30767

15 years agobetter error; clean up lineno in a few places
Russ Cox [Thu, 25 Jun 2009 23:32:33 +0000 (16:32 -0700)]
better error; clean up lineno in a few places

wreck.mtv=; cat x.go
package main
var x = string.Split()
wreck.mtv=; 6g x.go
x.go:2: type string used as expression
x.go:2: undefined DOT Split on string
x.go:3: illegal types for operand: AS
undefined
wreck.mtv=;

BUG=1938751
R=ken
OCL=30766
CL=30766

15 years agopackage main
Russ Cox [Thu, 25 Jun 2009 23:25:06 +0000 (16:25 -0700)]
package main
func foo(y) { }

was:
x.go:2: NONAME-y G0 u(1) a(1) l(77) x(-1000000000) is not a type

now:
x.go:2: y is not a type

R=ken
OCL=30764
CL=30764

15 years agodisable "any" except during canned imports.
Russ Cox [Thu, 25 Jun 2009 23:22:46 +0000 (16:22 -0700)]
disable "any" except during canned imports.
new flag -A enables it during mkbuiltin.
avoids mysterious errors in programs
that refer to any accidentally.

R=ken
OCL=30763
CL=30763

15 years agofix build
Russ Cox [Thu, 25 Jun 2009 22:15:44 +0000 (15:15 -0700)]
fix build

TBR=r
OCL=30757
CL=30757

15 years ago6g: update for spec change CL 30586
Russ Cox [Thu, 25 Jun 2009 21:44:45 +0000 (14:44 -0700)]
6g: update for spec change CL 30586

R=ken
OCL=30593
CL=30756

15 years agoupdate tests for CL 30586.
Russ Cox [Thu, 25 Jun 2009 21:44:09 +0000 (14:44 -0700)]
update tests for CL 30586.
won't submit unless 30586 goes in.

R=r
DELTA=94  (65 added, 16 deleted, 13 changed)
OCL=30592
CL=30755

15 years agoAllow indexing of slice types, but not pointer to slice type.
Russ Cox [Thu, 25 Jun 2009 21:43:55 +0000 (14:43 -0700)]
Allow indexing of slice types, but not pointer to slice type.
Allow indexing of string type, but not pointer to string type.
Do not allow indexing of pointer to map type.

R=r
DELTA=18  (14 added, 0 deleted, 4 changed)
OCL=30586
CL=30754

15 years agoadd reflect.Typeof; test for and fix nil interface bug in DeepEqual
Russ Cox [Thu, 25 Jun 2009 21:25:38 +0000 (14:25 -0700)]
add reflect.Typeof; test for and fix nil interface bug in DeepEqual

R=r
DELTA=40  (30 added, 2 deleted, 8 changed)
OCL=30742
CL=30753

15 years agodreg
Russ Cox [Thu, 25 Jun 2009 21:25:11 +0000 (14:25 -0700)]
dreg

R=r
DELTA=19  (0 added, 19 deleted, 0 changed)
OCL=30739
CL=30751

15 years agoAdd Gobuf.r0 that stores arg0 or return value of
Kai Backman [Thu, 25 Jun 2009 18:26:10 +0000 (11:26 -0700)]
Add Gobuf.r0 that stores arg0 or return value of
goroutine. arm only.

R=rsc
APPROVED=rsc
DELTA=5  (3 added, 2 deleted, 0 changed)
OCL=30644
CL=30746

15 years agofixes to 5g object file generation. arm specific regalloc.
Kai Backman [Thu, 25 Jun 2009 18:01:17 +0000 (11:01 -0700)]
fixes to 5g object file generation. arm specific regalloc.

R=rsc
APPROVED=rsc
DELTA=976  (164 added, 237 deleted, 575 changed)
OCL=30705
CL=30743

15 years agoEffective Go; draft
Russ Cox [Thu, 25 Jun 2009 16:38:35 +0000 (09:38 -0700)]
Effective Go; draft

TBR=r
OCL=30741
CL=30741

15 years agostyle police: parens in if, for, switch, range
Russ Cox [Thu, 25 Jun 2009 03:12:50 +0000 (20:12 -0700)]
style police: parens in if, for, switch, range

R=r
DELTA=32  (0 added, 3 deleted, 29 changed)
OCL=30718
CL=30725

15 years agoChange strings.Split, bytes.Split to take a maximum substring count argument.
David Symonds [Thu, 25 Jun 2009 02:02:29 +0000 (19:02 -0700)]
Change strings.Split, bytes.Split to take a maximum substring count argument.

R=rsc
APPROVED=r
DELTA=131  (39 added, 10 deleted, 82 changed)
OCL=30669
CL=30723

15 years ago6g crash re mail from gri jun 18.
Ken Thompson [Thu, 25 Jun 2009 00:50:25 +0000 (17:50 -0700)]
6g crash re mail from gri jun 18.

R=r
OCL=30719
CL=30719

15 years agobase64: cut out some middle layers
Russ Cox [Wed, 24 Jun 2009 22:52:31 +0000 (15:52 -0700)]
base64: cut out some middle layers

R=austin
DELTA=352  (67 added, 196 deleted, 89 changed)
OCL=30694
CL=30713

15 years agomake bytes.Copy both src- and dst- limited
Russ Cox [Wed, 24 Jun 2009 22:35:35 +0000 (15:35 -0700)]
make bytes.Copy both src- and dst- limited
and return the number of bytes copied.

R=r
DELTA=18  (6 added, 0 deleted, 12 changed)
OCL=30693
CL=30712

15 years agoFix compile warnings in 5l.
Kai Backman [Wed, 24 Jun 2009 18:44:06 +0000 (11:44 -0700)]
Fix compile warnings in 5l.

R=rsc
APPROVED=rsc
DELTA=8  (0 added, 0 deleted, 8 changed)
OCL=30692
CL=30695

15 years agoBase64 encoder/decoder package.
Austin Clements [Wed, 24 Jun 2009 18:09:43 +0000 (11:09 -0700)]
Base64 encoder/decoder package.

R=rsc
APPROVED=rsc
DELTA=722  (722 added, 0 deleted, 0 changed)
OCL=30660
CL=30691

15 years agoFix http client handling of status messages with spaces (e.g. "HTTP/1.1 400 Bad
David Symonds [Wed, 24 Jun 2009 01:49:47 +0000 (18:49 -0700)]
Fix http client handling of status messages with spaces (e.g. "HTTP/1.1 400 Bad
Request".
Use chunked Transfer-Encoding for all POSTs.
Implement chunked reading.
Change http.Request.write to be HTTP/1.1 only.

R=rsc
APPROVED=rsc
DELTA=178  (123 added, 26 deleted, 29 changed)
OCL=30563
CL=30673

15 years agopublish strconv.UnquoteChar
Russ Cox [Tue, 23 Jun 2009 23:44:01 +0000 (16:44 -0700)]
publish strconv.UnquoteChar

R=r
DELTA=69  (37 added, 3 deleted, 29 changed)
OCL=30661
CL=30667

15 years agofix gobuild.
Russ Cox [Tue, 23 Jun 2009 23:21:05 +0000 (16:21 -0700)]
fix gobuild.
errors introduced in CL 30601

R=austin
DELTA=6  (3 added, 0 deleted, 3 changed)
OCL=30663
CL=30665

15 years agofix a 6g crash after type errors.
Russ Cox [Tue, 23 Jun 2009 22:30:59 +0000 (15:30 -0700)]
fix a 6g crash after type errors.

do not bother warning about marks left
on stack after syntax errors.

leave OCONV nodes in tree to avoid type errors
arising from multiple walks.

R=ken
OCL=30639
CL=30662

15 years agofix io.Bytebuffer.Read for new EOF semantics
Rob Pike [Tue, 23 Jun 2009 22:20:40 +0000 (15:20 -0700)]
fix io.Bytebuffer.Read for new EOF semantics

R=rsc
DELTA=7  (5 added, 0 deleted, 2 changed)
OCL=30657
CL=30659

15 years agorename Formatter to State and Format to Formatter, for nomenclatural consistency
Rob Pike [Tue, 23 Jun 2009 22:20:30 +0000 (15:20 -0700)]
rename Formatter to State and Format to Formatter, for nomenclatural consistency

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

15 years agoRuntime is now starting up with a dummy c program as target:
Kai Backman [Tue, 23 Jun 2009 18:54:23 +0000 (11:54 -0700)]
Runtime is now starting up with a dummy c program as target:
- morestack and gosave/gogo/gocall support
- memclr and memset from inferno
- bugfixes in _rt0_arm

R=rsc
APPROVED=rsc
DELTA=304  (174 added, 36 deleted, 94 changed)
OCL=30636
CL=30642

15 years agodocument the verbs for Printf
Rob Pike [Tue, 23 Jun 2009 01:09:40 +0000 (18:09 -0700)]
document the verbs for Printf

R=rsc
DELTA=61  (48 added, 0 deleted, 13 changed)
OCL=30616
CL=30619

15 years agoset -e does not apply to ( ) blocks,
Russ Cox [Mon, 22 Jun 2009 22:43:50 +0000 (15:43 -0700)]
set -e does not apply to ( ) blocks,
so implement the check manually.
sigh.

R=r
DELTA=17  (6 added, 0 deleted, 11 changed)
OCL=30606
CL=30612

15 years agoDon't prefix Url.Path with a slash in Request.write,
David Symonds [Mon, 22 Jun 2009 21:50:12 +0000 (14:50 -0700)]
Don't prefix Url.Path with a slash in Request.write,
because Url.Path already starts with one.
Avoid crashing in Request.ParseForm if there is no body.

R=rsc
APPROVED=rsc
DELTA=5  (4 added, 0 deleted, 1 changed)
OCL=30552
CL=30607

15 years agodocument requirements on Write method
Russ Cox [Mon, 22 Jun 2009 21:44:07 +0000 (14:44 -0700)]
document requirements on Write method

R=r
DELTA=7  (6 added, 0 deleted, 1 changed)
OCL=30596
CL=30605

15 years agocanonicalize bug122.go
Rob Pike [Mon, 22 Jun 2009 21:40:08 +0000 (14:40 -0700)]
canonicalize bug122.go

R=rsc
DELTA=6  (1 added, 3 deleted, 2 changed)
OCL=30604
CL=30604

15 years agoa couple of cosmetic tweaks.
Rob Pike [Mon, 22 Jun 2009 21:26:07 +0000 (14:26 -0700)]
a couple of cosmetic tweaks.

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