1
0
mirror of https://github.com/golang/go synced 2024-10-03 16:31:27 -06:00
Commit Graph

2794 Commits

Author SHA1 Message Date
Rob Pike
02df7db868 replace custom findByte with bytes.IndexByte
R=rsc
https://golang.org/cl/156093
2009-11-18 19:58:32 -08:00
Adam Langley
bf1f63a273 big: fix large division.
I missed a case.

R=rsc, agl
CC=golang-dev
https://golang.org/cl/156092
2009-11-18 19:26:12 -08:00
Rob Pike
8c1a627e5c add bytes.IndexByte; common case we can make fast later.
also pick off the special case in strings.Index.   don't want strings.IndexByte
because the call site will very rarely need to allocate and we can handle the
test in the code itself.   bytes.IndexByte can avoid a common allocation.

R=rsc
CC=golang-dev
https://golang.org/cl/156091
2009-11-18 19:23:08 -08:00
Russ Cox
e1c5c3df77 runtime: fix bug on darwin/amd64 - bad g in bsdthread_start
R=r
https://golang.org/cl/157077
2009-11-18 18:17:11 -08:00
Devon H. O'Dell
60b1a17b9e More FreeBSD-touchups. Thundercats are GOOOOO!
R=rsc
CC=golang-dev
https://golang.org/cl/157074
2009-11-18 16:51:59 -08:00
Adam Langley
eac41e7eba crypto/x509: RawContents -> RawContent
TBR=rsc

R=rsc
https://golang.org/cl/157075
2009-11-18 16:38:30 -08:00
Adam Langley
3ab331ed29 asn1: add support for RawContent
R=rsc
CC=golang-dev
https://golang.org/cl/157056
2009-11-18 16:32:44 -08:00
Adam Langley
cc56fc3860 crypto/x509: add certificate support.
R=rsc
CC=golang-dev
https://golang.org/cl/156054
2009-11-18 16:08:24 -08:00
Russ Cox
dc43b74eb1 6l, 8l: add trivial hash table for dynamic symbols
R=r
https://golang.org/cl/156085
2009-11-18 15:58:44 -08:00
Rob Pike
e70cedfaec remove bytes.Copy
replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Rob Pike
093493c6a5 bugs in memmove:
- has arguments (no stack split)
	- MOVL does not set condition

R=ken2, rsc
https://golang.org/cl/156086
2009-11-18 15:00:02 -08:00
Russ Cox
9be56adf3c gc: allow implicit conversion of *[10]int -> []int
when used as arg to copy.

R=ken2
https://golang.org/cl/157071
2009-11-18 14:26:28 -08:00
Russ Cox
91cf0af181 ld: move interpreter string into first block of ELF file
necessary on freebsd.

R=r, dho
CC=golang-dev
https://golang.org/cl/157069
2009-11-18 13:51:05 -08:00
Rob Pike
7518613430 slicecopy was always using 16 (sizeof slice) for the size instead of size of element.
R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083
2009-11-18 13:43:48 -08:00
Adam Langley
ef8f483c60 net: remove race condition on Close.
Previously a netFd could be queued for reading/writing in the channel,
but close(2)'ed before pollServer got to it. In this case, the kernel
would consider the descriptor closed and the attempt to add it to the
epoll set would fail and panic.

This patch makes Close a roundtrip to the pollServer, although the
actual close(2) still occurs elsewhere to avoid blocking the
pollServer.

Fixes #143.

R=rsc
CC=golang-dev
https://golang.org/cl/152130
2009-11-18 13:18:34 -08:00
Eden Li
652bb7c2be Mangle C struct fields that happen to be named after Go keywords by prefixing them with _. Collisions with existing fields are resolved by prefixing the new Go identifier with _ until it matches nothing else in the struct.
Fixes #36.

R=rsc
https://golang.org/cl/157061
2009-11-18 09:59:10 -08:00
Russ Cox
a274099340 big: implement 386 assembly routines
7x speedup on big and crypto/rsa unit tests.
also dropped useAsm in favor of making the
asm stubs jump to the Go versions.

R=agl1
CC=golang-dev, gri
https://golang.org/cl/157062
2009-11-18 09:54:51 -08:00
William Josephson
4c0f262a2d Remove unnecessary execute bits.
R=rsc
https://golang.org/cl/156077
2009-11-18 09:19:29 -08:00
William Josephson
72e7444ad4 Missing flags for FreeBSD shared link as used by cgo in default build.
R=rsc
https://golang.org/cl/157065
2009-11-18 09:18:51 -08:00
Devon H. O'Dell
659780b643 Add an intptr type to runtime; needed in FreeBSD
In thread.c, we need to cast to whatever the native
size of intptr is on the system, but we only have
uintptr available. They're the same size, but can't
do signed casts without this one :).

R=rsc
CC=golang-dev
https://golang.org/cl/156073
2009-11-18 09:11:39 -08:00
Devon H. O'Dell
b3f538a4fd FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.

R=rsc
https://golang.org/cl/157055
2009-11-17 23:58:51 -08:00
Eden Li
2115f514d0 cgo no longer translates function args that are void* into
unsafe.Pointer.
Fixes #254.

R=rsc
https://golang.org/cl/157060
2009-11-17 23:42:21 -08:00
Russ Cox
744d5ae48a runtime: add ARM memmove
R=ken2
https://golang.org/cl/156063
2009-11-17 22:54:20 -08:00
Russ Cox
ed0beea27b copy tweaks
* move memmove to arch-specific subdirectories
  * add memmove for arm
  * add copyright notices marking them as copied from Inferno

R=ken2
https://golang.org/cl/156061
2009-11-17 22:16:55 -08:00
Rob Pike
ea5cc6c021 add a test for %+v in nested structures.
threw in an embedded one for good measure.

R=rsc
CC=golang-dev
https://golang.org/cl/157058
2009-11-17 22:14:34 -08:00
Ken Thompson
01c2de0c15 allow copy to be used without a return value
R=rsc
https://golang.org/cl/156060
2009-11-17 22:00:59 -08:00
Russ Cox
41554e2528 runtime: two trivial but important bug fixes
R=r
https://golang.org/cl/156059
2009-11-17 22:00:30 -08:00
Ken Thompson
948f3e77e1 bug in copy
R=rsc
https://golang.org/cl/156056
2009-11-17 20:44:35 -08:00
Ken Thompson
c4606d05da install copy predefined
did not test 386, but should work
shouldnt matter if copy is not used

R=rsc
https://golang.org/cl/156055
2009-11-17 20:41:44 -08:00
Adam Langley
a8ba40823c crypto/rsa: add PKCS#1 v1.5 signature support.
R=rsc
CC=golang-dev
https://golang.org/cl/156051
2009-11-17 18:21:47 -08:00
Adam Langley
80b7f6a8d4 asn1:
* add Marshal
  * add BitString.RightAlign
  * change to using a *time.Time (from time.Time) since that's what
    the time package uses.
  * return the unparsed data from Unmarshal.

R=rsc
CC=golang-dev
https://golang.org/cl/156047
2009-11-17 18:09:41 -08:00
Russ Cox
1dbd3c8d3d reflect: document that PkgPath and Name return
empty string for unnamed types.

Fixes #249.

R=r
https://golang.org/cl/156052
2009-11-17 16:03:14 -08:00
Russ Cox
849e6f99b8 http: do not crash accessing r.Form if ParseForm fails
Fixes #233.

R=dsymonds1
https://golang.org/cl/154179
2009-11-17 14:45:10 -08:00
Russ Cox
4dfd7fdde5 runtime: do not create new threads during malloc.
the signal handling stack is a different size than
	the normal stack, so it cannot be allocated using
	the backup stack allocator.

Fixes #250.

R=agl1
CC=golang-dev
https://golang.org/cl/157044
2009-11-17 14:42:08 -08:00
Ken Thompson
26b55e44d9 fix botch
R=rsc
https://golang.org/cl/157046
2009-11-17 14:11:50 -08:00
Ken Thompson
8a6da2f6a0 change a n^2 algorithm in
data initialization to n*log(n)

R=rsc
https://golang.org/cl/158041
2009-11-17 13:59:38 -08:00
Rob Pike
6240b0110a improve documentation of runtime. there was no mention of types.
R=rsc
CC=golang-dev
https://golang.org/cl/157042
2009-11-17 11:44:15 -08:00
Aron Nopanen
c51ee432d1 Make non-errored RPC calls return 'nil' error to caller.
Error information is carried from RPC server to client in the string
'Error' field of rpc.Response. An empty string is sent in the success
case. This empty string was being returned to the caller (of Client.Call
or Client.Go), resulting in a non-nil error response.

This change detects an empty-string Response.Error at the client, and
translates it into a nil value in Call.Error.

Tests updated to check error return in success cases.

R=r, rsc
https://golang.org/cl/154159
2009-11-17 11:29:02 -08:00
Sergio Luis O. B. Correia
bae4f5085e cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.

Will be needed for solving issue 115.

R=agl1, rsc, iant2, r
https://golang.org/cl/155059
2009-11-17 09:02:47 -08:00
Russ Cox
b4586a7429 math: fix argument names in Atan2
(error introduced converting from arg1, arg2)

Fixes #220.

R=r
https://golang.org/cl/156041
2009-11-17 08:39:56 -08:00
Russ Cox
c0e1ccf3ff Make.pkg: have "make coverage" invoke 6cov with correct binary
Fixes #239.

R=r
https://golang.org/cl/154176
2009-11-17 08:39:26 -08:00
Russ Cox
6e788e0f0f net: enforce timeouts for ReadFrom/WriteTo
Fixes #153.

R=r
https://golang.org/cl/154177
2009-11-17 08:39:17 -08:00
Russ Cox
a65bf95dd8 syscall: use correct pointer in recvfrom/sendto.
linux/386 stack trace: use 32-bit hex.

Fixes #159.

R=r
https://golang.org/cl/154178
2009-11-17 08:39:04 -08:00
Devon H. O'Dell
0489a260da FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)

R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
2009-11-17 08:20:58 -08:00
Rob Pike
30b1b9a36a Rework gobs to fix bad bug related to sharing of id's between encoder and decoder side.
Fix is to move all decoder state into the decoder object.

Fixes #215.

R=rsc
CC=golang-dev
https://golang.org/cl/155077
2009-11-16 23:32:30 -08:00
Rob Pike
50c04132ac fix bug causing empty strings to be become non-nil errors on client side of rpc connection.
R=rsc
CC=golang-dev
https://golang.org/cl/155078
2009-11-16 23:32:16 -08:00
Russ Cox
597b2a91a6 runtime: make signal handler work on 386
R=r
https://golang.org/cl/154171
2009-11-16 17:51:47 -08:00
Russ Cox
1ee83f851d gc: change "can we const evaluate this" from blacklist to whitelist
R=ken2
https://golang.org/cl/155074
2009-11-16 17:40:47 -08:00
Russ Cox
44e51fad28 6l: fix divide by zero in glibc linker.
repeats 8l change http://code.google.com/p/go/source/detail?r=7594e16b5cf9

Fixes #179.

R=iant
https://golang.org/cl/154145
2009-11-16 17:40:03 -08:00
Adam Langley
1cdfe9fa28 unsafe: documentation typo.
Fixes #236.

R=r
CC=golang-dev
https://golang.org/cl/155072
2009-11-16 15:39:04 -08:00