]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
14 years agohgtags: delete "release" (prepare for new release) weekly.2010-01-05
Russ Cox [Wed, 6 Jan 2010 01:12:44 +0000 (17:12 -0800)]
hgtags: delete "release" (prepare for new release)

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

14 years ago8a, 8l: Add FCOMI, FCOMIP, FUCOMI, FUCOMIP instructions
Evan Shaw [Wed, 6 Jan 2010 01:06:41 +0000 (17:06 -0800)]
8a, 8l: Add FCOMI, FCOMIP, FUCOMI, FUCOMIP instructions

Fixes #447

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

14 years agorollback of https://golang.org/cl/181077
Russ Cox [Wed, 6 Jan 2010 00:54:27 +0000 (16:54 -0800)]
rollback of https://golang.org/cl/181077
(broke build)

TBR=dho
https://golang.org/cl/181139

14 years agoxml: Fix comment so that example code compiles
Evan Shaw [Wed, 6 Jan 2010 00:50:52 +0000 (16:50 -0800)]
xml: Fix comment so that example code compiles

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

14 years agoUpdate Emacs go-mode for new semicolon rule.
Austin Clements [Wed, 6 Jan 2010 00:50:36 +0000 (16:50 -0800)]
Update Emacs go-mode for new semicolon rule.

Fixes #415.

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

14 years agobig: fix ProbablyPrime bug, comments
Russ Cox [Wed, 6 Jan 2010 00:49:05 +0000 (16:49 -0800)]
big: fix ProbablyPrime bug, comments

(changes adopted from alc, agl)

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

14 years agoFix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN
Devon H. O'Dell [Wed, 6 Jan 2010 00:22:40 +0000 (16:22 -0800)]
Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN

Fixes #468

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

14 years agosyscall: add nanosleep on FreeBSD
Devon H. O'Dell [Tue, 5 Jan 2010 17:21:15 +0000 (09:21 -0800)]
syscall: add nanosleep on FreeBSD

Fixes #461

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

14 years agonet: make Dial correctly return nil on error.
Roger Peppe [Tue, 5 Jan 2010 17:20:02 +0000 (09:20 -0800)]
net: make Dial correctly return nil on error.

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

14 years agoremove reference to "basic literal" since it's never defined
Robert Griesemer [Tue, 5 Jan 2010 01:28:02 +0000 (17:28 -0800)]
remove reference to "basic literal" since it's never defined

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

14 years agoSimplified parser interface.
Robert Griesemer [Tue, 5 Jan 2010 01:26:01 +0000 (17:26 -0800)]
Simplified parser interface.

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

14 years agoCheck for errors when writing fields of a struct.
Rob Pike [Tue, 5 Jan 2010 00:33:06 +0000 (11:33 +1100)]
Check for errors when writing fields of a struct.

R=rsc
CC=golang-dev, jack.palevich
https://golang.org/cl/183109

14 years agoAllow a nil Ident to print without crashing.
Roger Peppe [Mon, 4 Jan 2010 18:34:37 +0000 (10:34 -0800)]
Allow a nil Ident to print without crashing.
Allow Walk of []Decl

R=gri
CC=golang-dev, rsc
https://golang.org/cl/183112

14 years agofix up YB and add ZB, EB in example
Rob Pike [Sun, 3 Jan 2010 20:36:39 +0000 (07:36 +1100)]
fix up YB and add ZB, EB in example

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

14 years agoRemove redundant size check in resize. Let callers worry about that and resize should...
Yongjian Xu [Sat, 2 Jan 2010 00:09:22 +0000 (11:09 +1100)]
Remove redundant size check in resize. Let callers worry about that and resize should just do "resize".

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

14 years agotrivial bug: []byte is special but [3]byte is not.
Rob Pike [Thu, 31 Dec 2009 01:47:20 +0000 (12:47 +1100)]
trivial bug: []byte is special but [3]byte is not.
modify a test to verify the fix.

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

14 years agoMore Xcode support.
Robert Griesemer [Wed, 30 Dec 2009 23:30:57 +0000 (15:30 -0800)]
More Xcode support.
Recognize special comments starting
with TODO or BUG.

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

14 years agoDocument how to build gccgo to use gold.
Ian Lance Taylor [Tue, 29 Dec 2009 22:59:08 +0000 (14:59 -0800)]
Document how to build gccgo to use gold.

This provides full support for discontiguous stacks.

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

14 years agoTest case for issue 475 and related bug.
Robert Griesemer [Tue, 29 Dec 2009 22:44:56 +0000 (14:44 -0800)]
Test case for issue 475 and related bug.

R=iant
CC=golang-dev
https://golang.org/cl/183087

14 years agoImproved Xcode support
Ken Friedenbach [Tue, 29 Dec 2009 22:43:54 +0000 (14:43 -0800)]
Improved Xcode support

Added definition for raw string.
Added definitions for function and method declarations.
Enabled function, method, and type declarations to appear in Editor pop up menu.
Fixes #466.

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

14 years agoadded author/contributor
Robert Griesemer [Tue, 29 Dec 2009 22:43:25 +0000 (14:43 -0800)]
added author/contributor

R=iant
CC=golang-dev
https://golang.org/cl/181099

14 years agotest case for issue 471
Robert Griesemer [Tue, 29 Dec 2009 22:01:09 +0000 (14:01 -0800)]
test case for issue 471

R=iant
CC=golang-dev
https://golang.org/cl/183084

14 years agoimprove some type switches now that multiple types per case are supported.
Rob Pike [Tue, 29 Dec 2009 21:33:48 +0000 (08:33 +1100)]
improve some type switches now that multiple types per case are supported.

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

14 years agoApply symmetric changes to sha1 and sha256 as to md4 and md5.
Robert Griesemer [Tue, 29 Dec 2009 19:41:44 +0000 (11:41 -0800)]
Apply symmetric changes to sha1 and sha256 as to md4 and md5.

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

14 years agoPNG decoder now handles transparent paletted images.
Nigel Tao [Tue, 29 Dec 2009 04:23:55 +0000 (15:23 +1100)]
PNG decoder now handles transparent paletted images.
Fixes #439.

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

14 years agoJPEG decoder now handles RST (restart) markers.
Nigel Tao [Tue, 29 Dec 2009 04:20:53 +0000 (15:20 +1100)]
JPEG decoder now handles RST (restart) markers.

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

14 years agoadd a debugging printer to the gob package.
Rob Pike [Tue, 29 Dec 2009 03:03:33 +0000 (14:03 +1100)]
add a debugging printer to the gob package.
used only for debugging, debug.go is not normally part of the package source.

also add a dump program to call it.

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

14 years agoremove all references to gobType() from the decoder.
Rob Pike [Tue, 29 Dec 2009 03:03:12 +0000 (14:03 +1100)]
remove all references to gobType() from the decoder.
Fixes #470.

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

14 years agoFix bug in godoc tab conversion filter:
Robert Griesemer [Tue, 29 Dec 2009 01:24:53 +0000 (17:24 -0800)]
Fix bug in godoc tab conversion filter:
tabs after an empty line where not converted.

Also, made it more robust in the presence of
(unexpected) ' ' and '\v' chars in indentation
mode.

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

14 years agoSymmetric changes to md4.go as for md5.go.
Robert Griesemer [Tue, 29 Dec 2009 01:20:33 +0000 (17:20 -0800)]
Symmetric changes to md4.go as for md5.go.

Use uint index variables in some cases instead
of int to enable strength reduction; this makes
it possible for the compiler to reduce % into
masks.

Old code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL    AX,BX
0472 (md4block.go:44) MOVL    AX,BP
0473 (md4block.go:44) MOVL    AX,R8
0474 (md4block.go:44) SARL    $31,R8
0475 (md4block.go:44) SHRL    $30,R8
0476 (md4block.go:44) ADDL    R8,BP
0477 (md4block.go:44) SARL    $2,BP
0478 (md4block.go:44) IMULL   $4,BP
0479 (md4block.go:44) SUBL    BP,BX
0480 (md4block.go:44) MOVLQSX BX,BX
0481 (md4block.go:44) LEAQ    shift1+0(SB),BP
0482 (md4block.go:44) CMPL    BX,8(BP)
0483 (md4block.go:44) JCS     ,485
0484 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
0485 (md4block.go:44) MOVQ    (BP),BP
0486 (md4block.go:44) MOVL    (BP)(BX*4),DI

New code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL    AX,BX
0472 (md4block.go:44) ANDL    $3,BX
0473 (md4block.go:44) MOVLQZX BX,BX
0474 (md4block.go:44) LEAQ    shift1+0(SB),BP
0475 (md4block.go:44) CMPL    BX,8(BP)
0476 (md4block.go:44) JCS     ,478
0477 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
0478 (md4block.go:44) MOVQ    (BP),BP
0479 (md4block.go:44) MOVL    (BP)(BX*4),DI

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

14 years agoA couple of tighter loops.
Robert Griesemer [Mon, 28 Dec 2009 23:48:58 +0000 (15:48 -0800)]
A couple of tighter loops.

(I was looking at this code accidentally because of some gofmt
issues and thought that one could write this more effectively.
You may have deliberately chosen not to use ranges here to make
the index range clearer. Just let me know.)

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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