The object files begin with a header that is
$GOARCH
on a line by itself. This CL changes that header to
go object $GOOS $GOARCH release.2011-01-01 4567+
where the final two fields are the most recent release
tag and the current hg version number.
All objects imported into a Go compilation or linked into an
executable must have the same header line, and that header
line must match the compiler and linker versions.
The effect of this will be that if you update and run all.bash
and then try to link in objects compiled with an earlier version
of the compiler (or invoke the wrong version of the compiler),
you will get an error showing the different headers instead
of perhaps silent incompatibility.
Normal usage with all.bash should be unaffected, because
all.bash deletes all the object files in $GOROOT/pkg/$GOOS_$GOARCH
and cleans all intermediate object files before starting.
This change is intended to diagnose stale objects arising when
users maintaining alternate installation directories forget to
rebuild some of their files after updating.
It should help make the adoption of $GOPATH (CL 3780043)
less error-prone.
R=ken2, r
CC=golang-dev
https://golang.org/cl/4023063
Since nobody suggested major changes to the higher level API, I'm
splitting up the lower level code for review. This is the first of the
changes for the packet reading/writing code.
It deliberately doesn't include a Makefile because the package is
incomplete.
R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4080051
* Don't require lines to be full.
* Don't forget to flush the line buffer.
* Update the test so that it doesn't happen to include only full lines
in order to test the above.
* Always write the line after the header as GNUPG expects it.
R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4124043
OpenPGP changed its OCFB mode for more modern packets (for example, the
MDC symmetrically encrypted packet). This change adds a bool to
determine which mode is used.
R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4126041
GC is still single-threaded.
Multiple threads will happen in another CL.
Garbage collection pauses are typically
about half as long as they were before this CL.
R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046
The timestamp file is being created before cgo
runs, which means errors will not prevent it
from being created and thus will cause the
build to break by rendering the rule up-to-date
when it isn't.
R=rsc
CC=golang-dev
https://golang.org/cl/4001049
so that spawned processes avoid inheriting pipes.
Implement CloseOnExec.
Make file and pipe handles inheritable.
R=rsc, brainman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4126047
Follow morestack, so that crashes during a stack split
give complete traces. Also mark stack segment boundaries
as an aid to debugging.
Correct various line number bugs with yet another attempt
at interpreting the pc/ln table. This one has a chance at
being correct, because I based it on reading src/cmd/ld/lib.c
instead of on reading the documentation.
Fixes#1138.
Fixes#1430.
Fixes#1461.
throw: runtime: split stack overflow
runtime.throw+0x3e /home/rsc/g/go2/src/pkg/runtime/runtime.c:78
runtime.throw(0x81880af, 0xf75c8b18)
runtime.newstack+0xad /home/rsc/g/go2/src/pkg/runtime/proc.c:728
runtime.newstack()
runtime.morestack+0x4f /home/rsc/g/go2/src/pkg/runtime/386/asm.s:184
runtime.morestack()
----- morestack called from stack: -----
runtime.new+0x1a /home/rsc/g/go2/src/pkg/runtime/malloc.c:288
runtime.new(0x1, 0x0, 0x0)
gongo.makeBoard+0x33 /tmp/Gongo/gongo_robot_test.go:344
gongo.makeBoard(0x809d238, 0x1, 0xf76092c8, 0x1)
----- stack segment boundary -----
gongo.checkEasyScore+0xcc /tmp/Gongo/gongo_robot_test.go:287
gongo.checkEasyScore(0xf764b710, 0x0, 0x809d238, 0x1)
gongo.TestEasyScore+0x8c /tmp/Gongo/gongo_robot_test.go:255
gongo.TestEasyScore(0xf764b710, 0x818a990)
testing.tRunner+0x2f /home/rsc/g/go2/src/pkg/testing/testing.go:132
testing.tRunner(0xf764b710, 0xf763b5dc, 0x0)
runtime.goexit /home/rsc/g/go2/src/pkg/runtime/proc.c:149
runtime.goexit()
R=ken2, r
CC=golang-dev
https://golang.org/cl/4000053
If the same directory was used for multiple builds,
it was possible for a stale version.go to contain the
wrong definitions for $GOOS and $GOARCH, because
they can change even if the hg version does not.
Split into multiple files to fix.
R=r, r2
CC=golang-dev
https://golang.org/cl/4124050
Shame on me: I fixed the same bug in 6l in 8691fcc6a66e
(https://golang.org/cl/2609041) and neglected
to look at 5l and 8l to see if they were affected.
On the positive side, the check I added in that CL is the
one that detected this bug.
Fixes#1457.
R=ken2
CC=golang-dev
https://golang.org/cl/3981052
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.
R=rsc
CC=golang-dev
https://golang.org/cl/4001048
Make the error message and the needed action more obvious
when a command isn't found to obtain the source code
of a project. Users seem to strugle with the existing
wording in practice.
R=rsc
CC=golang-dev
https://golang.org/cl/4058047
The callback mechanism has been made more flexible.
Eliminated one round of argument copying in Syscall.
Faster Get/SetLastError implemented.
Added gettime for gc perf profiling.
R=rsc, brainman, mattn, rog
CC=golang-dev
https://golang.org/cl/4058046
The crypto package is added as a common place to store identifiers for
hash functions. At the moment, the rsa package has an enumeration of
hash functions and knowledge of their digest lengths. This is an
unfortunate coupling and other high level crypto packages tend to need
to duplicate this enumeration and knowledge (i.e. openpgp).
crypto pulls this code out into a common location.
It would also make sense to add similar support for ciphers to crypto,
but the problem there isn't as acute that isn't done in this change.
R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4080046
If there were warnings or errors in the user code,
cgo would print the first error from gcc and then stop,
which is not helpful.
This CL makes cgo ignore errors from user code
in the first pass - they will be shown later.
It also prints errors from user preamble code
with the correct line numbers.
(Also fixed misleading usage message).
R=iant, rsc
CC=golang-dev
https://golang.org/cl/4082047
The "all:" target is the default for running gomake
by hand, but it is not used during the build.
The build runs make install and make test.
Save the build of maketables for the test phase
so that the packages it needs will have been
installed already.
R=r, r2
CC=golang-dev
https://golang.org/cl/4121043
- fixed length of amd64 .data pe section
(don't need to include non-initialised data)
- use correct oh/oh64 variable when updating
data directory in addexports
- simplify and cleanup
R=vcc, rsc
CC=golang-dev
https://golang.org/cl/4106044
The sanity checking in pass 2 is wrong
when a select is offering to communicate in
either direction on a channel and neither case
is immediately ready.
R=ken2
CC=golang-dev
https://golang.org/cl/3991047
The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.
The heap map is in bss. The assumption is that if
we don't touch the pages they won't be mapped in.
Also moved some duplicated memory allocation
code out of the OS-specific files.
R=r
CC=golang-dev
https://golang.org/cl/4118042
- complex numbers now supported.
- entirely independent of standard decode code.
- parser has no read-ahead; that is, the scanning works
simply by reading the values as they arrive, not by trying
to count bytes for message boundaries, a proof of concept
for the pending rewrite of the regular decoder.
R=rsc, r2
CC=golang-dev
https://golang.org/cl/4084044
This bug prevented files such as READMEs etc. from being included in the index.
For instance, now author names recorded in the AUTHORS file can be found with
a godoc query.
R=rsc, r2
CC=golang-dev
https://golang.org/cl/4005047
The linker avoids a GOT indirection by turning a MOV into
a LEA, but with x86-64 GCC has started emitting CMOV*
instructions which break the existing logic.
This will generate errors such as:
unexpected GOT reloc for non-dynamic symbol luaO_nilobject_
The CMOV* instructions may be emitted with normal code like:
if (o >= L->top) return cast(TValue *, luaO_nilobject);
else return o;
Which gets compiled into (relocation offset at 1b):
13: 48 3b 47 10 cmp 0x10(%rdi),%rax
17: 48 0f 43 05 00 00 00 cmovae 0x0(%rip),%rax
1e: 00
This change will allow the indirection through the GOT to
avoid the problem in those cases.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4071044
It is unmaintained and untested, and I think it's broken too.
It was a toy to show that Go can run on real hardware,
and it served its purpose.
The source code will of course remain in the repository
history, so it could be brought back if needed later.
R=r, r2, uriel
CC=golang-dev
https://golang.org/cl/3996047
The implementation of the position computation
was surprisingly broken. Implemented fixes and
added extra test cases.
There is a slight interface change: Calling
Pos() returns the current position; but if
called before Scan() that position may not
be the position of the next token returned
by Scan() (depending on the scan settings
and the source text) - this in contrast to
the original comment.
However, after calling Scan(), the Scanner's
Position field reports the position of the
scanned token, as before.
Fixes#1327.
R=rsc
CC=golang-dev
https://golang.org/cl/3972047
Also simplify sleeper algorithm and poll
occasionally so redundant sleeper goroutines
will quit sooner.
R=r, niemeyer, r2
CC=golang-dev
https://golang.org/cl/4063043
The docstring claims the function uses PSS message encoding,
when the function actually implements PKCS1-v1_5 encoding.
R=agl1, rsc
CC=danderson, golang-dev
https://golang.org/cl/4097042
Init may report an error on the first character and
thus one needs an ability to set the error handler
for Init. Was a design bug.
Added corresponding test cases and better documentation.
Also: Fixed a subtle infinite loop exposed by one of the
new test cases.
Fixes#1380.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4094041
When parsing numbers with an exponent (like "12e-1"), the JSON scanner
would only allow a lowercase 'e', while the RFC also allows the
uppercase 'E'.
R=adg
CC=golang-dev, rsc
https://golang.org/cl/3986042
(or at least a correct encoder, still to come).
Change the debug structure slightly to better represent
the grammar.
Minor tweaks for consistency in type.go.
R=rsc
CC=golang-dev
https://golang.org/cl/4007044
The test code used to do this:
for _, tc := range tests {
ch <- &tc
}
Note that &tc is always the same value here. As the value is
received from the channel, the sender can loop around and
change the contents of tc. This means that the receiver's
value is unstable and can change while it is in use.
R=adg, r2, rsc
CC=chris, golang-dev
https://golang.org/cl/3978043
Close of closed channel panics.
Receive from closed channel never panics,
even if done repeatedly.
Fixes#1349.
Fixes#1419.
R=gri, iant, ken2, r, gri1, r2, iant2, rog, albert.strasheim, niemeyer, ejsherry
CC=golang-dev
https://golang.org/cl/3989042
Re-implement the debugging helper to be independent of the existing
implementation. This is preparatory to a rewrite to clean up issue 1416.
Include a definition of the grammar of the data stream.
R=rsc
CC=golang-dev
https://golang.org/cl/3970045
This was broken after the last update (2011-01-20).
However, I'm not sure if the changed example is a
sensible use of import(), so I'd appreciate comments.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4067043
The functionality we want (shared ppid) is implied
by CLONE_THREAD already, and CLONE_PARENT
causes problems if the Go program is pid 1 (init).
See issue 1406 for more details.
Fixes#1406.
R=adg, iant
CC=golang-dev
https://golang.org/cl/3971044
The o+i*p approach to visiting select cases in random
order stops being fair when there is some case that
is never ready. If that happens, then the case that follows
it in the order gets more chances than the others.
In general the only way to ensure fairness is to make
all permutations equally likely. I've done that by computing
one explicitly.
Makes the permutations correct for n >= 4 where
previously they were broken. For n > 12, there's not
enough randomness to do a perfect job but this should
still be much better than before.
Fixes#1425.
R=r, ken2, ejsherry
CC=golang-dev
https://golang.org/cl/4037043
- added flag -maxresults (default: 10000) to limit the max.
number of full text results shown
- removed flag -fulltext; use -maxresults=0 to disable fulltext
index
- better indication on result page if not all results are shown
(... after line list)
R=rsc, gri1
CC=golang-dev
https://golang.org/cl/4049042
A query string of the form ident.ident will be used both as a qualified
identifier for identifier search and as a regular expression.
Qualified identifier lookup got broken accidentally when introducing
regexp full text search. Cleaned up surrounding logic a bit.
R=rsc
CC=golang-dev
https://golang.org/cl/3984042
With the current implementation, xml unmarshalling
will silently fail to unmarshal any paths passing
through the same element, such as:
type T struct {
A string "dummy>a"
B string "dummy>b"
}
This change tweaks the algorithm so that this works
correctly.
Also, using paths that would cause the same element to
unmarshal twice will error out ahead of time explaining
the problem, rather than silently misbehaving.
R=rsc
CC=golang-dev
https://golang.org/cl/4082041
When data is received for a channel, but that channel
is not ready to receive it, the central run() loop
is currently blocked, but this can lead to deadlock
and interference between independent channels.
This CL adds an explicit buffer size to netchan
channels (an API change) - the sender will not
send values until the buffer is non empty.
The protocol changes to send ids rather than channel names
because acks can still be sent after a channel is hung up,
we we need an identifier that can be ignored.
R=r, rsc
CC=golang-dev
https://golang.org/cl/2447042
Also:
* document special cases for Frexp and Ldexp
* handle ±Inf in Ldexp
* correctly return -0 on underflow in Ldexp
* test special cases for Ldexp
* test boundary cases for Frexp, Ilogb, Ldexp, and Logb
R=rsc
CC=golang-dev
https://golang.org/cl/3676041
Minor cleanup:
- removed a duplicate test case
- added a function to remove repeated code
- for consistency, replaced "return nil" with a panic at an
unreachable point
Fixes#1428.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4057042
RFC2616 sections 4.4 and 14.16:
* Cannot use Content-Length with non-identity Transfer-Encoding
* Content-Range response is "bytes x-y/z" not "x-y/z"
R=rsc
CC=golang-dev
https://golang.org/cl/4018041
For Windows, the options for syscall.Wait4() aren't used.
Then this will be dummy value like WNOHANG, WSTOPPED.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4075041
This introduces support for selecting which subelement
to unmarshal into a given struct field by providing a
nesting path separated by the > character.
R=rsc
CC=golang-dev
https://golang.org/cl/4066041
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
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
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
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
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
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
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
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
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
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
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
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
* 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
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
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
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
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
- 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
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
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
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
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
- 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
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
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
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
#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
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
It was only used by exp/4s, and even if it is general purpose, I think
it belongs in a graphics library atop exp/draw, not in exp/draw itself.
R=rsc
CC=golang-dev
https://golang.org/cl/3705041
This is largely based on ality's CL 2747042.
crypto/rc4: API break in order to conform to crypto/cipher's
Stream interface
cipher/cipher: promote to the default build
Since CBC differs between TLS 1.0 and 1.1, we downgrade and
support only 1.0 at the current time. 1.0 is what most of the
world uses.
Given this CL, it would be trival to add support for AES 256,
SHA 256 etc, but I haven't in order to keep the change smaller.
R=rsc
CC=ality, golang-dev
https://golang.org/cl/3659041
The recent linker changes broke NaCl support
a month ago, and there are no known users of it.
The NaCl code can always be recovered from the
repository history.
R=adg, r
CC=golang-dev
https://golang.org/cl/3671042
This Flush is equivalent to zlib's Z_SYNC_FLUSH.
The addition of the explicit Writer type opens the
door to adding a PartialFlush if needed for SSH
and maybe even FullFlush. It also opens the door
for a SetDictionary method to be added.
http://www.bolet.org/~pornin/deflate-flush.html
documents the various intricacies of flushing a
DEFLATE stream.
R=agl1, r
CC=golang-dev
https://golang.org/cl/3637041
The code used interfaces in a pretty, pedagogical way but not efficiently.
Remove unnecessary interface code for significant speedups.
Before:
regexp.BenchmarkLiteral 1000000 2629 ns/op
regexp.BenchmarkNotLiteral 100000 18131 ns/op
regexp.BenchmarkMatchClass 100000 26647 ns/op
regexp.BenchmarkMatchClass_InRange 100000 27092 ns/op
regexp.BenchmarkReplaceAll 100000 27014 ns/op
After:
regexp.BenchmarkLiteral 1000000 2077 ns/op
regexp.BenchmarkNotLiteral 100000 13738 ns/op
regexp.BenchmarkMatchClass 100000 20418 ns/op
regexp.BenchmarkMatchClass_InRange 100000 20999 ns/op
regexp.BenchmarkReplaceAll 100000 21825 ns/op
There's likely more to do without major surgery, but this is a simple, significant step.
R=rsc
CC=golang-dev
https://golang.org/cl/3572042
Too many programs complain that we even try.
This was a bit of security paranoia and not worth
the bother.
Fixes#1340.
R=r, r2
CC=golang-dev
https://golang.org/cl/3579042
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260
Fixes#482.
Fixes#609.
R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
Clean up an error message and error exit too.
Insert blank line after "DO NOT EDIT" comment
to keep it from being a doc comment.
Fixes#1213.
Fixes#1222.
R=r
CC=golang-dev
https://golang.org/cl/3608042
No semantic changes here, but working
toward being able to align structs based
on the maximum alignment of the fields
inside instead of having a fixed alignment
for all structs (issue 482).
R=ken2
CC=golang-dev
https://golang.org/cl/3617041
- improved search result page
- clicking on files shows highlighted search phrase
(.go files loose their godoc-specific formatting and
highlighting in this mode - a better solution is in
the works)
- support for textual results
- fixed bug with non-URL escaped URL parameter (Query)
R=rsc, adg
CC=golang-dev
https://golang.org/cl/3585041
If an %lld argument can be 32 or 64 bits wide, cast to vlong.
If always 32 bits, drop the ll.
Fixes#1336.
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3580041
To enable use -fulltext flag; e.g.: godoc -v -fulltext -http=:7777
Enabling the fulltext index will use significantly more memory as
the text of all source code, the respective suffixarray, and the
file set data structure is kept in memory. At the moment there is
about 6Mb of source code (~1400 files) indexed under GOROOT.
Source code + suffix array together consume 5*(size of source) or
about 30Mb. The file set data structure consumes about 4b/src line.
By default only up to 5000 results are shown for now.
The presentation of the results needs tuning. In particular,
if a string is found, clicking on the respective file does not
highlight them, yet.
At the moment, only Go source files are indexed. Eventually,
the full text index should encompass other files as well.
R=rsc, adg
CC=golang-dev
https://golang.org/cl/3182043
- change Walk signature to use an ast.Node instead of interface{}
- add Pos functions to a couple of ast types to make them proper nodes
- explicit nil checks where a node can be nil; incorrect ASTs cause Walk to crash
For now ast.Walk is exercised extensively as part of godoc's indexer;
so we have some confidence in its correctness. But this needs a test,
eventually.
Fixes#1326.
R=rsc, r
CC=golang-dev
https://golang.org/cl/3481043
This patch adds a new package: os/inotify, which
provides a Go wrapper to the Linux inotify system.
R=rsc, albert.strasheim, rog, jacek.masiulaniec
CC=golang-dev
https://golang.org/cl/2049043
At the moment, and for the forseeable future, it only checks arguments to print calls.
R=rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec, cw
CC=golang-dev
https://golang.org/cl/3522041
One of my own experiments ended up getting mistakenly commited when
switching to Jacobian transformations.
R=rsc
CC=golang-dev
https://golang.org/cl/3473044
Very few changes here: the subtle ones are in Make.pkg.
Note that incredibly (and importantly) there are
no changes necessary to the test programs in misc/cgo.
R=iant
CC=golang-dev
https://golang.org/cl/3504041
More support for references to dynamic symbols,
including full GOT and PLT for ELF objects.
For Mach-O everything ends up in the GOT: dealing
with the real lazy PLT is too hard for now so we punt.
R=iant, iant2
CC=golang-dev
https://golang.org/cl/3491042
Formerly known as libcgo.
Almost no code here is changing; the diffs
are shown relative to the originals in libcgo.
R=r
CC=golang-dev
https://golang.org/cl/3420043
The name ParseFile was kept as it indicates that
this function parses a Go 'SourceFile' per the
Go spec. Similarly, the other functions (ParseExpr,
ParseStmtList, ParseDeclList) parse the corresponding
constructs as defined in the Go spec.
Fixes#1311.
R=r, rsc
CC=golang-dev
https://golang.org/cl/3453042
I have written a tool to verify Printf calls, and although it's not
ready to be reviewed yet it's already uncovered a spate of problems
in the repository. I'm sending this CL to break the changes into
pieces; as the tool improves it will find more, I'm sure.
R=rsc
CC=golang-dev
https://golang.org/cl/3427043