]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agoClarify section on tokens.
Robert Griesemer [Mon, 28 Dec 2009 22:40:42 +0000 (14:40 -0800)]
Clarify section on tokens.
Fixes #457.

R=r
CC=golang-dev
https://golang.org/cl/181083

15 years agofix dumb bug: must write out default values inside arrays and slices
Rob Pike [Mon, 28 Dec 2009 20:41:53 +0000 (07:41 +1100)]
fix dumb bug: must write out default values inside arrays and slices

Fixes #459.

R=rsc, imkrasin, sonia
CC=golang-dev
https://golang.org/cl/181073

15 years agosimplify some code that is using vectors
Robert Griesemer [Mon, 28 Dec 2009 20:27:43 +0000 (12:27 -0800)]
simplify some code that is using vectors

R=agl, agl1
CC=golang-dev
https://golang.org/cl/181080

15 years agocrypto/tls: make Listener a pointer.
Adam Langley [Mon, 28 Dec 2009 19:40:01 +0000 (11:40 -0800)]
crypto/tls: make Listener a pointer.

Listener contains private members and 6g now enforces that private
members cannot be assigned outside of their package.

R=rsc
CC=golang-dev
https://golang.org/cl/183073

15 years agogc: various C nits, found by plan 9 compiler.
Russ Cox [Sun, 27 Dec 2009 17:32:30 +0000 (09:32 -0800)]
gc: various C nits, found by plan 9 compiler.
reported by erik quanstrom.

R=ken2
https://golang.org/cl/181071

15 years agoadd exceptions to the road map. i think this just was an oversight.
Rob Pike [Sat, 26 Dec 2009 20:57:57 +0000 (07:57 +1100)]
add exceptions to the road map.  i think this just was an oversight.
also a way to run code when object is deleted.
both of these are possibilities, not certainties.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/181057

15 years agoUpdate documentation around time.Sleep to specify its precision, and suggest
Devon H. O'Dell [Thu, 24 Dec 2009 21:24:00 +0000 (08:24 +1100)]
Update documentation around time.Sleep to specify its precision, and suggest
a possible interface for more granular sleep times.

Fixes issue #260.

R=rsc, r
CC=golang-dev
https://golang.org/cl/181058

15 years agofix naked < and > as reported by Peter Williams <>
Rob Pike [Thu, 24 Dec 2009 20:13:14 +0000 (07:13 +1100)]
fix naked < and > as reported by Peter Williams <>
(i thought these were legal in <pre> blocks)

R=rsc
CC=golang-dev, pwil3058
https://golang.org/cl/181055

15 years agoUse t.Errorf for formatted error output.
Ian Lance Taylor [Thu, 24 Dec 2009 06:08:49 +0000 (22:08 -0800)]
Use t.Errorf for formatted error output.

R=dsymonds1
CC=golang-dev
https://golang.org/cl/183049

15 years agoAdd a test for issue 337.
Ian Lance Taylor [Thu, 24 Dec 2009 06:08:27 +0000 (22:08 -0800)]
Add a test for issue 337.

gccgo currently miscompiles this test.

R=rsc
CC=golang-dev
https://golang.org/cl/181050

15 years agogo_spec: use PrimaryExpr as type switch expression
Russ Cox [Wed, 23 Dec 2009 21:48:44 +0000 (13:48 -0800)]
go_spec: use PrimaryExpr as type switch expression

Without this change, the spec parses <-c.(type) as (<-c).(type)
but parses <-c.(int) as <-(c.(int)).

With this change, the former parses as <-(c.(type)).

All three parsers already implement this rule, because
they look for the "type" word during parsing of a standard
type assertion.  This change merely brings the
spec in line with the implementations.

http://code.google.com/p/go/source/browse/src/cmd/gc/go.y#801
http://code.google.com/p/go/source/browse/src/pkg/go/parser/parser.go#900
http://gcc.gnu.org/viewcvs/branches/gccgo/gcc/go/parse.cc?revision=155389&view=markup#l2469

Pointed out by Brett Kail on golang-nuts.

R=gri
CC=golang-dev
https://golang.org/cl/182044

15 years agoAdd query to find number of subexpressions.
Peter Froehlich [Wed, 23 Dec 2009 21:43:35 +0000 (08:43 +1100)]
Add query to find number of subexpressions.

This was convenient for me to have without being forced
to parse the regexp myself. I'd understand if it's not
really wanted, but I also think that some meta information
about compiled regexps would be fine.

R=r, rsc
CC=golang-dev
https://golang.org/cl/183044

15 years agoremove nums.sh
Robert Griesemer [Wed, 23 Dec 2009 21:15:00 +0000 (13:15 -0800)]
remove nums.sh

R=rsc
CC=golang-dev
https://golang.org/cl/181049

15 years agoimplement .repeats for maps.
Rob Pike [Wed, 23 Dec 2009 20:41:56 +0000 (07:41 +1100)]
implement .repeats for maps.
Fixes #309.

R=rsc
CC=golang-dev
https://golang.org/cl/181044

15 years agomake 6prof (sic) architecture-independent.
Rob Pike [Wed, 23 Dec 2009 20:17:49 +0000 (07:17 +1100)]
make 6prof (sic) architecture-independent.
for now, it's amd64 and 386 only but it's trivial to add more.

Fixes #385.

(why couldn't it have been issue 386?)

tested for amd64 and 386 on darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/182043

15 years agocrypto/tls: extensions and Next Protocol Negotiation
Adam Langley [Wed, 23 Dec 2009 19:13:09 +0000 (11:13 -0800)]
crypto/tls: extensions and Next Protocol Negotiation

Add support for TLS extensions in general and Next Protocol
Negotiation in particular.

R=rsc
CC=golang-dev
https://golang.org/cl/181045

15 years agocgo: don't overwrite p.Crefs
Devon H. O'Dell [Wed, 23 Dec 2009 17:26:21 +0000 (09:26 -0800)]
cgo: don't overwrite p.Crefs

It's expected to be shared between all files so that all types are output.
Fixes bug reported on mailing list by Peter Froehlich.

R=rsc, phf
CC=golang-dev
https://golang.org/cl/183043

15 years agoFix comment for Chmod.
Peter Froehlich [Wed, 23 Dec 2009 16:49:38 +0000 (08:49 -0800)]
Fix comment for Chmod.

R=r, rsc
CC=golang-dev
https://golang.org/cl/183042

15 years agofix documentation bug in example
Rob Pike [Wed, 23 Dec 2009 02:47:58 +0000 (13:47 +1100)]
fix documentation bug in example
Fixes #452.

R=gri
CC=golang-dev, dougfelt
https://golang.org/cl/181043

15 years agoCleanup: remove Exp ending in identifiers
Robert Griesemer [Wed, 23 Dec 2009 02:45:36 +0000 (18:45 -0800)]
Cleanup: remove Exp ending in identifiers
as it is not needed anymore (only one impl.
of vector package).

Makefile, vector_test.go, and nogen_test.go
were modified manually (find/replace), the
other files (intvector_test.go, strinvector_test.go
are generated).

Runs all tests.

R=r
https://golang.org/cl/182041

15 years agoReplace container/vector with exp/vector (faster).
Robert Griesemer [Wed, 23 Dec 2009 02:25:27 +0000 (18:25 -0800)]
Replace container/vector with exp/vector (faster).

Manual changes to the following files:
src/pkg/Makefile
src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile)

R=rsc, r
CC=golang-dev
https://golang.org/cl/181041

15 years agoadd comment (warning about generated files)
Robert Griesemer [Tue, 22 Dec 2009 23:14:10 +0000 (15:14 -0800)]
add comment (warning about generated files)

R=r
CC=golang-dev
https://golang.org/cl/180108

15 years agohgtags: release.2009-12-22
Russ Cox [Tue, 22 Dec 2009 21:23:23 +0000 (13:23 -0800)]
hgtags: release.2009-12-22

R=r
CC=golang-dev
https://golang.org/cl/179130

15 years agohgtags: delete "release" (step 1 of new release) weekly.2009-12-22
Russ Cox [Tue, 22 Dec 2009 21:05:23 +0000 (13:05 -0800)]
hgtags: delete "release" (step 1 of new release)

R=r
CC=golang-dev
https://golang.org/cl/180118

15 years agofix up %p
Rob Pike [Tue, 22 Dec 2009 20:34:17 +0000 (07:34 +1100)]
fix up %p
- use an interface {Get()}
- implement Get for maps, slices
- for slices, retrieves the address of the end of the array, which will give the
same value for every slice of the same array.

R=rsc
CC=golang-dev
https://golang.org/cl/179129

15 years agojson: fix doc comment
Russ Cox [Tue, 22 Dec 2009 17:47:02 +0000 (09:47 -0800)]
json: fix doc comment

R=gri
CC=golang-dev
https://golang.org/cl/179128

15 years agoAllow %p on reference types, for debugging.
Rob Pike [Tue, 22 Dec 2009 06:02:00 +0000 (17:02 +1100)]
Allow %p on reference types, for debugging.
(Also fix case sensitivity in test for PTR inside fmt_test.go)
Fixes #441.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/180112

15 years agoupdate test.sh so it can run to completion again
Robert Griesemer [Mon, 21 Dec 2009 23:05:50 +0000 (15:05 -0800)]
update test.sh so it can run to completion again

R=r
CC=golang-dev
https://golang.org/cl/179120

15 years agoExperimental alternative implementation of the vector package
Jan Mercl [Mon, 21 Dec 2009 22:34:54 +0000 (14:34 -0800)]
Experimental alternative implementation of the vector package

R=gri
CC=rsc
https://golang.org/cl/178048

15 years agoadding individual contributor
Robert Griesemer [Mon, 21 Dec 2009 22:34:16 +0000 (14:34 -0800)]
adding individual contributor

R=r, rsc
CC=golang-dev
https://golang.org/cl/179118

15 years ago8g: add TESTL etc to reg opt
Russ Cox [Mon, 21 Dec 2009 19:02:18 +0000 (11:02 -0800)]
8g: add TESTL etc to reg opt

Fixes #436.

R=ken2
https://golang.org/cl/180105

15 years agocgo: interpret $CGOPKGDIR as absolute path if rooted
Russ Cox [Mon, 21 Dec 2009 16:31:02 +0000 (08:31 -0800)]
cgo: interpret $CGOPKGDIR as absolute path if rooted

R=dho
CC=golang-dev
https://golang.org/cl/180099

15 years agoMore evaluation order tests, for global variables and switch.
Ian Lance Taylor [Sat, 19 Dec 2009 05:59:47 +0000 (21:59 -0800)]
More evaluation order tests, for global variables and switch.

gccgo currently fails this test.

R=rsc
CC=golang-dev
https://golang.org/cl/179108

15 years agogc: method expressions on concrete types
Russ Cox [Sat, 19 Dec 2009 01:24:58 +0000 (17:24 -0800)]
gc: method expressions on concrete types

R=ken2
https://golang.org/cl/180092

15 years agonew comments for bytes.NewBuffer and NewBufferString.
Rob Pike [Fri, 18 Dec 2009 21:42:31 +0000 (08:42 +1100)]
new comments for bytes.NewBuffer and NewBufferString.
corrects a common misunderstanding about NewBuffer.

R=rsc
CC=golang-dev
https://golang.org/cl/179106

15 years agoruntime: fix race condition
Adam Langley [Fri, 18 Dec 2009 20:25:53 +0000 (12:25 -0800)]
runtime: fix race condition

(Thanks to ken and rsc for pointing this out)

rsc:
ken pointed out that there's a race in the new
one-lock-per-channel code.  the issue is that
if one goroutine has gone to sleep doing

select {
case <-c1:
case <-c2:
}

and then two more goroutines try to send
on c1 and c2 simultaneously, the way that
the code makes sure only one wins is the
selgen field manipulation in dequeue:

       // if sgp is stale, ignore it
       if(sgp->selgen != sgp->g->selgen) {
       //prints("INVALID PSEUDOG POINTER\n");
       freesg(c, sgp);
       goto loop;
       }

       // invalidate any others
       sgp->g->selgen++;

but because the global lock is gone both
goroutines will be fiddling with sgp->g->selgen
at the same time.

This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.

Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.

R=rsc
CC=golang-dev
https://golang.org/cl/180068

15 years agofix build, enable an exp/eval's assignment check
Robert Griesemer [Fri, 18 Dec 2009 19:21:11 +0000 (11:21 -0800)]
fix build, enable an exp/eval's assignment check
now that the parser doesn't do this test anymore

R=rsc
CC=golang-dev
https://golang.org/cl/179105

15 years agoreport an error for illegal octal numbers instead of treating them as floats
Robert Griesemer [Fri, 18 Dec 2009 18:52:11 +0000 (10:52 -0800)]
report an error for illegal octal numbers instead of treating them as floats
added more test cases
some capitalization cleanups

R=rsc
CC=golang-dev
https://golang.org/cl/180085

15 years agoremoved semantic check from parsers
Robert Griesemer [Fri, 18 Dec 2009 18:51:47 +0000 (10:51 -0800)]
removed semantic check from parsers

R=rsc
CC=golang-dev
https://golang.org/cl/179099

15 years agoMake.pkg: fix cgo for TARG=a/b
Russ Cox [Fri, 18 Dec 2009 01:28:22 +0000 (17:28 -0800)]
Make.pkg: fix cgo for TARG=a/b

R=dho, phf
CC=golang-dev
https://golang.org/cl/180082

15 years agocgo: include line number information to keep go/printer happy
Russ Cox [Fri, 18 Dec 2009 01:04:48 +0000 (17:04 -0800)]
cgo: include line number information to keep go/printer happy

Fixes #443.

R=dho
CC=golang-dev
https://golang.org/cl/179095

15 years ago first stub for softfloats, intercepts float instructions and skips
Kai Backman [Fri, 18 Dec 2009 00:08:42 +0000 (16:08 -0800)]
first stub for softfloats, intercepts float instructions and skips
        them in the stream.

R=rsc
https://golang.org/cl/174052

15 years agofix for gofmt rewrite matcher bug
Robert Griesemer [Thu, 17 Dec 2009 23:23:19 +0000 (15:23 -0800)]
fix for gofmt rewrite matcher bug

R=rsc
CC=golang-dev
https://golang.org/cl/179096

15 years agogc: fix compiler crash
Russ Cox [Thu, 17 Dec 2009 23:08:55 +0000 (15:08 -0800)]
gc: fix compiler crash

R=ken2
CC=dho
https://golang.org/cl/179097

15 years agouse new tab indentation format in godoc, but convert
Robert Griesemer [Thu, 17 Dec 2009 22:10:49 +0000 (14:10 -0800)]
use new tab indentation format in godoc, but convert
leading tabs into spaces to ensure a good outcome in
most browsers

R=rsc
https://golang.org/cl/165051

15 years agotime: add ISO 8601 time format
Ben Olive [Thu, 17 Dec 2009 21:39:13 +0000 (13:39 -0800)]
time: add ISO 8601 time format

Fixes #431.

R=r, rsc
CC=golang-dev
https://golang.org/cl/179079

15 years agoA+C: Ben Olive (individual CLA)
Russ Cox [Thu, 17 Dec 2009 21:38:28 +0000 (13:38 -0800)]
A+C: Ben Olive (individual CLA)

R=gri
CC=golang-dev
https://golang.org/cl/180081

15 years agoAllow cgo to accept multiple .go inputs for a package
Devon H. O'Dell [Thu, 17 Dec 2009 21:20:56 +0000 (13:20 -0800)]
Allow cgo to accept multiple .go inputs for a package

Fixes #342.

R=rsc
CC=golang-dev
https://golang.org/cl/179062

15 years agoUse BitSize instead of the field's type native ByteSize when calculating
Devon H. O'Dell [Thu, 17 Dec 2009 20:38:29 +0000 (12:38 -0800)]
Use BitSize instead of the field's type native ByteSize when calculating
structs containing bitfields.

Fixes #163.

R=rsc
CC=golang-dev
https://golang.org/cl/180059

15 years agoUpdated the XGB python script to generate semicolon-free
Tor Andersson [Thu, 17 Dec 2009 20:19:40 +0000 (12:19 -0800)]
Updated the XGB python script to generate semicolon-free
source for xproto.go.

R=rsc
CC=golang-dev
https://golang.org/cl/180074

15 years agoruntime: if os/signal is not in use, crash on
Russ Cox [Thu, 17 Dec 2009 04:20:50 +0000 (20:20 -0800)]
runtime: if os/signal is not in use, crash on
most signals, so that ordinary programs
can be killed, for example.

Fixes #434.

R=dsymonds1
CC=golang-dev, hoisie
https://golang.org/cl/180064

15 years agomake it more explicit that design discussions should happen before code reviews
Rob Pike [Thu, 17 Dec 2009 01:12:47 +0000 (12:12 +1100)]
make it more explicit that design discussions should happen before code reviews

R=rsc
CC=golang-dev
https://golang.org/cl/180075

15 years ago- Parse expressions as opposed to statements for gofmt rewrite patterns.
Robert Griesemer [Thu, 17 Dec 2009 00:53:56 +0000 (16:53 -0800)]
- Parse expressions as opposed to statements for gofmt rewrite patterns.
Allows stand-alone types (e.g. []int as patterns) and doesn't require
a semicolon at the end (which are now mandatory terminators).

- Fix a matcher bug.

R=rsc
CC=golang-dev
https://golang.org/cl/179088

15 years agoBasic image/jpeg decoder.
Nigel Tao [Wed, 16 Dec 2009 23:32:17 +0000 (10:32 +1100)]
Basic image/jpeg decoder.

This is not a complete JPEG implementation (e.g. it does not handle
progressive JPEGs or restart markers), but I was able to take a photo
with my phone, and view the resultant JPEG in pure Go.

The decoder is simple, but slow. The Huffman decoder in particular
should be easily improvable, but optimization is left to future
changelists. Being able to inline functions in the inner loop should
also help performance.

The output is not pixel-for-pixel identical to libjpeg, although
identical behavior isn't necessarily a goal, since JPEG is a lossy
codec. There are at least two reasons for the discrepancy.

First, the inverse DCT algorithm used is the same as Plan9's
src/cmd/jpg, which has different rounding errors from libjpeg's
default IDCT implementation. Note that libjpeg actually has three
different IDCT implementations: one floating point, and two fixed
point. Out of those four, Plan9's seemed the simplest to understand,
partly because it has no #ifdef's or C macros.

Second, for 4:2:2 or 4:2:0 chroma sampling, this implementation does
nearest neighbor upsampling, compared to libjpeg's triangle filter
(e.g. see h2v1_fancy_upsample in jdsample.c).

The difference from the first reason is typically zero, but sometimes
1 (out of 256) in YCbCr space, or double that in RGB space. The
difference from the second reason can be as large as 8/256 in YCbCr
space, in regions of steep chroma gradients. Informal eyeballing
suggests that the net difference is typically imperceptible, though.

R=r
CC=golang-dev, rsc
https://golang.org/cl/164056

15 years agoAdd roadmap document.
Ian Lance Taylor [Wed, 16 Dec 2009 23:30:39 +0000 (15:30 -0800)]
Add roadmap document.

Also adds Development heading on navbar, with Roadmap being
the only current entry.

R=r
CC=golang-dev
https://golang.org/cl/180069

15 years agoDon't ignore flags controlling the amount of source code parsed
Robert Griesemer [Wed, 16 Dec 2009 22:12:24 +0000 (14:12 -0800)]
Don't ignore flags controlling the amount of source code parsed
in parser's ParsePkgFile and ParsePackage functions.

R=rsc
CC=golang-dev, rog
https://golang.org/cl/180070

15 years agoadd the ability to invoke niladic single-valued methods in templates.
Rob Pike [Wed, 16 Dec 2009 11:10:50 +0000 (03:10 -0800)]
add the ability to invoke niladic single-valued methods in templates.
Fixes #389.

R=rsc
CC=golang-dev
https://golang.org/cl/180061

15 years agoThis patch enables cgo utility to correctly convert enums in the C source
Moriyoshi Koizumi [Wed, 16 Dec 2009 05:24:17 +0000 (21:24 -0800)]
This patch enables cgo utility to correctly convert enums in the C source
into consts in the resulting Go source.  Previously known as issue 161047,
which I deleted accidentally.  Fixes issue 207.

R=rsc
https://golang.org/cl/166059

15 years agorand: Zipf distributed random variates.
William Josephson [Wed, 16 Dec 2009 05:10:37 +0000 (21:10 -0800)]
rand: Zipf distributed random variates.

R=rsc
https://golang.org/cl/176070

15 years agobytes, strings: add new function Fields
Andrey Mirtchovski [Wed, 16 Dec 2009 05:09:55 +0000 (21:09 -0800)]
bytes, strings: add new function Fields

R=rsc, r, phf
CC=golang-dev
https://golang.org/cl/170046

15 years agomath: special cases for Pow
Charles L. Dorian [Wed, 16 Dec 2009 04:43:12 +0000 (20:43 -0800)]
math: special cases for Pow

R=rsc
CC=golang-dev
https://golang.org/cl/176064

15 years agodoc/install.html: how to update to a new release
Russ Cox [Wed, 16 Dec 2009 03:16:56 +0000 (19:16 -0800)]
doc/install.html: how to update to a new release

Fixes #422.

R=r
CC=golang-dev
https://golang.org/cl/180057

15 years agoos/signal: new package
David Symonds [Wed, 16 Dec 2009 02:21:29 +0000 (18:21 -0800)]
os/signal: new package

Fixes #71.

R=rsc, r
https://golang.org/cl/162056

15 years agoFix for scanner bug (introduced with most recent change).
Robert Griesemer [Wed, 16 Dec 2009 02:03:59 +0000 (18:03 -0800)]
Fix for scanner bug (introduced with most recent change).

Fixes #433.

R=rsc
CC=golang-dev
https://golang.org/cl/179072

15 years agosyscall: RawSyscall must not call exitsyscall
Russ Cox [Wed, 16 Dec 2009 01:37:47 +0000 (17:37 -0800)]
syscall: RawSyscall must not call exitsyscall

Fixes #405.

R=r
CC=golang-dev, hoisie
https://golang.org/cl/180056

15 years agonew semicolon rule in effective_go.html.
Rob Pike [Wed, 16 Dec 2009 01:31:18 +0000 (12:31 +1100)]
new semicolon rule in effective_go.html.
eliminate all tab characters while we're here.

R=rsc
CC=golang-dev
https://golang.org/cl/180055

15 years agorand: add explicit Int31n to avoid 64-bit divide on 32-bit machines
Russ Cox [Wed, 16 Dec 2009 01:21:34 +0000 (17:21 -0800)]
rand: add explicit Int31n to avoid 64-bit divide on 32-bit machines
    use Int31n in Intn when possible.

Fixes #390.

(using 8g)
Intn1000      50000000         38 ns/op
Int31n1000    50000000         39 ns/op
Int63n1000    20000000        114 ns/op

R=r
CC=golang-dev, skybrian
https://golang.org/cl/180054

15 years agomath: faster, easier to inline IsNaN, IsInf
Russ Cox [Wed, 16 Dec 2009 01:21:01 +0000 (17:21 -0800)]
math: faster, easier to inline IsNaN, IsInf

R=r
CC=golang-dev
https://golang.org/cl/180046

15 years agoruntime: return zero value in x, ok = <-c when ok == false
Russ Cox [Wed, 16 Dec 2009 00:59:23 +0000 (16:59 -0800)]
runtime: return zero value in x, ok = <-c when ok == false

Fixes #401.

R=ken2
https://golang.org/cl/180053

15 years agogc: fix import name resolution
Russ Cox [Wed, 16 Dec 2009 00:44:28 +0000 (16:44 -0800)]
gc: fix import name resolution

Fixes #403.

R=ken2
https://golang.org/cl/180052

15 years agoAdd basic http authentication support.
Ivan Krasin [Wed, 16 Dec 2009 00:27:45 +0000 (16:27 -0800)]
Add basic http authentication support.
Fixes #407.

R=rsc, ajstarks
CC=ushakov
https://golang.org/cl/176076

15 years agogc: bug fixes.
Russ Cox [Wed, 16 Dec 2009 00:22:04 +0000 (16:22 -0800)]
gc: bug fixes.
  * better error for lookup of unexported field
  * do not assign "ideal string" type to typed string literal
  * do not confuse methods and fields during interface check

Fixes #410.
Fixes #411.
Fixes #426.

R=ken2
https://golang.org/cl/179069

15 years agogc: allow ... in method lists
Russ Cox [Wed, 16 Dec 2009 00:20:37 +0000 (16:20 -0800)]
gc: allow ... in method lists

R=ken2
https://golang.org/cl/179070

15 years ago1) Change default gofmt default settings for
Robert Griesemer [Tue, 15 Dec 2009 23:41:46 +0000 (15:41 -0800)]
1) Change default gofmt default settings for
   parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

5th and last set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180050

15 years ago1) Change default gofmt default settings for
Robert Griesemer [Tue, 15 Dec 2009 23:40:16 +0000 (15:40 -0800)]
1) Change default gofmt default settings for
   parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

4th set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180049

15 years ago1) Change default gofmt default settings for
Robert Griesemer [Tue, 15 Dec 2009 23:35:38 +0000 (15:35 -0800)]
1) Change default gofmt default settings for
   parsing and printing to new syntax.

   Use -oldparser to parse the old syntax,
   use -oldprinter to print the old syntax.

2) Change default gofmt formatting settings
   to use tabs for indentation only and to use
   spaces for alignment. This will make the code
   alignment insensitive to an editor's tabwidth.

   Use -spaces=false to use tabs for alignment.

3) Manually changed src/exp/parser/parser_test.go
   so that it doesn't try to parse the parser's
   source files using the old syntax (they have
   new syntax now).

4) gofmt -w src misc test/bench

3rd set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180048

15 years ago 1) Change default gofmt default settings for
Robert Griesemer [Tue, 15 Dec 2009 23:33:31 +0000 (15:33 -0800)]
           1) Change default gofmt default settings for
                  parsing and printing to new syntax.

                  Use -oldparser to parse the old syntax,
                  use -oldprinter to print the old syntax.

               2) Change default gofmt formatting settings
                  to use tabs for indentation only and to use
                  spaces for alignment. This will make the code
                  alignment insensitive to an editor's tabwidth.

                  Use -spaces=false to use tabs for alignment.

               3) Manually changed src/exp/parser/parser_test.go
                  so that it doesn't try to parse the parser's
                  source files using the old syntax (they have
                  new syntax now).

               4) gofmt -w src misc test/bench

       1st set of files.

R=rsc
CC=agl, golang-dev, iant, ken2, r
https://golang.org/cl/180047

15 years agoupdate tutorial.
Rob Pike [Tue, 15 Dec 2009 23:29:53 +0000 (10:29 +1100)]
update tutorial.

R=rsc
CC=golang-dev
https://golang.org/cl/179063

15 years ago 1) Change default gofmt default settings for
Robert Griesemer [Tue, 15 Dec 2009 23:27:16 +0000 (15:27 -0800)]
           1) Change default gofmt default settings for
                  parsing and printing to new syntax.

                  Use -oldparser to parse the old syntax,
                  use -oldprinter to print the old syntax.

               2) Change default gofmt formatting settings
                  to use tabs for indentation only and to use
                  spaces for alignment. This will make the code
                  alignment insensitive to an editor's tabwidth.

                  Use -spaces=false to use tabs for alignment.

               3) Manually changed src/exp/parser/parser_test.go
                  so that it doesn't try to parse the parser's
                  source files using the old syntax (they have
                  new syntax now).

               4) gofmt -w src misc test/bench

       2nd set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/179067

15 years agogc: double-check usage of ...
Russ Cox [Tue, 15 Dec 2009 22:26:50 +0000 (14:26 -0800)]
gc: double-check usage of ...

Fixes #423.

R=ken2
https://golang.org/cl/180045

15 years agogc: var x, ok = m[y]
Russ Cox [Tue, 15 Dec 2009 22:26:33 +0000 (14:26 -0800)]
gc: var x, ok = m[y]

Fixes #384.

R=ken2
https://golang.org/cl/179061

15 years agoTweak test to work with both 6g and gccgo.
Ian Lance Taylor [Tue, 15 Dec 2009 21:57:24 +0000 (13:57 -0800)]
Tweak test to work with both 6g and gccgo.

Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.

6g:
bug215.go:12: invalid recursive type A

gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’

R=rsc
https://golang.org/cl/180044

15 years agocodereview: add golang-dev@googlegroups.com
Russ Cox [Tue, 15 Dec 2009 21:36:05 +0000 (13:36 -0800)]
codereview: add golang-dev@googlegroups.com
    automatically in "hg mail".
also, avoid "empty list means all modified files in client" bug

R=gri, cw
CC=golang-dev
https://golang.org/cl/174072

15 years agofix TODO: insert semicolons before any sequence of comments
Robert Griesemer [Tue, 15 Dec 2009 16:41:50 +0000 (08:41 -0800)]
fix TODO: insert semicolons before any sequence of comments
that introduce the newline (important for correct placement
of comments with gofmt when parsing new syntax)

R=rsc
https://golang.org/cl/179055

15 years agoxml: handle unexpected EOF while parsing and fix a bug in name
Arvindh Rajesh Tamilmani [Tue, 15 Dec 2009 03:28:36 +0000 (19:28 -0800)]
xml: handle unexpected EOF while parsing and fix a bug in name

mustgetc reports unexpected EOF as SyntaxError.  using
mustgetc seems to be a better approach than letting the
caller handle unexpected EOF every time.

name: the second if statement should explicitly return
ok==false.

R=rsc
https://golang.org/cl/174083

15 years agoruntime: in exitsyscall, avoid confusing garbage collector
Russ Cox [Tue, 15 Dec 2009 03:06:20 +0000 (19:06 -0800)]
runtime: in exitsyscall, avoid confusing garbage collector

R=r
CC=golang-dev
https://golang.org/cl/178046

15 years agoimproved formatting of import declarations and
Robert Griesemer [Tue, 15 Dec 2009 01:35:12 +0000 (17:35 -0800)]
improved formatting of import declarations and
multi-line expressions with comments

Fixes #414.

R=rsc
https://golang.org/cl/179047

15 years agocrypto/sha256: new package
Andy Davis [Mon, 14 Dec 2009 23:09:49 +0000 (15:09 -0800)]
crypto/sha256: new package

R=rsc
CC=golang-dev
https://golang.org/cl/176062

15 years agosimpler fix for the negative rune problem, spotted seconds after submitting the previ...
Rob Pike [Mon, 14 Dec 2009 22:31:24 +0000 (09:31 +1100)]
simpler fix for the negative rune problem, spotted seconds after submitting the previous fix.

R=rsc
https://golang.org/cl/178044

15 years agogenerate replacement rune when asked to encode a negative rune value.
Rob Pike [Mon, 14 Dec 2009 22:19:54 +0000 (09:19 +1100)]
generate replacement rune when asked to encode a negative rune value.
Fixes #425.

R=rsc
https://golang.org/cl/178043

15 years agoarchive/tar: bug fixes.
Christopher Wedgwood [Mon, 14 Dec 2009 19:35:02 +0000 (11:35 -0800)]
archive/tar: bug fixes.
1. If all data is exhausted using Read then a following Next will
   fail as if it saw EOF.  (Test case added.)
2. Seeking isn't always possible (i.e. sockets and pipes).  Fallback
   to read.  (Test case added.)
3. Fix to readHeader (cleaner fix pointed out by rsc).
   (TestReader modified.)
4. When Read has consumed all the data, don't try to read 0 bytes from reader.
   In cases where tr.nb is zero we attempt to read zero bytes and thus
   never see an EOF (this is most easily seen when the 'tar source' is
   something like bytes.Buffer{} as opposed to os.File).
5. If write is used to the point of ErrWriteTooLong, allow additional file entries.
6. Make close work as expected.  That is any further Write or
   WriteHeader attempts will result in ErrWriteAfterClose.
Fixes #419.

R=rsc, dsymonds1
https://golang.org/cl/162062

15 years agodon't show semicolons anymore with godoc
Robert Griesemer [Mon, 14 Dec 2009 17:14:00 +0000 (09:14 -0800)]
don't show semicolons anymore with godoc

R=rsc
https://golang.org/cl/174078

15 years agoA+C: two more names
Russ Cox [Mon, 14 Dec 2009 02:39:04 +0000 (18:39 -0800)]
A+C: two more names
Andy Davis (individual CLA)
Arvindh Rajesh Tamilmani (individual CLA)

R=r
https://golang.org/cl/176067

15 years agofix naked < as reported by pwil3058@gmail.com
Rob Pike [Mon, 14 Dec 2009 02:30:11 +0000 (13:30 +1100)]
fix naked < as reported by pwil3058@gmail.com

R=rsc
CC=pwil3058
https://golang.org/cl/174087

15 years agoWhen the buffer is empty, reset b.off to the beginning of the buffer
Rob Pike [Mon, 14 Dec 2009 02:13:01 +0000 (13:13 +1100)]
When the buffer is empty, reset b.off to the beginning of the buffer
to avoid growing unnecessarily.

R=rsc
CC=golang-dev
https://golang.org/cl/176071

15 years agosyscall: fix error return bug for 64-bit return on 32-bit platform
Christopher Wedgwood [Sun, 13 Dec 2009 21:05:49 +0000 (13:05 -0800)]
syscall: fix error return bug for 64-bit return on 32-bit platform

R=dho, rsc
CC=r
https://golang.org/cl/176058

15 years ago8l: add support for PE output.
Hector Chu [Sun, 13 Dec 2009 20:39:20 +0000 (12:39 -0800)]
8l: add support for PE output.

R=rsc
https://golang.org/cl/166080

15 years agoclean.bash: stop if $GOROOT is not set
Christopher Wedgwood [Sun, 13 Dec 2009 20:27:19 +0000 (12:27 -0800)]
clean.bash: stop if $GOROOT is not set

Doing rm -rf /pkg/.. blindly isn't nice.  It could have
unintended consequences.

Secondly set bash to abort on (unexpected) errors.

R=dho, rsc
CC=golang-dev
https://golang.org/cl/176056

15 years agoPorted godefs to Windows.
Hector Chu [Sun, 13 Dec 2009 20:21:44 +0000 (12:21 -0800)]
Ported godefs to Windows.

R=rsc
https://golang.org/cl/164049

15 years agogc: fix comment
Russ Cox [Sun, 13 Dec 2009 20:11:56 +0000 (12:11 -0800)]
gc: fix comment

R=gri
CC=golang-dev
https://golang.org/cl/174077