]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agosyscall: correct WSTOPPED on OS X
Russ Cox [Tue, 18 Jan 2011 19:02:41 +0000 (14:02 -0500)]
syscall: correct WSTOPPED on OS X

Have to set #defines correctly to get correct value.
Otherwise get a mask for use in implementing WIFSTOPPED(status).

Changed WSTOPPED definition in os because on
OS X WSTOPPED and WUNTRACED have different values
even though they seem to mean the same thing.

Fixes #1374.

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

14 years agotutorial: make stdin, stdout, stderr work on Windows.
Rob Pike [Tue, 18 Jan 2011 19:01:47 +0000 (11:01 -0800)]
tutorial: make stdin, stdout, stderr work on Windows.

R=brainman
CC=golang-dev
https://golang.org/cl/4042042

14 years agogodoc: bring back "indexing in progress" message
Robert Griesemer [Tue, 18 Jan 2011 18:59:54 +0000 (10:59 -0800)]
godoc: bring back "indexing in progress" message

A wrongly nested if prevented the message from appearing.

Fixes #1420.

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

14 years agogc: fix typed constant declarations
Anthony Martin [Tue, 18 Jan 2011 16:24:49 +0000 (11:24 -0500)]
gc: fix typed constant declarations

Fixes #1411.

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

14 years agoexpvar: add Float
Jos Visser [Tue, 18 Jan 2011 16:24:43 +0000 (11:24 -0500)]
expvar: add Float

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

14 years agoC: add Jos Visser (Google CLA)
Russ Cox [Tue, 18 Jan 2011 16:24:13 +0000 (11:24 -0500)]
C: add Jos Visser (Google CLA)

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

14 years agosyscall: Correct length of GNU/Linux abstract Unix domain sockaddr.
Ian Lance Taylor [Tue, 18 Jan 2011 16:10:22 +0000 (08:10 -0800)]
syscall: Correct length of GNU/Linux abstract Unix domain sockaddr.

R=rsc, iant2
CC=golang-dev
https://golang.org/cl/3974044

14 years agoarm reg bug with SP adjust
Ken Thompson [Tue, 18 Jan 2011 04:39:26 +0000 (20:39 -0800)]
arm reg bug with SP adjust
after call to deferproc

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

14 years agoarm bug address of a string
Ken Thompson [Mon, 17 Jan 2011 21:27:05 +0000 (13:27 -0800)]
arm bug address of a string

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

14 years agoarm reg bug with address(variable)
Ken Thompson [Sun, 16 Jan 2011 23:25:13 +0000 (15:25 -0800)]
arm reg bug with address(variable)

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

14 years agodisable reg - tar test failed
Ken Thompson [Sun, 16 Jan 2011 01:11:24 +0000 (17:11 -0800)]
disable reg - tar test failed

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

14 years agoarm reg bug MOVW into bool variable
Ken Thompson [Sun, 16 Jan 2011 00:55:47 +0000 (16:55 -0800)]
arm reg bug MOVW into bool variable

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

14 years agobytes.Buffer: fix typo in comment (doubled 'to')
Rob Pike [Sat, 15 Jan 2011 07:00:02 +0000 (23:00 -0800)]
bytes.Buffer: fix typo in comment (doubled 'to')

R=ken2
CC=golang-dev
https://golang.org/cl/4035041

14 years agoruntime: fix arm reflect.call boundary case
Russ Cox [Fri, 14 Jan 2011 19:05:20 +0000 (14:05 -0500)]
runtime: fix arm reflect.call boundary case

The fault was lucky: when it wasn't faulting it was silently
copying a word from some other block and later putting
that same word back.  If some other goroutine had changed
that word of memory in the interim, too bad.

The ARM code was inconsistent about whether the
"argument frame" included the saved LR.  Including it made
some things more regular but mostly just caused confusion
in the places where the regularity broke.  Now the rule
reflects reality: argp is always a pointer to arguments,
never a saved link register.

Renamed struct fields to make meaning clearer.

Running ARM in QEMU, package time's gotest:
  * before: 27/58 failed
  * after: 0/50

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

14 years agocgo: In _cgo_main.c define all provided symbols as functions.
Ian Lance Taylor [Fri, 14 Jan 2011 18:52:08 +0000 (10:52 -0800)]
cgo: In _cgo_main.c define all provided symbols as functions.

This defines crosscall2 in a way that matches that real
definition, and also defines _cgo_allocate and _cgo_panic to
indicate that they are available to be called by code compiled
with gcc.

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

14 years agoruntime/cgo: Don't define crosscall2 in dummy _cgo_main.c.
Ian Lance Taylor [Fri, 14 Jan 2011 18:51:47 +0000 (10:51 -0800)]
runtime/cgo: Don't define crosscall2 in dummy _cgo_main.c.

In this specific package crosscall2 is already defined in a .S
file anyhow.  This avoids a warning about mismatched
alignment.

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

14 years agosyscall: Correct length of SockaddrUnix.
Ian Lance Taylor [Fri, 14 Jan 2011 18:50:51 +0000 (10:50 -0800)]
syscall: Correct length of SockaddrUnix.

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

14 years agogofmt, go/printer: do not insert extra linebreaks where they may break the code
Robert Griesemer [Fri, 14 Jan 2011 17:42:37 +0000 (09:42 -0800)]
gofmt, go/printer: do not insert extra linebreaks where they may break the code

Introduced a printer mode (pmode) type and corresponding
pmode values which permit easy toggling of the current
printer mode for fine-tuning of layout.

Use the printer mode to disable potential introduction of
line breaks before a closing '}' in composite literals.

Added extra test case. Applied gofmt to src and misc.

Fixes #1365.

R=r2
CC=golang-dev
https://golang.org/cl/4008041

14 years agofix tst instruction on arm to set overflow bit
Ken Thompson [Fri, 14 Jan 2011 04:05:08 +0000 (20:05 -0800)]
fix tst instruction on arm to set overflow bit

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

14 years agogodoc: remove tab before <pre>-formatted section
Robert Griesemer [Fri, 14 Jan 2011 02:34:22 +0000 (18:34 -0800)]
godoc: remove tab before <pre>-formatted section

Fixes #1321.

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

14 years agofix build (this time for real): adjust typechecker test, ogle
Robert Griesemer [Fri, 14 Jan 2011 01:41:45 +0000 (17:41 -0800)]
fix build (this time for real): adjust typechecker test, ogle

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

14 years agofix build (submitted a modified parser.go file by mistake)
Robert Griesemer [Fri, 14 Jan 2011 01:26:38 +0000 (17:26 -0800)]
fix build (submitted a modified parser.go file by mistake)

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

14 years agogo/scanner: Make Init take a *token.File instead of a *token.FileSet.
Robert Griesemer [Fri, 14 Jan 2011 01:20:26 +0000 (17:20 -0800)]
go/scanner: Make Init take a *token.File instead of a *token.FileSet.

Until now, each scan of a file added a new file to the file set.
With this change, a file can be re-scanned using the same *token.File
w/o changing the file set. Eventually this will enable the re-use of
cached source code in godoc (for the fulltext index). At the moment,
source files are read over and over again from disk.

This is the first step in that direction.

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

14 years agocmath test: fix format (%g does not print booleans)
Rob Pike [Fri, 14 Jan 2011 00:30:56 +0000 (16:30 -0800)]
cmath test: fix format (%g does not print booleans)

R=ken
CC=golang-dev
https://golang.org/cl/4003041

14 years agoadd TST op code
Ken Thompson [Thu, 13 Jan 2011 23:34:52 +0000 (15:34 -0800)]
add TST op code

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

14 years agoCONTRIBUTORS: fix bradfitz entry
Andrew Gerrand [Thu, 13 Jan 2011 23:12:24 +0000 (10:12 +1100)]
CONTRIBUTORS: fix bradfitz entry

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

14 years agoCONTRIBUTORS: add bradfitz@golang.org
Andrew Gerrand [Thu, 13 Jan 2011 22:27:51 +0000 (09:27 +1100)]
CONTRIBUTORS: add bradfitz@golang.org

R=bradfitz, dangabrad
CC=golang-dev
https://golang.org/cl/3998041

14 years agohttp: fix scheme-relative URL parsing; add ParseRequestURL
Brad Fitzpatrick [Thu, 13 Jan 2011 22:10:02 +0000 (09:10 +1100)]
http: fix scheme-relative URL parsing; add ParseRequestURL

Also adds some tests for Issue 900 which was the reason
the current URL parsing is broken.  (the previous fix
was wrong)

R=rsc, adg, dangabrad, bradfitzwork
CC=golang-dev
https://golang.org/cl/3910042

14 years agogodoc: don't double HTML-escape search result snippets
Robert Griesemer [Thu, 13 Jan 2011 20:44:04 +0000 (12:44 -0800)]
godoc: don't double HTML-escape search result snippets

Fixes #1412.

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

14 years agohttp: handle HEAD requests correctly
Russ Cox [Thu, 13 Jan 2011 19:34:31 +0000 (14:34 -0500)]
http: handle HEAD requests correctly

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

14 years agogo_spec: specify that int and uint have the same size
Robert Griesemer [Thu, 13 Jan 2011 18:24:04 +0000 (10:24 -0800)]
go_spec: specify that int and uint have the same size

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

14 years agogodoc: peephole optimization for generated HTML
Robert Griesemer [Thu, 13 Jan 2011 18:23:42 +0000 (10:23 -0800)]
godoc: peephole optimization for generated HTML

When searching for regular expressions such as
".", there are many consecutive matches.
In the generated HTML, combine them instead of
generating a new <span> for each adjacent text
segment highlighting a match.

Massively reduces the size of the generated
HTML in those cases.

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

14 years agotag release.2011-01-12
Andrew Gerrand [Thu, 13 Jan 2011 01:06:35 +0000 (12:06 +1100)]
tag release.2011-01-12

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

14 years agorelease.2011-01-12 weekly.2011-01-12
Andrew Gerrand [Thu, 13 Jan 2011 01:04:43 +0000 (12:04 +1100)]
release.2011-01-12

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

14 years agodisable arm registifier for the moment
Rob Pike [Thu, 13 Jan 2011 00:17:14 +0000 (16:17 -0800)]
disable arm registifier for the moment

R=ken2, ken3
CC=golang-dev
https://golang.org/cl/3970041

14 years agorpc: export names in debug service so it works with template changes
Rob Pike [Wed, 12 Jan 2011 23:23:21 +0000 (15:23 -0800)]
rpc: export names in debug service so it works with template changes

R=dsymonds
CC=golang-dev
https://golang.org/cl/3760049

14 years agogoinstall: Fix template to use exported fields
Gustavo Niemeyer [Wed, 12 Jan 2011 18:45:24 +0000 (10:45 -0800)]
goinstall: Fix template to use exported fields

It's currently broken due to f6d5bac536c5.

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

14 years agoencoding/line: fix error call (missing argument)
Rob Pike [Wed, 12 Jan 2011 08:25:29 +0000 (00:25 -0800)]
encoding/line: fix error call (missing argument)

R=agl1, rsc
CC=golang-dev
https://golang.org/cl/3861044

14 years agotemplate: give "unexported" error when accessing an unexported field.
Rob Pike [Wed, 12 Jan 2011 08:25:17 +0000 (00:25 -0800)]
template: give "unexported" error when accessing an unexported field.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/3903043

14 years agosuffixarray: faster creation algorithm
Eric Eisner [Wed, 12 Jan 2011 05:46:50 +0000 (21:46 -0800)]
suffixarray: faster creation algorithm

This implements the algorithm qsufsort using the sort package
as a sorting primitive. Its worst-case performance is O(N*log(N)), and it
uses only an additional slice of N ints of memory during creation.

Benchmarks (seconds):
           old    new
10k nulls          149    0.044
1M English corpus  32.0   3.6

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

14 years agoC&A for Eric Eisner
Rob Pike [Wed, 12 Jan 2011 05:42:24 +0000 (21:42 -0800)]
C&A for Eric Eisner
there is something funny in the database; trying to recreate the change.

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

14 years agogodoc: remove TODO (bug257.go can now be indexed)
Robert Griesemer [Wed, 12 Jan 2011 05:24:44 +0000 (21:24 -0800)]
godoc: remove TODO (bug257.go can now be indexed)

Pending CL 3752044.

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

14 years agohg: add cgo/_cgo_* to .hgignore.
Nigel Tao [Wed, 12 Jan 2011 05:17:54 +0000 (16:17 +1100)]
hg: add cgo/_cgo_* to .hgignore.

R=rsc, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3956042

14 years agonet: use closesocket api instead of CloseHandle on Windows
Alex Brainman [Wed, 12 Jan 2011 04:55:17 +0000 (15:55 +1100)]
net: use closesocket api instead of CloseHandle on Windows

thanks to piotrnar for the original CL.
Fixes #1371.

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

14 years agogob: make (en|dec)code(Ui|I)nt methods rather than functions.
Rob Pike [Wed, 12 Jan 2011 01:56:45 +0000 (17:56 -0800)]
gob: make (en|dec)code(Ui|I)nt methods rather than functions.
No functional (ha!) change.

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

14 years agocrypto/openpgp: add error and armor
Adam Langley [Wed, 12 Jan 2011 01:54:30 +0000 (20:54 -0500)]
crypto/openpgp: add error and armor

error is needed by all the OpenPGP packages as they return a shared
family of error types.

armor implements OpenPGP armoring. It's very like PEM except:
  a) it includes a CRC24 checksum
  b) PEM values are small (a few KB) and so encoding/pem assumes that
     they fit in memory. Armored data can be very large and so this
     package presents a streaming interface.

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

14 years agocrypto: add twofish package
Berengar Lehr [Wed, 12 Jan 2011 01:51:35 +0000 (20:51 -0500)]
crypto: add twofish package

The code was (as annotated in the source code) adopted from Tom's
LibCrypt (public domain code, [1]). It was neither optimised for speed
nor were any security features added.

[1] http://libtom.org/?page=features&newsitems=5&whatfile=crypt

R=rsc, berengarlehr, albert.strasheim, agl1
CC=golang-dev, schulze
https://golang.org/cl/2687042

14 years agoturn off peep half of optimizer for release
Ken Thompson [Wed, 12 Jan 2011 01:30:25 +0000 (17:30 -0800)]
turn off peep half of optimizer for release

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

14 years agojson: do not Marshal unexported struct fields
Andrew Gerrand [Wed, 12 Jan 2011 00:59:33 +0000 (11:59 +1100)]
json: do not Marshal unexported struct fields

R=r, cw, niemeyer, rsc
CC=golang-dev
https://golang.org/cl/3952041

14 years agoruntime: revert 6974:1f3c3696babb
Alex Brainman [Wed, 12 Jan 2011 00:48:15 +0000 (11:48 +1100)]
runtime: revert 6974:1f3c3696babb

I missed that environment is used during runtime setup,
well before go init() functions run. Implemented os-dependent
runtime.goenvs functions to allow for different unix, plan9 and
windows versions of environment discovery.

R=rsc, paulzhol
CC=golang-dev
https://golang.org/cl/3787046

14 years agoos: add Sync to *File, wraps syscall.Fsync
Andrew Gerrand [Wed, 12 Jan 2011 00:08:39 +0000 (11:08 +1100)]
os: add Sync to *File, wraps syscall.Fsync

R=rsc, brainman, r, r2
CC=golang-dev
https://golang.org/cl/3887042

14 years agotemplate: allow accesses only to exported fields and methods
Rob Pike [Tue, 11 Jan 2011 23:47:45 +0000 (15:47 -0800)]
template: allow accesses only to exported fields and methods

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

14 years agold: Fix exported dynamic symbols on 386 Mach-O.
Ian Lance Taylor [Tue, 11 Jan 2011 22:43:28 +0000 (14:43 -0800)]
ld: Fix exported dynamic symbols on 386 Mach-O.

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

14 years agohttp: fix text displayed in Redirect
Russ Cox [Tue, 11 Jan 2011 22:15:28 +0000 (17:15 -0500)]
http: fix text displayed in Redirect

In the case where r.Method == "POST", was
calling Printf with an argument but "" format string,
causing a spurious %!EXTRA(...) message.

Also escape string properly in HTML generation.

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

14 years agold: Fix exported dynamic symbols on Mach-O.
Ian Lance Taylor [Tue, 11 Jan 2011 21:56:47 +0000 (13:56 -0800)]
ld: Fix exported dynamic symbols on Mach-O.

* Avoid confusion between imported and exported symbols.
* Record number of imported and exported symbols correctly.
* Explictly relocate SMACHOSYM section, since it is not in datap.

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

14 years agogob: do not encode or decode unexported fields
Rob Pike [Tue, 11 Jan 2011 21:44:00 +0000 (13:44 -0800)]
gob: do not encode or decode unexported fields
Such fields are simply ignored.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/3889043

14 years agonetchan: make fields public for pending gob change
Rob Pike [Tue, 11 Jan 2011 21:43:43 +0000 (13:43 -0800)]
netchan: make fields public for pending gob change

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

14 years agosyscall: fix mksysnum_linux.sh
Anthony Martin [Tue, 11 Jan 2011 19:38:14 +0000 (14:38 -0500)]
syscall: fix mksysnum_linux.sh

A few system call numbers on x86 Linux are
defined in terms of a previous definition,

e.g.,
#define __NR_timer_create 259
#define __NR_timer_settime (__NR_timer_create+1)
...
#define __NR_mq_open 277
#define __NR_mq_unlink (__NR_mq_open+1)

This change assumes the numbers are sorted
sequentially in the input file.

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/3946041

14 years agold: Permit an Mach-O symbol to be exported in the dynamic symbol table.
Ian Lance Taylor [Tue, 11 Jan 2011 19:22:47 +0000 (11:22 -0800)]
ld: Permit an Mach-O symbol to be exported in the dynamic symbol table.

Submitting TBR to fix Darwin build.

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

14 years agogoinstall: preliminary support for cgo packages
Gustavo Niemeyer [Tue, 11 Jan 2011 18:14:48 +0000 (13:14 -0500)]
goinstall: preliminary support for cgo packages

Can handle cgo packages now but only if they
do not need to set CGO_LDFLAGS and CGO_CFLAGS.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/3891042

14 years agolog: add methods for exit and panic
Rob Pike [Tue, 11 Jan 2011 17:57:47 +0000 (09:57 -0800)]
log: add methods for exit and panic
There were already functions for the standard logger;
this just completes the set.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3901043

14 years agoruntime/cgo: Add callbacks to support SWIG.
Ian Lance Taylor [Tue, 11 Jan 2011 17:36:44 +0000 (09:36 -0800)]
runtime/cgo: Add callbacks to support SWIG.

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

14 years agogodefs: better handling of enums
Russ Cox [Tue, 11 Jan 2011 16:12:15 +0000 (11:12 -0500)]
godefs: better handling of enums

Fixes #432.

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

14 years agocgo: export unsafe.Pointer as void*
Gustavo Niemeyer [Tue, 11 Jan 2011 16:12:06 +0000 (11:12 -0500)]
cgo: export unsafe.Pointer as void*

This will enable functions which use unsafe.Pointer as an argument
to be correctly exported by cgo.

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

14 years agocgo: output alignment fix
Gustavo Niemeyer [Tue, 11 Jan 2011 15:17:54 +0000 (10:17 -0500)]
cgo: output alignment fix

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

14 years agocgo: fix enum const conflict
Gustavo Niemeyer [Tue, 11 Jan 2011 15:15:49 +0000 (10:15 -0500)]
cgo: fix enum const conflict

This change prevents enum consts from conflicting with themselves
when loaded twice in different go files.

Fixes #1400.

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

14 years agogodoc: support for regular expression full text search
Robert Griesemer [Mon, 10 Jan 2011 23:34:29 +0000 (15:34 -0800)]
godoc: support for regular expression full text search

Regular expressions may now be used in conjuction with full text
search. Godoc will show the first 10000 occurences in the source
code and highlight the respective text segments.

- added new flag -testDir to specify a small directory for testing
  (fast index creation; default = "")

- use new FormatText function to format text and Go source
  code in HTML, supporting multiple kinds of text selections
  simulatenously); this replaces the uses of go/printer
  Stylers

- for now removed currently unused mechanism for identifier-
  specific JS popups (will come back in some form once we
  have type or other useful information)

- various typo fixes and minor cleanups throughout

Missing:
- indexing of non-.go files

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

14 years agogo spec: remove Maxalign from spec
Robert Griesemer [Mon, 10 Jan 2011 22:25:17 +0000 (14:25 -0800)]
go spec: remove Maxalign from spec

Fixes #1285.

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

14 years agoarm optimizer bug fixes
Ken Thompson [Mon, 10 Jan 2011 21:15:52 +0000 (13:15 -0800)]
arm optimizer bug fixes

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

14 years agotime: add AfterFunc to call a function after a given duration.
Roger Peppe [Mon, 10 Jan 2011 19:51:38 +0000 (11:51 -0800)]
time: add AfterFunc to call a function after a given duration.
The After code is trivially generalisable to provide support
for this, and it is possible to use AfterFunc to do
things that After cannot, such as waiting
for many events at varied times without an overhead
of one goroutine per event.

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

14 years agogo/ast: correct end position for Index and TypeAssert expressions
Robert Griesemer [Mon, 10 Jan 2011 19:26:04 +0000 (11:26 -0800)]
go/ast: correct end position for Index and TypeAssert expressions

- added position information for [ and ] brackets of Index and Slice expression nodes
- removed a TODO in go/printer

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

14 years agobytes: fix TrimSpace typo
Peter Mundy [Sun, 9 Jan 2011 17:11:16 +0000 (12:11 -0500)]
bytes: fix TrimSpace typo

Fixes #1401.

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

14 years agotime: fix tick accuracy when using multiple Tickers
Eoghan Sherry [Sun, 9 Jan 2011 05:24:44 +0000 (21:24 -0800)]
time: fix tick accuracy when using multiple Tickers

* correctly ignore obsolete ticks
* fix update of next alarm time
* tighten alarm channel buffers
Fixes #1379.

R=r, adg, r2
CC=golang-dev, soul9
https://golang.org/cl/3789045

14 years agodoc: contribution copyright year 2011
Peter Mundy [Sun, 9 Jan 2011 01:17:15 +0000 (17:17 -0800)]
doc: contribution copyright year 2011

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

14 years agoruntime: Restore scheduler stack position if cgo callback panics.
Ian Lance Taylor [Sat, 8 Jan 2011 18:22:37 +0000 (10:22 -0800)]
runtime: Restore scheduler stack position if cgo callback panics.

If we don't do this, then when C code calls back to Go code
which panics, we lose space on the scheduler stack.  If that
happens a lot, eventually there is no space left on the
scheduler stack.

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

14 years agoencoding/line: add
Adam Langley [Sat, 8 Jan 2011 15:29:37 +0000 (10:29 -0500)]
encoding/line: add

I needed a way to read lines without worrying about \n and \r\n.

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

14 years agoadd peep
Ken Thompson [Sat, 8 Jan 2011 02:20:26 +0000 (18:20 -0800)]
add peep

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

14 years agoinitial cut at arm optimizer
Ken Thompson [Sat, 8 Jan 2011 02:04:48 +0000 (18:04 -0800)]
initial cut at arm optimizer

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

14 years agoarm: fix build
Rob Pike [Sat, 8 Jan 2011 01:17:42 +0000 (17:17 -0800)]
arm: fix build
previous version was built with -l32; should be -b32

R=ken
CC=golang-dev
https://golang.org/cl/3867044

14 years agogofmt: don't attempt certain illegal rewrites
Robert Griesemer [Fri, 7 Jan 2011 23:04:41 +0000 (15:04 -0800)]
gofmt: don't attempt certain illegal rewrites

(e.g.: echo 'package main' | gofmt -r 'x->7'
cannot change the package name to 7)

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

14 years agotime.NewTicker: panic for intervals <= 0.
Rob Pike [Fri, 7 Jan 2011 22:41:46 +0000 (14:41 -0800)]
time.NewTicker: panic for intervals <= 0.
Not absolutely certain it's right to do this, but since there's
no error value coming back, it seems reasonable.

Fixes #1392.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3896042

14 years agobytes.Buffer: Fix bug in UnreadByte.
Rob Pike [Fri, 7 Jan 2011 22:41:33 +0000 (14:41 -0800)]
bytes.Buffer: Fix bug in UnreadByte.
Error check was inverted.

Fixes #1396.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3851042

14 years agogofmt: rewriter matches apply to expressions only
Robert Griesemer [Fri, 7 Jan 2011 21:33:29 +0000 (13:33 -0800)]
gofmt: rewriter matches apply to expressions only

Fixes #1384.

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

14 years agocrypto/block: mark as deprecated.
Adam Langley [Fri, 7 Jan 2011 21:17:47 +0000 (16:17 -0500)]
crypto/block: mark as deprecated.

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

14 years agotag release.2011-01-06
Andrew Gerrand [Fri, 7 Jan 2011 04:33:00 +0000 (15:33 +1100)]
tag release.2011-01-06

R=nigeltao, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3892041

14 years agorelease.2011-01-06 weekly.2011-01-06
Andrew Gerrand [Fri, 7 Jan 2011 04:28:25 +0000 (15:28 +1100)]
release.2011-01-06

R=nigeltao, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3829043

14 years agold: Permit an ELF symbol to be exported in the dynamic symbol table.
Ian Lance Taylor [Fri, 7 Jan 2011 00:37:05 +0000 (16:37 -0800)]
ld: Permit an ELF symbol to be exported in the dynamic symbol table.

This permits exporting crosscall2 from the runtime/cgo
package.

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

14 years agodoc: add golanguage.ru to foreign-language doc list
Andrew Gerrand [Thu, 6 Jan 2011 22:34:13 +0000 (09:34 +1100)]
doc: add golanguage.ru to foreign-language doc list

R=r, brainman, r2
CC=golang-dev
https://golang.org/cl/3881041

14 years agocgo: disallow use of C.errno
Russ Cox [Thu, 6 Jan 2011 20:15:31 +0000 (15:15 -0500)]
cgo: disallow use of C.errno

It's incorrect, and it causes cryptic linker errors.

Fixes #1360.

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

14 years agoMake.pkg: use installed runtime.h for cgo
Russ Cox [Thu, 6 Jan 2011 20:15:22 +0000 (15:15 -0500)]
Make.pkg: use installed runtime.h for cgo

Fixes #1381.

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

14 years agoruntime/cgo: fix stackguard on FreeBSD/amd64
Anthony Martin [Thu, 6 Jan 2011 16:36:47 +0000 (11:36 -0500)]
runtime/cgo: fix stackguard on FreeBSD/amd64

A cursory reading of the cgo code suggests this
should be necessary, though I don't have access
to a FreeBSD machine for testing.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3746047

14 years agogc: fix &^=
Russ Cox [Thu, 6 Jan 2011 16:21:18 +0000 (11:21 -0500)]
gc: fix &^=

Fixes #1394.

R=ken2
CC=golang-dev
https://golang.org/cl/3879041

14 years agocrypto/cipher: make NewCBCEncrypter return BlockMode
Russ Cox [Thu, 6 Jan 2011 16:21:04 +0000 (11:21 -0500)]
crypto/cipher: make NewCBCEncrypter return BlockMode

Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043

14 years agoMade format string handling more efficient.
Kyle Consalus [Wed, 5 Jan 2011 19:42:35 +0000 (11:42 -0800)]
Made format string handling more efficient.

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

14 years agoeffective go: explain the effect of repanicking better.
Rob Pike [Wed, 5 Jan 2011 19:39:57 +0000 (11:39 -0800)]
effective go: explain the effect of repanicking better.
Also fix a <p> error in go_spec.html.

Fixes #1370.

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

14 years agoio: fix Copyn EOF handling
Russ Cox [Wed, 5 Jan 2011 19:35:13 +0000 (14:35 -0500)]
io: fix Copyn EOF handling

Fixes #1383.

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

14 years agosyscall: correct Linux Splice definition
Russ Cox [Wed, 5 Jan 2011 19:35:07 +0000 (14:35 -0500)]
syscall: correct Linux Splice definition

Fixes #1376.

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

14 years agogoinstall: add -clean flag
Kyle Lemons [Wed, 5 Jan 2011 19:34:59 +0000 (14:34 -0500)]
goinstall: add -clean flag

R=adg, rsc
CC=golang-dev
https://golang.org/cl/3821042

14 years agoA+C: Kyle Lemons (individual CLA)
Russ Cox [Wed, 5 Jan 2011 19:34:45 +0000 (14:34 -0500)]
A+C: Kyle Lemons (individual CLA)

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

14 years agogc: return constant floats for parts of complex constants
Anthony Martin [Wed, 5 Jan 2011 18:12:30 +0000 (13:12 -0500)]
gc: return constant floats for parts of complex constants

Fixes #1369.

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