1
0
mirror of https://github.com/golang/go synced 2024-10-03 23:21:22 -06:00
Commit Graph

5022 Commits

Author SHA1 Message Date
Gustavo Niemeyer
9f178edf51 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
2011-01-11 11:12:06 -05:00
Gustavo Niemeyer
632be89407 cgo: output alignment fix
R=rsc
CC=golang-dev
https://golang.org/cl/3902044
2011-01-11 10:17:54 -05:00
Gustavo Niemeyer
02ff646fef 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
2011-01-11 10:15:49 -05:00
Robert Griesemer
4bdaf59cc9 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
2011-01-10 15:34:29 -08:00
Ken Thompson
ab4d8bf16c arm optimizer bug fixes
R=rsc
CC=golang-dev
https://golang.org/cl/3913043
2011-01-10 13:15:52 -08:00
Roger Peppe
212e074be2 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
2011-01-10 11:51:38 -08:00
Robert Griesemer
23410ced69 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
2011-01-10 11:26:04 -08:00
Peter Mundy
2b0a276129 bytes: fix TrimSpace typo
Fixes #1401.

R=golang-dev, agl1
CC=golang-dev
https://golang.org/cl/3937041
2011-01-09 12:11:16 -05:00
Eoghan Sherry
0c02bd1801 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
2011-01-08 21:24:44 -08:00
Ian Lance Taylor
2d39303429 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
2011-01-08 10:22:37 -08:00
Adam Langley
66a45b486b 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
2011-01-08 10:29:37 -05:00
Ken Thompson
4ed17ceace add peep
R=rsc
CC=golang-dev
https://golang.org/cl/3902042
2011-01-07 18:20:26 -08:00
Ken Thompson
90ca4d75a4 initial cut at arm optimizer
R=rsc
CC=golang-dev
https://golang.org/cl/3921041
2011-01-07 18:04:48 -08:00
Rob Pike
80055c658b arm: fix build
previous version was built with -l32; should be -b32

R=ken
CC=golang-dev
https://golang.org/cl/3867044
2011-01-07 17:17:42 -08:00
Robert Griesemer
a6820b65cb 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
2011-01-07 15:04:41 -08:00
Rob Pike
f383062e01 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
2011-01-07 14:41:46 -08:00
Rob Pike
353fd1014c bytes.Buffer: Fix bug in UnreadByte.
Error check was inverted.

Fixes #1396.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3851042
2011-01-07 14:41:33 -08:00
Robert Griesemer
9d634e50c7 gofmt: rewriter matches apply to expressions only
Fixes #1384.

R=rsc
CC=golang-dev
https://golang.org/cl/3912041
2011-01-07 13:33:29 -08:00
Adam Langley
ee58cc799e crypto/block: mark as deprecated.
R=rsc
CC=golang-dev
https://golang.org/cl/3909041
2011-01-07 16:17:47 -05:00
Ian Lance Taylor
1b2d5b4c93 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
2011-01-06 16:37:05 -08:00
Russ Cox
02327a72d7 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
2011-01-06 15:15:31 -05:00
Russ Cox
c1fbe589a9 Make.pkg: use installed runtime.h for cgo
Fixes #1381.

R=r, r2
CC=golang-dev
https://golang.org/cl/3775050
2011-01-06 15:15:22 -05:00
Anthony Martin
db89e19d26 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
2011-01-06 11:36:47 -05:00
Russ Cox
2281ca169c gc: fix &^=
Fixes #1394.

R=ken2
CC=golang-dev
https://golang.org/cl/3879041
2011-01-06 11:21:18 -05:00
Russ Cox
a46102d209 crypto/cipher: make NewCBCEncrypter return BlockMode
Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043
2011-01-06 11:21:04 -05:00
Kyle Consalus
754f0402c3 Made format string handling more efficient.
R=rsc, r, r2
CC=golang-dev
https://golang.org/cl/3421042
2011-01-05 11:42:35 -08:00
Russ Cox
0f26608ebc io: fix Copyn EOF handling
Fixes #1383.

R=r
CC=golang-dev
https://golang.org/cl/3821044
2011-01-05 14:35:13 -05:00
Russ Cox
189d4ff776 syscall: correct Linux Splice definition
Fixes #1376.

R=r
CC=golang-dev
https://golang.org/cl/3869042
2011-01-05 14:35:07 -05:00
Kyle Lemons
ddc2710d69 goinstall: add -clean flag
R=adg, rsc
CC=golang-dev
https://golang.org/cl/3821042
2011-01-05 14:34:59 -05:00
Anthony Martin
94df1a067c gc: return constant floats for parts of complex constants
Fixes #1369.

R=rsc
CC=golang-dev
https://golang.org/cl/3731046
2011-01-05 13:12:30 -05:00
Rob Pike
c0332fc93f 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
2011-01-05 10:11:34 -08:00
Brad Fitzpatrick
d71d08af5a http: permit empty Reason-Phrase in response Status-Line
Fixes #1388.

R=rsc
CC=golang-dev
https://golang.org/cl/3749043
2011-01-05 13:09:38 -05:00
Robert Griesemer
4a7d1f2061 go/ast: correct Pos/End ranges for field lists
R=rsc
CC=golang-dev
https://golang.org/cl/3797045
2011-01-05 10:08:39 -08:00
Rob Pike
d84317ba58 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
2011-01-05 09:28:47 -08:00
Ian Lance Taylor
e9c4f09985 syscall: Make Access second argument consistently uint32.
Fixes #1377.

R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/3868041
2011-01-04 22:28:31 -08:00
Roger Peppe
2f5a5be237 strings: fix description of FieldsFunc
R=r
CC=golang-dev
https://golang.org/cl/3814041
2011-01-04 16:23:29 -08:00
Robert Griesemer
8184778abf fix occurrences of occur[^sr .,?!;\n]
R=r, r2
CC=golang-dev
https://golang.org/cl/3794043
2011-01-04 13:16:50 -08:00
Rob Pike
6a5a527173 regexp: implement early out for failed anchored search.
R=rsc
CC=golang-dev
https://golang.org/cl/3813045
2011-01-04 12:43:52 -08:00
Patrick Gavlin
236f9638b4 encoding/binary: reject types with implementation-dependent sizes
Fixes #1201.

R=rsc
CC=golang-dev
https://golang.org/cl/3787044
2011-01-04 13:42:50 -05:00
Russ Cox
3cd10e3a0d merge tree 2011-01-04 13:40:41 -05:00
Patrick Gavlin
4e5a59591b gc: rewrite complex /= to l = l / r.
Fixes #1368.

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3811042
2011-01-04 13:14:17 -05:00
Robert Griesemer
9214016b3d 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
2011-01-04 10:14:16 -08:00
Russ Cox
71793d4b42 strconv: update ftoa comment for 'E' and 'G'
Inspired by 3827042.

R=gri, peterGo
CC=golang-dev
https://golang.org/cl/3858042
2011-01-04 13:13:12 -05:00
Michael Hoisie
ed1cbca81f net: fix close of Listener
Fixes #1375.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3731048
2011-01-04 11:55:13 -05:00
Gustavo Niemeyer
5530bf90cd 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
2011-01-04 14:22:18 +11:00
Rob Pike
15cb7ed34f 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
2011-01-03 11:35:34 -08:00
Rob Pike
c0d0d4ef05 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
2011-01-03 11:31:51 -08:00
Anschel Schaffer-Cohen
84fc1e20f1 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
2010-12-31 10:37:55 +11:00
Stefan Nilsson
834fda37c5 atof: added 'E' as valid token for exponent
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3827042
2010-12-27 10:12:10 -08:00
Sebastien Binet
33145c4868 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
2010-12-27 10:05:32 -08:00