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

15 years agoavoid pointer-to-slice operations in gobuild
Russ Cox [Mon, 22 Jun 2009 21:24:32 +0000 (14:24 -0700)]
avoid pointer-to-slice operations in gobuild

R=r
DELTA=19  (3 added, 1 deleted, 15 changed)
OCL=30591
CL=30601

15 years agotweak the newlines so the headers stand out better.
Rob Pike [Mon, 22 Jun 2009 21:18:23 +0000 (14:18 -0700)]
tweak the newlines so the headers stand out better.

old:
CONSTANTS
const (
    MissingKind = iota;
  )
new:
CONSTANTS

const (
    MissingKind = iota;
 )

R=gri,rsc
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=30362
CL=30598

15 years agoadd arm support to mkasmh
Kai Backman [Mon, 22 Jun 2009 21:08:00 +0000 (14:08 -0700)]
add arm support to mkasmh

R=rsc
APPROVED=rsc
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=30587
CL=30595

15 years agochanges required if we disallow the implicit *
Russ Cox [Mon, 22 Jun 2009 20:34:21 +0000 (13:34 -0700)]
changes required if we disallow the implicit *
in cap, len, [], and range on maps, strings, and slices.

R=r
DELTA=57  (2 added, 12 deleted, 43 changed)
OCL=30549
CL=30590

15 years agointroduce os.EOF and io.ErrUnexpectedEOF.
Russ Cox [Mon, 22 Jun 2009 20:26:13 +0000 (13:26 -0700)]
introduce os.EOF and io.ErrUnexpectedEOF.
remove io.ErrEOF.
rename io.FullRead to io.ReadFull, to match
   ReadAtLeast and ReadAll.
remove io.FullReader, because it is now unused.

R=r
DELTA=295  (88 added, 105 deleted, 102 changed)
OCL=30544
CL=30588

15 years agoAdd form body parsing to http.Request.
David Symonds [Sat, 20 Jun 2009 01:02:15 +0000 (18:02 -0700)]
Add form body parsing to http.Request.
better error handling throughout.

R=r,rsc
APPROVED=r
DELTA=254  (201 added, 3 deleted, 50 changed)
OCL=30515
CL=30545

15 years agofix build
Rob Pike [Fri, 19 Jun 2009 23:45:04 +0000 (16:45 -0700)]
fix build

R=rsc
OCL=30542
CL=30542

15 years agoAdd ReadByte to bytebuffer
Scott Schwartz [Fri, 19 Jun 2009 23:29:30 +0000 (16:29 -0700)]
Add ReadByte to bytebuffer

R=rsc
APPROVED=rsc
DELTA=24  (24 added, 0 deleted, 0 changed)
OCL=30459
CL=30540

15 years agomake IP address available
Rob Pike [Fri, 19 Jun 2009 23:03:59 +0000 (16:03 -0700)]
make IP address available

R=rsc
DELTA=30  (30 added, 0 deleted, 0 changed)
OCL=30536
CL=30536

15 years agoimplement new spec language regarding conversions
Russ Cox [Fri, 19 Jun 2009 21:00:53 +0000 (14:00 -0700)]
implement new spec language regarding conversions

R=ken
OCL=30519
CL=30534

15 years agotest non-trivial conversions and assignments,
Russ Cox [Fri, 19 Jun 2009 21:00:39 +0000 (14:00 -0700)]
test non-trivial conversions and assignments,
named and unnamed.

R=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=30518
CL=30533

15 years agofix for conversion rule
Robert Griesemer [Fri, 19 Jun 2009 20:03:01 +0000 (13:03 -0700)]
fix for conversion rule

R=rsc
DELTA=25  (10 added, 7 deleted, 8 changed)
OCL=30516
CL=30531

15 years agoAdd a ReplaceAll method to Regexp.
Steve Newman [Fri, 19 Jun 2009 00:55:47 +0000 (17:55 -0700)]
Add a ReplaceAll method to Regexp.

APPROVED=r,rsc
DELTA=189  (187 added, 0 deleted, 2 changed)
OCL=30205
CL=30517

15 years ago1) Fix a problem with tabwriter.Flush: any pending text not yet
Robert Griesemer [Fri, 19 Jun 2009 00:06:08 +0000 (17:06 -0700)]
1) Fix a problem with tabwriter.Flush: any pending text not yet
   in a cell makes a final cell in that line
   (this showed up as occasionally missing single spaces in
   godoc-formatted declarations that fit on a single line)

2) Cleaned up tabwriter implementation a bit:
   - replaced local unicodeLen() with utf8.RuneCount()
   - instead of having 2 parallel arrays for line widths and sizes,
     have a single array of cells containing a width and size
   - factored code a bit better
   - added more comments
   - added testnames to tabwriter tests
   - added more test cases and fixed a broken test case that
     now works correctly

R=r
DELTA=279  (133 added, 62 deleted, 84 changed)
OCL=30509
CL=30514

15 years ago`` strings may span multiple lines
Robert Griesemer [Fri, 19 Jun 2009 00:04:39 +0000 (17:04 -0700)]
`` strings may span multiple lines

R=rsc
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=30511
CL=30513

15 years agouse multiline string literal in gobuild
Russ Cox [Thu, 18 Jun 2009 23:32:26 +0000 (16:32 -0700)]
use multiline string literal in gobuild

R=r
DELTA=76  (1 added, 0 deleted, 75 changed)
OCL=30497
CL=30510

15 years agobetter diagnostics for eof in a string.
Ken Thompson [Thu, 18 Jun 2009 22:49:41 +0000 (15:49 -0700)]
better diagnostics for eof in a string.
this assumes that embedded newlines are
legal in back-quote strings.

R=r
OCL=30502
CL=30502

15 years agoraw strings may span multiple lines
Robert Griesemer [Thu, 18 Jun 2009 20:51:14 +0000 (13:51 -0700)]
raw strings may span multiple lines

R=r
DELTA=7  (2 added, 0 deleted, 5 changed)
OCL=30492
CL=30494

15 years agomake pkg/runtime/Makefile behave like the others:
Russ Cox [Thu, 18 Jun 2009 20:33:28 +0000 (13:33 -0700)]
make pkg/runtime/Makefile behave like the others:
make builds; make install installs.

R=r
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=30489
CL=30491

15 years ago- removed duplicate definition of StringLit
Robert Griesemer [Thu, 18 Jun 2009 20:29:40 +0000 (13:29 -0700)]
- removed duplicate definition of StringLit
- fixed nonsense sentence in numeric basic type section
- hlinted

R=r,rsc
DELTA=50  (10 added, 22 deleted, 18 changed)
OCL=30484
CL=30490

15 years agoadd Addr() string to net.Listener interface.
Russ Cox [Thu, 18 Jun 2009 04:44:26 +0000 (21:44 -0700)]
add Addr() string to net.Listener interface.
use it to avoid use of fixed ports in tests.
convert google/net/rpc to gotest

R=r
DELTA=523  (275 added, 229 deleted, 19 changed)
OCL=30458
CL=30460

15 years agofix 386 build.
Russ Cox [Wed, 17 Jun 2009 23:34:13 +0000 (16:34 -0700)]
fix 386 build.
some day...

TBR=r
OCL=30453
CL=30453

15 years agoForgot to check in 386/asm.h.
Russ Cox [Wed, 17 Jun 2009 23:31:02 +0000 (16:31 -0700)]
Forgot to check in 386/asm.h.
Rather than do that, fix build by
generating asm.h automatically.

R=r
DELTA=97  (48 added, 36 deleted, 13 changed)
OCL=30449
CL=30452

15 years agoshuffle some Linux system calls around for 386
Russ Cox [Wed, 17 Jun 2009 22:16:06 +0000 (15:16 -0700)]
shuffle some Linux system calls around for 386

R=r
DELTA=37  (17 added, 15 deleted, 5 changed)
OCL=30428
CL=30444

15 years agoupdate 386 to new runtime (CL 30381)
Russ Cox [Wed, 17 Jun 2009 22:15:55 +0000 (15:15 -0700)]
update 386 to new runtime (CL 30381)

R=r
DELTA=298  (119 added, 81 deleted, 98 changed)
OCL=30427
CL=30443

15 years agoruntime: stack growth adjustments, cleanup
Russ Cox [Wed, 17 Jun 2009 22:12:16 +0000 (15:12 -0700)]
runtime: stack growth adjustments, cleanup
* keep coherent SP/PC in gobuf
  (i.e., SP that would be in use at that PC)
* gogocall replaces setspgoto,
  should work better in presence of link registers
* delete unused system calls

only amd64; 386 is now broken

R=r
DELTA=548  (183 added, 183 deleted, 182 changed)
OCL=30381
CL=30442

15 years agofix for incorrect type switch clause:
Robert Griesemer [Wed, 17 Jun 2009 21:31:33 +0000 (14:31 -0700)]
fix for incorrect type switch clause:
- nil is not a keyword
- type -> Type

R=rsc
DELTA=10  (4 added, 0 deleted, 6 changed)
OCL=30433
CL=30435

15 years agodo use $$ in path names, so that multiple
Russ Cox [Wed, 17 Jun 2009 20:21:01 +0000 (13:21 -0700)]
do use $$ in path names, so that multiple
runs on the same machine don't collide.

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

15 years ago`` strings should not accept newlines as characters
Robert Griesemer [Wed, 17 Jun 2009 18:44:51 +0000 (11:44 -0700)]
`` strings should not accept newlines as characters

R=r
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=30417
CL=30422

15 years ago386 system call fixes:
Russ Cox [Wed, 17 Jun 2009 00:17:02 +0000 (17:17 -0700)]
386 system call fixes:
  * use 64-bit file system calls (Linux, Darwin)
  * use 32-bit [sic] uid/gid calls (Linux)
  * fix sockets on Linux

Darwin/386 works again.

Linux/386 is better but must never have worked;
there are still bugs surrounding the creation of new
threads in the runtime package.

R=austin
DELTA=1332  (673 added, 614 deleted, 45 changed)
OCL=30327
CL=30380

15 years agofix nesting level for parameters
Robert Griesemer [Tue, 16 Jun 2009 21:39:19 +0000 (14:39 -0700)]
fix nesting level for parameters

R=rsc
DELTA=8  (4 added, 2 deleted, 2 changed)
OCL=30365
CL=30368

15 years agoclean gofmt
Rob Pike [Tue, 16 Jun 2009 21:03:13 +0000 (14:03 -0700)]
clean gofmt

R=rsc
OCL=30363
CL=30363

15 years agoadd godoc to clean.bash
Rob Pike [Tue, 16 Jun 2009 20:57:08 +0000 (13:57 -0700)]
add godoc to clean.bash

R=rsc
OCL=30361
CL=30361

15 years agodelete dreg comment
Rob Pike [Tue, 16 Jun 2009 20:49:40 +0000 (13:49 -0700)]
delete dreg comment

R=rsc
OCL=30359
CL=30359

15 years ago- some fine-tuning of godoc templates per r's suggestion
Robert Griesemer [Tue, 16 Jun 2009 20:44:15 +0000 (13:44 -0700)]
- some fine-tuning of godoc templates per r's suggestion
- removed gratuitous newline in go/printer

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

15 years agoURL should have an empty Scheme if there is an invalid character (i.e.
Jacob Baskin [Tue, 16 Jun 2009 20:23:42 +0000 (13:23 -0700)]
URL should have an empty Scheme if there is an invalid character (i.e.
not [a-zA-Z0-9+-.]) before there is a ":".

This is particularly helpful in the erroneous-but-relatively-common
case of relative URLs containing an unescaped colon in the query
string--see the added test for an example.

R=rsc
APPROVED=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=30354
CL=30356

15 years ago- install gofmt in src/cmd/gofmt
Robert Griesemer [Tue, 16 Jun 2009 19:03:32 +0000 (12:03 -0700)]
- install gofmt in src/cmd/gofmt
- remove some left-over files

R=rsc
DELTA=1465  (281 added, 1181 deleted, 3 changed)
OCL=30350
CL=30353

15 years agograb bag of changes aimed at getting stack splitting to work:
Kai Backman [Tue, 16 Jun 2009 18:25:58 +0000 (11:25 -0700)]
grab bag of changes aimed at getting stack splitting to work:
- morestack support for 5l and arm runtime
- argsize support in 5c, 5l, ar and nm. assembly code from 5a
  will break in interesting ways unless NOSPLIT is specified
- explicit cond execution constants
- fix 5l output to use %d instead of %ld so that negative
  values show.
- added a lot of code to arm/asm.s. runtime entry code almost
  working currently aborts at gogo not implemented

R=rsc
APPROVED=rsc
DELTA=305  (125 added, 29 deleted, 151 changed)
OCL=30246
CL=30347

15 years agofix build
Robert Griesemer [Tue, 16 Jun 2009 16:39:57 +0000 (09:39 -0700)]
fix build

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

15 years agoforgot to adjust tmproot
Robert Griesemer [Tue, 16 Jun 2009 16:30:16 +0000 (09:30 -0700)]
forgot to adjust tmproot

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

15 years agomove godoc to src/cmd/godoc
Robert Griesemer [Tue, 16 Jun 2009 16:14:06 +0000 (09:14 -0700)]
move godoc to src/cmd/godoc

R=rsc
DELTA=945  (944 added, 0 deleted, 1 changed)
OCL=30315
CL=30341

15 years agofix another gc bug, one that i have only imagined,
Russ Cox [Tue, 16 Jun 2009 04:31:56 +0000 (21:31 -0700)]
fix another gc bug, one that i have only imagined,
not observed: do not use malloc to allocate stacks
during garbage collection, because it would make the
malloc data structures change underfoot.

R=r
DELTA=6  (3 added, 0 deleted, 3 changed)
OCL=30323
CL=30326

15 years agofix garbage collection race: save stack trace
Russ Cox [Tue, 16 Jun 2009 04:30:53 +0000 (21:30 -0700)]
fix garbage collection race: save stack trace
when changing process state to Gsyscall, not after.

R=r
DELTA=8  (4 added, 3 deleted, 1 changed)
OCL=30320
CL=30325

15 years agobug163: ideographs are not letters
Rob Pike [Tue, 16 Jun 2009 04:13:28 +0000 (21:13 -0700)]
bug163: ideographs are not letters
also update golden.out from bug162

R=rsc
DELTA=16  (16 added, 0 deleted, 0 changed)
OCL=30298
CL=30324

15 years agob/1909731
Russ Cox [Tue, 16 Jun 2009 03:15:59 +0000 (20:15 -0700)]
b/1909731

package main
func f(a *c.b) {}
func main() {}

BUG=1909731
R=ken
OCL=30322
CL=30322

15 years agoFix a proto encoding crasher whereby a nil in a repeated group field would crash...
David Symonds [Tue, 16 Jun 2009 01:35:04 +0000 (18:35 -0700)]
Fix a proto encoding crasher whereby a nil in a repeated group field would crash the server.

Also fix the reflect bug that was exposed by this bug.

R=r
APPROVED=rsc
DELTA=162  (103 added, 32 deleted, 27 changed)
OCL=30125
CL=30319

15 years agogofmt (final resting place TBD):
Robert Griesemer [Mon, 15 Jun 2009 23:23:16 +0000 (16:23 -0700)]
gofmt (final resting place TBD):
- replacement for pretty; app to format a single .go file

printer.go (pkg/go/printer):
- replacement for astprinter.go; implements AST printing
- also replaces pkg/go/ast/format.go for now

cleanups:
- removed/saved away old code

R=r,rsc,iant
DELTA=2833  (1183 added, 1628 deleted, 22 changed)
OCL=30226
CL=30306

15 years agofixed typo (slipped in with previous submit)
Robert Griesemer [Mon, 15 Jun 2009 22:47:15 +0000 (15:47 -0700)]
fixed typo (slipped in with previous submit)

TBR=rsc
OCL=30300
CL=30300

15 years agoSupport for line comments trailing a field or declaration:
Robert Griesemer [Mon, 15 Jun 2009 22:43:11 +0000 (15:43 -0700)]
Support for line comments trailing a field or declaration:
- ast: added extra fields
- parser: extended comment parsing to capture potential trailing comments

Cleanups:
- parser: more documentation, changed various identifiers from _-style to camelCase

R=r,rsc
DELTA=214  (84 added, 13 deleted, 117 changed)
OCL=30259
CL=30299