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

14 years agofmt: normalize processing of format string
Rob Pike [Wed, 5 Jan 2011 18:11:34 +0000 (10:11 -0800)]
fmt: normalize processing of format string
The old loop was a bit odd; change it to be more regular.
This also enables a diagnostic for Printf("%", 3): %!(NOVERB)

R=rsc, Kyle C
CC=golang-dev
https://golang.org/cl/3749044

14 years agohttp: permit empty Reason-Phrase in response Status-Line
Brad Fitzpatrick [Wed, 5 Jan 2011 18:09:38 +0000 (13:09 -0500)]
http: permit empty Reason-Phrase in response Status-Line

Fixes #1388.

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

14 years agogo/ast: correct Pos/End ranges for field lists
Robert Griesemer [Wed, 5 Jan 2011 18:08:39 +0000 (10:08 -0800)]
go/ast: correct Pos/End ranges for field lists

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

14 years agogob: generate a better error message in one confusing place
Rob Pike [Wed, 5 Jan 2011 17:28:47 +0000 (09:28 -0800)]
gob: generate a better error message in one confusing place
(with maybe more to come) by printing a human-readable
representation of a remote type.

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

14 years agosyscall: Make Access second argument consistently uint32.
Ian Lance Taylor [Wed, 5 Jan 2011 06:28:31 +0000 (22:28 -0800)]
syscall: Make Access second argument consistently uint32.

Fixes #1377.

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

14 years agodoc: update contribution guidelines to prefix the change description
Nigel Tao [Wed, 5 Jan 2011 02:00:08 +0000 (13:00 +1100)]
doc: update contribution guidelines to prefix the change description
with the primary affected package.

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

14 years agostrings: fix description of FieldsFunc
Roger Peppe [Wed, 5 Jan 2011 00:23:29 +0000 (16:23 -0800)]
strings: fix description of FieldsFunc

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

14 years agofix occurrences of occur[^sr .,?!;\n]
Robert Griesemer [Tue, 4 Jan 2011 21:16:50 +0000 (13:16 -0800)]
fix occurrences of occur[^sr .,?!;\n]

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

14 years agoThe Dec 06 change
Icarus Sparry [Tue, 4 Jan 2011 21:16:29 +0000 (13:16 -0800)]
The Dec 06 change
changeset:   6839:545c9926d61a
user:        Robert Griesemer <gri@golang.org>
date:        Mon Dec 06 14:23:18 2010 -0800
summary:     go/ast: use token.Pos instead of token.Position; adjust all dependent code
broke 'godoc -src fmt', one of the example uses of godoc. It gives a stack backtrace essentially
caused by dereferencing a NULL pointer (in C terms). This change fixes the particular issue, but
the code probably should be made more robust.
Fixes #3818044.

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

14 years agoregexp: implement early out for failed anchored search.
Rob Pike [Tue, 4 Jan 2011 20:43:52 +0000 (12:43 -0800)]
regexp: implement early out for failed anchored search.

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

14 years agoencoding/binary: reject types with implementation-dependent sizes
Patrick Gavlin [Tue, 4 Jan 2011 18:42:50 +0000 (13:42 -0500)]
encoding/binary: reject types with implementation-dependent sizes

Fixes #1201.

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

14 years agomerge tree
Russ Cox [Tue, 4 Jan 2011 18:40:41 +0000 (13:40 -0500)]
merge tree

14 years agogc: rewrite complex /= to l = l / r.
Patrick Gavlin [Tue, 4 Jan 2011 18:14:17 +0000 (13:14 -0500)]
gc: rewrite complex /= to l = l / r.

Fixes #1368.

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

14 years agogo/ast: provide complete node text range info
Robert Griesemer [Tue, 4 Jan 2011 18:14:16 +0000 (10:14 -0800)]
go/ast: provide complete node text range info

- add End() method to all nodes; the text range of a node n is [n.Pos(), n.End())
- various small bug fixes in the process
- fixed several comments

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

14 years agostrconv: update ftoa comment for 'E' and 'G'
Russ Cox [Tue, 4 Jan 2011 18:13:12 +0000 (13:13 -0500)]
strconv: update ftoa comment for 'E' and 'G'

Inspired by 3827042.

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

14 years agoA+C: Patrick Gavlin (individual CLA)
Russ Cox [Tue, 4 Jan 2011 18:07:00 +0000 (13:07 -0500)]
A+C: Patrick Gavlin (individual CLA)

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

14 years agonet: fix close of Listener
Michael Hoisie [Tue, 4 Jan 2011 16:55:13 +0000 (11:55 -0500)]
net: fix close of Listener

Fixes #1375.

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

14 years agodoc: update Effective Go for template API change.
Nigel Tao [Tue, 4 Jan 2011 04:52:03 +0000 (15:52 +1100)]
doc: update Effective Go for template API change.

The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.

R=adg
CC=golang-dev
https://golang.org/cl/3862041

14 years agogoinstall: fix -u for bzr
Gustavo Niemeyer [Tue, 4 Jan 2011 03:22:18 +0000 (14:22 +1100)]
goinstall: fix -u for bzr

Changeset 7012:65601d7cac9e broke goinstall -u for bzr
branches.  This will fix it.

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

14 years agogobuilder: prefix the tarball with 'go.', tweak release regexp
Andrew Gerrand [Tue, 4 Jan 2011 02:16:38 +0000 (13:16 +1100)]
gobuilder: prefix the tarball with 'go.', tweak release regexp

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

14 years agoregexp: fix prefix bug.
Rob Pike [Mon, 3 Jan 2011 19:35:34 +0000 (11:35 -0800)]
regexp: fix prefix bug.
After a prefix match, the old code advanced the length of the
prefix.  This is incorrect since the full match might begin
in the middle of the prefix. (Consider "aaaab+" matching
"aaaaaab").

Fixes #1373

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

14 years agoregexp: fix performance bug, make anchored searches fail fast.
Rob Pike [Mon, 3 Jan 2011 19:31:51 +0000 (11:31 -0800)]
regexp: fix performance bug, make anchored searches fail fast.

The bug was that for an anchored pattern such as ^x, the prefix
scan ignored the anchor, and could scan the whole file if there was
no x present.  The fix is to do prefix matching after the anchor;
the cost miniscule; the speedups huge.

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

14 years agoFix documentation typo.
Anschel Schaffer-Cohen [Thu, 30 Dec 2010 23:37:55 +0000 (10:37 +1100)]
Fix documentation typo.
This is really insignificant, but it might as well be fixed.

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

14 years agoatof: added 'E' as valid token for exponent
Stefan Nilsson [Mon, 27 Dec 2010 18:12:10 +0000 (10:12 -0800)]
atof: added 'E' as valid token for exponent

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

14 years agosimple fix to not have 'exp/eval' panic in presence of slices like s[:2]
Sebastien Binet [Mon, 27 Dec 2010 18:05:32 +0000 (10:05 -0800)]
simple fix to not have 'exp/eval' panic in presence of slices like s[:2]

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

14 years agocrypto/cipher: fix OCFB
Adam Langley [Mon, 27 Dec 2010 17:55:49 +0000 (12:55 -0500)]
crypto/cipher: fix OCFB

I messed up when reading the OCFB spec.

TBR=rsc

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

14 years agogoinstall/download.go: Add checkout concept and helper functions to clean and fix...
Caine Tighe [Fri, 24 Dec 2010 00:48:45 +0000 (11:48 +1100)]
goinstall/download.go: Add checkout concept and helper functions to clean and fix implementation (Issue 1265)

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

14 years agoA+C: Caine Tighe
Andrew Gerrand [Thu, 23 Dec 2010 22:24:33 +0000 (09:24 +1100)]
A+C: Caine Tighe

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

14 years ago6l: fix documentation of -L flag
Andrew Gerrand [Thu, 23 Dec 2010 22:04:53 +0000 (09:04 +1100)]
6l: fix documentation of -L flag

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

14 years agotag release.2010-12-22
Andrew Gerrand [Thu, 23 Dec 2010 02:33:40 +0000 (13:33 +1100)]
tag release.2010-12-22

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

14 years agorelease.2010-12-22 weekly.2010-12-22
Andrew Gerrand [Thu, 23 Dec 2010 02:32:20 +0000 (13:32 +1100)]
release.2010-12-22

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

14 years agotesting: fix error message on invalid regexp
Eoghan Sherry [Thu, 23 Dec 2010 00:40:10 +0000 (11:40 +1100)]
testing: fix error message on invalid regexp

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

14 years agohash/crc64: fix typo in Sum.
Nigel Tao [Tue, 21 Dec 2010 23:28:22 +0000 (10:28 +1100)]
hash/crc64: fix typo in Sum.

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

14 years agobufio: removed dead code
Stefan Nilsson [Tue, 21 Dec 2010 21:43:35 +0000 (08:43 +1100)]
bufio: removed dead code

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

14 years agotemplate: fix trivial bug: integers are not "empty"
Rob Pike [Mon, 20 Dec 2010 21:36:47 +0000 (13:36 -0800)]
template: fix trivial bug: integers are not "empty"
Fixes #1357.

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

14 years agoexpvar: quote StringFunc output, same as String output.
David Symonds [Mon, 20 Dec 2010 06:35:21 +0000 (17:35 +1100)]
expvar: quote StringFunc output, same as String output.

R=adg
CC=golang-dev
https://golang.org/cl/3797041

14 years agosuffixarray: implememted FindAllIndex regexp search
Robert Griesemer [Fri, 17 Dec 2010 22:00:46 +0000 (14:00 -0800)]
suffixarray: implememted FindAllIndex regexp search

Implementation uses fast suffixarray lookup to find
initial matches if the regular expression starts with
a suitable prefix without meta characters.

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

14 years agogo/scanner: interpret filenames in //line filename:line comments
Robert Griesemer [Fri, 17 Dec 2010 21:54:37 +0000 (13:54 -0800)]
go/scanner: interpret filenames in //line filename:line comments
    relative to the source file directory

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

14 years agotls: fix argument mistake in Error call.
Rob Pike [Fri, 17 Dec 2010 21:47:52 +0000 (13:47 -0800)]
tls: fix argument mistake in Error call.

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

14 years agojson: fix Fatal call in test
Rob Pike [Fri, 17 Dec 2010 21:43:59 +0000 (13:43 -0800)]
json: fix Fatal call in test

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

14 years agofix cgo build
Russ Cox [Fri, 17 Dec 2010 21:22:20 +0000 (13:22 -0800)]
fix cgo build

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

14 years agocgo: handle references to symbols in shared libraries
Russ Cox [Fri, 17 Dec 2010 19:37:11 +0000 (11:37 -0800)]
cgo: handle references to symbols in shared libraries

Fixes #1334.

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

14 years agoregexp: change Expr() to String(); add HasOperator method to Regexp.
Rob Pike [Fri, 17 Dec 2010 18:23:46 +0000 (10:23 -0800)]
regexp: change Expr() to String(); add HasOperator method to Regexp.
It reports whether a regular expression has operators
as opposed to matching literal text.

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

14 years agold: ignore stab symbols
Russ Cox [Fri, 17 Dec 2010 18:03:43 +0000 (10:03 -0800)]
ld: ignore stab symbols

Makes 6l work better on OS X 10.5.

Fixes #1352.
Fixes #1353.

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

14 years agold: allow relocations pointing at ELF .bss symbols
Russ Cox [Fri, 17 Dec 2010 17:53:50 +0000 (09:53 -0800)]
ld: allow relocations pointing at ELF .bss symbols

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

14 years agomisc/cgo/life: fix, add to build
Russ Cox [Fri, 17 Dec 2010 17:51:55 +0000 (09:51 -0800)]
misc/cgo/life: fix, add to build

#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.

On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.

On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.

The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.

Also makes typedefs global across files.

Fixes #1335.
Fixes #1345.

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

14 years agocrypto/hmac: add HMAC-SHA256
Anthony Martin [Fri, 17 Dec 2010 17:19:37 +0000 (12:19 -0500)]
crypto/hmac: add HMAC-SHA256

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

14 years agoregexp: add HasMeta and regexp.Expr().
Rob Pike [Fri, 17 Dec 2010 00:55:26 +0000 (16:55 -0800)]
regexp: add HasMeta and regexp.Expr().
The former is a boolean function to test whether a string
contains a regular expression metacharacter; the second
returns the string used to compile the regexp.

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