this is the exact same thing issue #115 is about. fix makefiles to use relative
path to work in the case we have whitespaces as part of GOROOT.
R=rsc
https://golang.org/cl/162055
Ideally, the C name would come from the typedef or pointer that
references the Size<0 type, but we can't easily generate this without
performing a look-ahead to see if any referencing type will become opaque.
Fixes#334.
Fixes#281.
R=rsc
https://golang.org/cl/161056
This provides an experimental X11 backend for the exp/draw interface.
It does not aim to provide a complete implementation of the X11 client protocol.
This works for me (Ubuntu Hardy 8.04, GOARCH=386). Your mileage my vary.
R=r, rsc, r1
CC=golang-dev
https://golang.org/cl/156109
before this change, if pkg/Make.deps is missing or broken, clean.bash fails and the build dies
but not until much later.
add freebsd to error message about valid values of $GOOS
TODO: would be nice if this process exited when an error occurred. subshells make it hard
R=rsc
CC=golang-dev
https://golang.org/cl/160065
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.
this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.
Fixes#115.
R=rsc, dsymonds1
https://golang.org/cl/157067
getquoted() currently checks for whitespaces and returns nil
if it finds one. this prevents us from having go in a path
containing whitespaces, as the #pragma dynld directives are
processed through the said function.
this commit makes getquoted() accept whitespaces, and this is
also needed for solving issue #115.
R=rsc
https://golang.org/cl/157066
a little slow, but usable (speed unchanged when not using -r)
tweak go/printer to handle nodes without line numbers
more gracefully in a couple cases.
R=gri
https://golang.org/cl/156103
Meant as illustration of the Go pattern that is using
goroutines and channels to handle exceptional situations.
Note: There is no need for "Finally" since the
"try block" (the function f supplied to Try)
cannot do a Smalltalk-style non-local return
and terminate the function surrounding Try.
Replaces CL 157083.
R=r, rsc
https://golang.org/cl/157087
* add runtime sliceslice1 for x[lo:]
* remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
* port cgen_inline into 8g, 5g.
* use native memmove in maps
R=ken2
https://golang.org/cl/157106
Allows the developer to pass a map either by itself for
evaluation, or inside a struct. Access to data inside
maps is identical to the current system for structs, ie.
-Psuedocode-
mp map[string]string = {
"header" : "A fantastic header!",
"footer" : "A not-so-fantastic footer!",
}
template.Execute(mp)
...can be accessed using {header} and {footer} in
the template. Similarly, for maps inside structs:
type s struct {
mp map[string]string,
}
s1 = new s
s1.mp["header"] = "A fantastic header!";
template.Execute(s1)
...is accessed using {mp.header}. Multi-maps, ie.
map[string](map[string]string) and maps of structs
containing more maps are unsupported, but then, I'm
not even sure if that's supported by the language.
Map elements can be of any type that can be written
by the formatters. Keys should really only be strings.
Fixes#259.
R=r, rsc
https://golang.org/cl/157088
There's no functional change here. io gives the Read and Write methods byte slice arguments, but tar called them uint8. It's the same thing, but I think this is clearer and it matches what other packages do.
R=rsc
CC=golang-dev
https://golang.org/cl/157099
1) if char class contains a single character, make it a single character.
(this is used to quote, e.g. [.] rather than \.
2) if regexp begins with ordinary text substring, use plain string match to start engine
R=rsc
CC=golang-dev
https://golang.org/cl/157095
No benchmarks are run unless the --benchmarks=<regexp> flag
is specified on the gotest command line. This change includes
sample benchmarks for regexp.
% gotest --benchmarks=.*
(standard test output redacted)
testing.BenchmarkSimpleMatch 200000 7799 ns/op
testing.BenchmarkUngroupedMatch 20000 76898 ns/op
testing.BenchmarkGroupedMatch 50000 38148 ns/op
R=r, rsc
https://golang.org/cl/154173
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
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
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
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
* 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
* 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
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
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
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
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
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.
This fixes an an issue where some headers lost their ability
to link to the respective source code.
R=rsc
https://golang.org/cl/154166
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of
either p or q are not members of the group since they cannot have an
inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.)
With p and q of typical size (> 512 bits), the probability of a random
blind [1..pq-1] being a multiple of p or q is negligible. However, in
the unit tests, much smaller sizes are used and the event could occur.
This change checks the result of the ext GCD and deals with this case.
It also increases the size of p and q in the unit test as a large
number of the keys selected were p, q = 227,169.
R=rsc
CC=golang-dev
https://golang.org/cl/154141
The ByteOrder.Put* methods are already available, this change uses
them to implement the Write function.
R=golang-dev, agl1, rsc, r
https://golang.org/cl/152141
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.
Fixes#110.
R=rsc
CC=golang-dev
https://golang.org/cl/152131
Commented both flush methods so people know what they are looking at.
This is a necessary fix for streaming and long polling HTTP services.
Fixes#93.
R=r, rsc, david.titarenco
https://golang.org/cl/154099
SELinux will cause mmap to fail when we request w+x memory unless the
user has configured their policies. We have a warning in make.bash,
but it's quite likely that the policy will be reset at some point and
then all their binaries start failing.
This patch prints a warning on Linux when mmap fails with EACCES.
R=rsc
CC=golang-dev
https://golang.org/cl/152086
(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes#100.
R=rsc
https://golang.org/cl/154102
The default SELinux policy on Fedora 12 (at least) disallows stack
pages to be +x. This causes all binaries written by 6g/6l to segfault
immedately. The 'true' way to fix this issue is to mark binaries with
the correct type. However, that assumes that 6l is going to detect
SELinux, figure out the correct type for the current distribution and
set the type (without libselinux).
For now we'll warn users and point them towards the way to enable
execstack for the whole system.
http://code.google.com/p/go/issues/detail?id=47
R=rsc
CC=golang-dev
http://codereview.prom.corp.google.com/1026041
1. allocate an extra byte for use by write.
2. throw away the code trying to translate
uid and gid to names. i suspect it of causing
seg faults in some situations, and it is
not needed by the compilers.
Fixes#48. (I hope.)
R=r
https://golang.org/cl/152077
Turn methods that don't store the result in their receiver into
functions in order to preserve the convention.
Re-jig Exp and Div by moving their guts into nat.go.
Add ProbablyPrime to perform Miller-Rabin primality tests.
crypto/rsa: reenable key generation since we now have ProbablyPrime.
R=gri
CC=go-dev
http://codereview.prom.corp.google.com/1024038
if suffixes don't work, check for name directly.
also fixes short names like bit.ly when ndots>1.
tested by tossing domain and search lines from /etc/resolv.conf
Fixes#2.
R=agl, agl1
CC=golang-dev
https://golang.org/cl/152048
too hard to make it the same everywhere.
still checking for non-zero exit status though.
disable core files while running tests
R=r
http://go/go-review/1026037