* Add a new kind of Name, "fpvar" which stands for function pointer variable
* When walking the AST, find functions used as expressions and create a new Name object for them
* Track functions which are only used in expr contexts, and avoid generating bridge code for them
R=golang-dev, minux.ma, fullung, rsc, iant
CC=golang-dev
https://golang.org/cl/9835047
Use the same algorithm that go tool cover uses when producing HTML
output to render coverage intensity.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12712043
Renders code coverage as an overlay, replicating the look of the
HTML that go tool cover produces.
Also some cleanups.
R=adonovan, bradfitz
CC=golang-dev
https://golang.org/cl/12684043
The receiver name is optional. when Method's receiver name messing,
the functionList regex can't match the Method,
e.g. `func (*T) ProtoMessage() {}`.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12530044
In prep for Robert's forthcoming cmd/api rewrite which
depends on the go.tools subrepo, we'll need to be more
careful about how and when we run cmd/api.
Rather than implement this policy in both run.bash and
run.bat, this change moves the policy and mechanism into
cmd/api/run.go, which will then evolve.
The plan is in a TODO in run.go.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/12482044
Basically a partial rollback of 12053043 until I can
figure out what is really going on.
Fixes bug 6051.
R=golang-dev
CC=golang-dev
https://golang.org/cl/12496043
cmd/api is a tool to prevent the Go developers from breaking
the Go 1 API promise. It has no utility to end users and
doesn't run on arbitrary packages (it's always been full of
hacks for its bespoke type checker to work on the standard
library)
Robert's in-progress rewrite depends on the go.tools repo for
go/types, so we won't be able to ship this tool later
anyway. Just remove it from binary distributions.
A future change to run.bash can conditionally build & run
cmd/api, perhaps automatically fetching go/types if
necessary. I assume people don't want to vendor go/types into
a private gopath just for cmd/api.
I will need help with run.bat.
R=golang-dev, adg, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/12316043
Split stack checks (morestack) corrupt g->sched,
but g->sched must be preserved consistent for GC/traceback.
The change implements runtime.notetsleepg function,
which does entersyscall/exitsyscall and is carefully arranged
to not call any split functions in between.
R=rsc
CC=golang-dev
https://golang.org/cl/11575044
This will mean that sub-repositories won't get built against the
release branch. They are often not compatible because the subrepos
often run ahead of the current release (e.g. go.tools is using
new additions to go/ast, and go.net is using new things in syscall)
so there's little point in checking them against cherrypick commits
when they'll be tested against those commits on tip anyway.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12001043
Add missing single quotation and backslash marks.
Change dot and underscore character keyword type.
"_" is a predeclared identifier, not a operator.
"." is a selector, x.f should be one identifier highlight.
So the fix is to change it.
Fixes#5775.
Fixes#5788.
Fixes#5798.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10480044
Don't require a full-scale callback for calls to the special
prologue functions.
Always use a simple wrapper function for C functions, so that
we can handle static functions defined in the import "C"
comment.
Disable a test that relies on gc-specific function names.
Fixes#5905.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11406047
The problem is that the cdecl() function in cmd/cgo/godefs.go isn't
properly translating the Go array type to a C array type when an
asterisk follows the [] in the array type declaration (it is perfectly
legal to put the asterisk on either side of the [] in go syntax,
depending on how you set up your pointers).
That said, the cdefs tool is only designed to translate from Go types
generated using the cgo *godefs* tool -- where the godefs tool is
designed to translate gcc-style C types into Go types. In essence, the
cdefs tool translates from gcc-style C types to Go types (via the godefs
tool), then back to kenc-style C types. Because of this, cdefs does not
need to know how to translate arbitraty Go types into C, just the ones
produced by godefs.
The problem is that during this translation process, the logic is
slightly wrong when going from (e.g.):
char *array[10];
to:
array [10]*int8;
back to:
int8 *array[10];
In the current implementation of cdecl(), the translation from the Go
type declaration back to the kenc-style declaration looks for Go
types of the form:
name *[]type;
rather than the actual generated Go type declaration of:
name []*type;
Both are valid Go syntax, with slightly different semantics, but the
latter is the only one that can ever be generated by the godefs tools.
(The semantics of the former are not directly expressible in a
single C statement -- you would have to have to first typedef the array
type, then declare a pointer to that typedef'd type in a separate
statement).
This commit changes the logic of cdecl() to look properly for, and
translate, Go type declarations of the form:
name []*type;
Additionally, the original implementation only allowed for a single
asterisk and a single sized aray (i.e. only a single level of pointer
indirection, and only one set of []) on the type, whereas the patched
version allows for an arbitrary number of both.
Tests are included in misc/cgo/testcdefs and the all.bash script has been
updated to account for these.
R=golang-dev, bradfitz, dave, iant
CC=golang-dev
https://golang.org/cl/11377043
This will behave like similar "*-other-window" functions in Emacs.
Default key bind is C-x 4 C-c C-j – while awkward, it follows both
the convention for other-window functions and the convention for
not using user- or emacs-reserved keys.
R=golang-dev, adonovan
CC=golang-dev
https://golang.org/cl/10707045
The postinstall script causes the installation to fail because the last
step that copies files for Xcode is broken. Two details can cause the
command to fail:
1. The XCODE_MISC_DIR value has a space. Without quotes in the cp
command, cp will just complain that this is an invalid syntax.
2. The source of the cp is a directory with two subdirectories.
We actually want the files for either Xcode 3 or Xcode 4 to be copied.
Using xcodebuild -version, we check for the Xcode version and
select which of xcode/3/* or xcode/4/* should be the source
of the copy.
Fixes#5874.
R=golang-dev, minux.ma, adg
CC=golang-dev
https://golang.org/cl/10893044
The static func named thread in issue5337.go's C snippet
conflicts with the static func named thread in issue3350.go's C snippet.
I don't know why (they're both static) but I also don't care,
because -linkmode=internal only needs to be able to handle
the cgo in the standard library, and it does.
Change the test to avoid this problem.
Fixes build (after run.bash is fixed to detect the breakage).
R=minux.ma
TBR=minux.ma
CC=golang-dev
https://golang.org/cl/11201043
when the program is not main package, `go run x.go` can't return the
link error message. so use `go run x.go` in instead `go build x.go`.
Fixes#5865.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/11165043
This change adds a basic compiler plugin for Go. The plugin
integrates "go build" with Vim's ":make" command and the
quickfix list.
Fixes#5751.
R=golang-dev, dsymonds, niklas.schnelle, 0xjnml
CC=golang-dev
https://golang.org/cl/10466043
race is more important than arch (moreover race implies x64)
don't know how to test it
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/10484046
In general the description should describe what is added or fixed,
not how it was done (the code does this), but in this case the cause
was delete was missing, so the fix is to add it.
Fixes issue 5765.
R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/10496043
In general the description should describe what is added or fixed,
not how it was done (the code does this), but in this
case the cause were "/ /= ;" was missing,
so the fix is to add it.
Fixes#5761.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/10479043
In general the description should describe what is added or fixed, not how it was done (the code does this), but in this case the cause was delete was missing, so the fix is to add it.
Fixes#5759.
R=adg
CC=dave, dominik.honnef, gobot, golang-dev
https://golang.org/cl/10476043
This basic Vim ftplugin sets the 'comments' and 'commentstring'
settings to sensible values. Future filetype settings for Go
would go in the same file.
The ftplugin was added as misc/vim/ftplugin/go/go.vim, this way
the installation instructions in readme.txt remain valid.
Fixes#5715.
R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/10323043
Default behavior is the same as before, but now a user may selectively disable some commands.
Also: deleted the mappings for import.vim.
Tested: by trying the commands for fmt, import and godoc in succession to make sure they still work. Also, ran test.sh in ftplugin/go.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10124043
Add gostartcall and gostartcallfn.
The old gogocall = gostartcall + gogo.
The old gogocallfn = gostartcallfn + gogo.
R=dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/10036044
These functions were introduced by revision 139919984600
and should not show up on profiles for consistency.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10003043
We require $objtype in make.rc and rc needs $path for finding commands.
Also include $cputype which we may use in the future.
R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/9905043
Operations like gofmt and go-remove-unused-imports delete entire
lines of text. Previously this put them on the kill-ring,
negatively affecting user experience.
R=adonovan
CC=gobot, golang-dev
https://golang.org/cl/9605043
This fixes fontification, navigation and indentation for methods
of the form `func (Foo) Bar...`
R=adonovan
CC=gobot, golang-dev
https://golang.org/cl/8951043
cmp(1) on FreeBSD requires two file arguments. grep -P on Linux (at least
Ubuntu 12.04) is described in the man page as "This is highly
experimental" and doesn't seem to work. On FreeBSD the man page states
"This option is not supported in FreeBSD." Needed this to work while
debugging some funky behavior of 'Import' in my local vim setup.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/7675043
runtime.setmg() calls another function (cgo_save_gm), so it must save
LR onto stack.
Re-enabled TestCthread test in misc/cgo/test.
Fixes#4863.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9019043
https://golang.org/cl/8134043 disabled cgo when cross compiling, this means builders which compile for both amd64 and 386 will be compiling the latter with cgo disabled.
This proposal modifies the builder to mirror the dist tool by always doing a native build.
Tested on my darwin/amd64 builder and confirmed the result when building darwin/386 is a native 386 build with cgo enabled.
R=bradfitz, dsymonds, r, adg
CC=golang-dev
https://golang.org/cl/8842044
This change removes processing of #cgo directives from cmd/cgo,
pushing the onus back on cmd/go to pass all necessary flags.
Fixes#5224. See comments for rationale.
R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/8610044
Some variables declared in C could end up as undefined symbols
in the final binary and have null address.
Fixes#5114.
Fixes#5227.
R=golang-dev, iant, ajstarks, dave, r
CC=golang-dev
https://golang.org/cl/8602044
If the build key contains -race, the builder will invoke to the race.{bat,bash} build command. This allows {darwin,linux,windows}-amd64 builders to do race and non race builds in sequence.
R=adg, dvyukov, fullung
CC=golang-dev
https://golang.org/cl/8266046
Some packages, like popwin.el, change display behaviour based on
the buffer's mode, so we should enable compilation-mode before
displaying the buffer.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8155043
This CL was written by rsc. I just tweaked 8l.
This CL adds TLS relocation to the ELF .o file we write during external linking,
so that the host linker (gcc) can decide the final location of m and g.
Similar relocations are not necessary on OS X because we use an alternate
program start-time mechanism to acquire thread-local storage.
Similar relocations are not necessary on ARM or Plan 9 or Windows
because external linking mode is not yet supported on those systems.
On almost all ELF systems, the references we use are like %fs:-0x4 or %gs:-0x4,
which we write in 6a/8a as -0x4(FS) or -0x4(GS). On Linux/ELF, however,
Xen's lack of support for this mode forced us long ago to use a two-instruction
sequence: first we load %gs:0x0 into a register r, and then we use -0x4(r).
(The ELF program loader arranges that %gs:0x0 contains a regular pointer to
that same memory location.) In order to relocate those -0x4(r) references,
the linker must know where they are. This CL adds the equivalent notation
-0x4(r)(GS*1) for this purpose: it assembles to the same encoding as -0x4(r)
but the (GS*1) indicates to the linker that this is one of those thread-local
references that needs relocation.
Thanks to Elias Naur for reminding me about this missing piece and
also for writing the test.
R=r
CC=golang-dev
https://golang.org/cl/7891047
The arm gentraceback mishandled frame linkage values pointing
to the assembly return function. This function is special as
its frame size is zero and it contains only one instruction.
These conditions would preserve the frame pointer and result
in an off by one error when unwinding the caller.
Fixes#5124
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8023043
The ARM implementation of runtime.cgocallback_gofunc diverged
from the calling convention by leaving a word of garbage at
the top of the stack and storing the return PC above the
locals. This change stores the return PC at the top of the
stack and removes the save area above the locals.
Update #5124
This CL fixes first part of the ARM issues and added the unwind test.
R=golang-dev, bradfitz, minux.ma, cshapiro, rsc
CC=golang-dev
https://golang.org/cl/7728045
godef[1][2] is a third party tool for printing information about
expressions, especially the location of their definition. This can be
used to implement a "jump to definition" function. Unlike
cross-language solutions like ctags, godef does not require an index,
operates on the Go AST instead of symbols and works across packages,
including the standard library.
This patch implements two new public functions: godef-describe (C-c
C-d) and godef-jump (C-d C-j). godef-describe describes the expression
at point, printing its type, and godef-jump jumps to its definition.
[1]: https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/
[2]: go get code.google.com/p/rog-go/exp/cmd/godef
R=adonovan, cw, patrick.allen.higgins, sameer
CC=golang-dev
https://golang.org/cl/7781043
The files could use some attention on the
Windows side but better to wait until after
the upcoming release.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7621044
Correctly indent the body of functions that have been declared
over multiple lines. See http://play.golang.org/p/MHMwNDbFyf for
an example.
Previously, the body of the function would be indented as deep as
the continuation line of the function declaration. Now it gets
indented as deep as the func keyword.
R=adonovan, cw, patrick.allen.higgins
CC=golang-dev
https://golang.org/cl/7628043
The copy of c++filt shipped on OS X is six years old,
and in our case it does far more mangling than it
does demangling. People on non-OS X systems will
have a working nm --demangle, so this won't affect them.
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.2
BuildVersion: 12C2034
$ c++filt --version
GNU c++filt 070207 20070207
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
$
$ go tool nm -n revcomp | grep quoteWith
4f560 T strconv.quoteWith
$ go tool nm -n revcomp | grep quoteWith | c++filt
f560 T strconv.quoteWith
$
$ nm -n revcomp | grep quoteWith
000000000004f560 t _strconv.quoteWith
$ nm -n revcomp | grep quoteWith | c++filt
000000000004f560 unsigned short _strconv.quoteWith
$
Fixes#4818.
R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/7729043
Instead of relying on gofmt's diff output (which is a unified
diff), we manually invoke diff -n and produce an RCS format diff,
which can easily be parsed in Emacs, with the go--apply-rcs-patch
function.
This fixes undocumented issues with the old implementation such as
skipping over hunks of changes, and it fixes the documented issue
of not being able to handle file names that include whitespace.
It can also apply the patch on a buffer that has no file name
attached at all.
Last but not least, it greatly simplifies the gofmt function
itself.
Fixes#4766.
Fixes#4475.
R=adonovan, cw, patrick.allen.higgins, sameer
CC=golang-dev
https://golang.org/cl/7516046
This CL adds compatibility for GNU Emacs 23 (fixing fontification
issues) and XEmacs >=21.5.32 (fixing a lot of issues). Earlier
versions of XEmacs will not be supported because they do not
support POSIX character classes. Because of that, we also make use
of a lot of functions that were added in 21.5.32.
A known and currently unfixable issue with XEmacs is that go-mode
will not always fontify identifiers that use unicode correctly.
All changes for XEmacs are annotated in the diff.
Note: go--position-bytes is not currently used anywhere, but will
be in a future CL.
Fixes#4927.
R=golang-dev, adonovan, cw, patrick.allen.higgins, sameer
CC=golang-dev
https://golang.org/cl/7456051
The installer package will now detect a previous installation and warn the user
that the previous installation will be deleted. If the user continues, the
installer will delete the previous installation and install the package as
usual.
Fixes#4293.
R=adg
CC=golang-dev
https://golang.org/cl/7427044
* allow commit watcher to be disabled, useful for small slow builders who will never be the first to notice a commit.
* builders always update their local master working copy before cloning a specific revision.
* refactor hg repo operations into a new type, Repo.
R=adg, shanemhansen, luitvd
CC=golang-dev
https://golang.org/cl/7326053
Mimic the Emacs convention of presenting read-only files meant
for browsing using view-mode, rather than Fundamental mode
which mistakenly allows editing of the "godoc" content.
Fixes#4322.
R=golang-dev, bradfitz, sameer
CC=golang-dev
https://golang.org/cl/7231055
Also:
- faster code for example extraction
- simplify handling of command documentation:
all "main" packages are treated as commands
- various minor cleanups along the way
For commands written in Go, any doc.go file containing
documentation must now be part of package main (rather
then package documentation), otherwise the documentation
won't show up in godoc (it will still build, though).
For commands written in C, documentation may still be
in doc.go files defining package documentation, but the
recommended way is to explicitly ignore those files with
a +build ignore constraint to define package main.
Fixes#4806.
R=adg, rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7333046
This works with at least one version of clang
that existed at one moment in time.
No guarantees about clangs past or future.
To try:
CC=clang all.bash
It does not work with the Xcode clang,
because that clang fails at printing a useful answer
to:
clang -print-libgcc-file-name
The clang that works prints a full path name for
that command, not just "libgcc.a".
Fixes#4713.
R=iant, minux.ma
CC=golang-dev
https://golang.org/cl/7323068
This is part one of two changes intended to make it easier to debug builder failures.
runOutput allows us to control the io.Writer passed to a subcommand. The intention is to add additional debugging information before and after the build which will then be capture and sent to the dashboard.
In this proposal, the only additional information is the build status. See http://build.golang.org/log/e7b5bf435b4de1913fc61781b3295fb3f03aeb6e
R=adg
CC=golang-dev
https://golang.org/cl/7303090
The dashboard is currently failing to store results of new builds for some keys, notable the go.codereview sub repository. This is causing the builders to mark the entire triggering commit as failed. With the help of David Symonds we think it is because the results value has breached the 1mb datastore limit on AppEngine.
R=dsymonds, adg
CC=golang-dev
https://golang.org/cl/6858094
* Separate internal and external LockOSThread, for cgo safety.
* Show goroutine that made faulting cgo call.
* Never start a panic due to a signal caused by a cgo call.
Fixes#3774.
Fixes#3775.
Fixes#3797.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7228081
This prevents the occasional issue when Mercurial screws up the locking
itself, and by moving the locking into this process we can use the
goroot for other things (such as automatically updating the builder
binary).
It also asks all builders to poll for new commits.
R=bradfitz, dave, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7178046
This proposal updates the dashboard builder to avoid relying on the (soon to be removed) support for using go get to download to $GOROOT. The result is
WORKSPACE=$(the value of the -buildRoot flag / $BUILDER_NAME + hg revision)
GOROOT=$WORKSPACE/go
GOPATH=$WORKSPACE
Required for CL 6941058.
R=minux.ma, adg
CC=golang-dev
https://golang.org/cl/7034049
Enable cgo on OpenBSD.
The OpenBSD ld.so(1) does not currently support PT_TLS sections. Work
around this by fixing up the TCB that has been provided by librthread
and reallocating a TCB with additional space for TLS. Also provide a
wrapper for pthread_create, allowing zeroed TLS to be allocated for
threads created externally to Go.
Joint work with Shenghou Ma (minux).
Requires change 6846064.
Fixes#3205.
R=golang-dev, minux.ma, iant, rsc, iant
CC=golang-dev
https://golang.org/cl/6853059
compiler_rt introduces a weak and hidden symbol compilerrt_abort_impl
into our pre-linked _all.o object, we have to handle it.
Fixes#4273.
R=iant, rsc, r
CC=golang-dev
https://golang.org/cl/6783050
The "did_ftplugin" lines were ineffective and the "K" mapping was too
invasive, which is why it was removed.
R=golang-dev, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6823044
Too many people quote entire emails and put their reply at the top ("top posting"),
so we shouldn't recognise review commands anywhere in the review text.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6815048
In a few places, the existing cgo tests assume that a
Go int is the same as a C int. Making int 64 bits wide
on 64-bit platforms violates this assumption.
Change that code to assume that Go int32 and C int
are the same instead. That's still not great, but it's better,
and I am unaware of any systems we run on where it is not true.
Update #2188.
R=iant, r
CC=golang-dev
https://golang.org/cl/6552064
Always process the DWARF info, even when the const value is determined
using the debug data block. This ensures that the injected enum is
removed and future loads of the same constant do not trigger
inconsistent definitions.
Add tests for issues 2470 and 4054.
Fixes#4054.
R=golang-dev, fullung, dave, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6501101
Previously, an import block such as
import (
"net"
"stack"
)
would not permit ":Drop stack" to work because we were aborting
the scan early, which is only correct when Import is in operation.
R=golang-dev, franciscossouza
CC=golang-dev
https://golang.org/cl/6532053
use a function to get stdout and stderr, instead of depending
on a specific libc implementation.
also make test/run.go replace \r\n by \n before comparing
output.
Fixes#2121.
Part of issue 1741.
R=alex.brainman, rsc, r, remyoudompheng
CC=golang-dev
https://golang.org/cl/5847068
I thought this was redundant since the behavior of 'go get -d' had
changed. I was wrong. Should have tested more thoroughly.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6500136
We have some tests (misc/cgo/test) that are disabled only because
they will fail to run on go builder - see issue 3358 for details.
This change will allow us to enable these tests.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6493118
Fixes#4008.
Run a background goroutine that wastes CPU to trick the
power management into raising the CPU frequency which,
by side effect, makes sleep more accurate on arm.
=== RUN TestParallelSleep
--- PASS: TestParallelSleep (1.30 seconds)
_cgo_gotypes.go:772: sleep(1) slept for 1.000458s
R=minux.ma, r
CC=golang-dev
https://golang.org/cl/6498060
Vim autocompletion respects the $GOPATH variable and does not
ignore dashes ('-'), dots ('.') and underscores ('_') like found
in many remote packages.
Environment variable $GOROOT is determined by calling
'go env GOROOT' instead of relying on the user's environment
variables.
Fixes#3876Fixes#3882
R=golang-dev, franciscossouza, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6443151
- pprof is a perl script, so go command should invoke
perl instead of trying to run pprof directly;
- pprof should use "go tool nm" unconditionally on windows,
no one else can extract symbols from Go program;
- pprof should use "go tool nm" instead of "6nm".
Fixes#3879.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6445082
This CL adds a step to the build procedure for cgo programs. It uses 'ld -r'
to combine all gcc compiled object file and generate a relocatable object file
for our ld. Additionally, this linking step will combine some static linking
gcc library into the relocatable object file, so that we can use libgcc,
libmingwex and libmingw32 without problem.
Fixes#3261.
Fixes#1741.
Added a testcase for linking in libgcc.
TODO:
1. still need to fix the INDIRECT_SYMBOL_LOCAL problem on Darwin/386.
2. still need to enable the libgcc test on Linux/ARM, because 5l can't deal
with thumb libgcc.
Tested on Darwin/amd64, Darwin/386, FreeBSD/amd64, FreeBSD/386, Linux/amd64,
Linux/386, Linux/ARM, Windows/amd64, Windows/386
R=iant, rsc, bradfitz, coldredlemur
CC=golang-dev
https://golang.org/cl/5822049
Enhances test/run.go to support testing other directories
Will enable stdio tests on Windows in a follow-up CL.
R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/6220049
This line helps me to tell whether the CL is waiting for me or I'm waiting for the author.
Also:
- vertical-align table cells so buttons are always aligned with CL headers.
- add email= to show front page for someone else.
Demo at http://rsc.gocodereview.appspot.com/.
Until this is deployed for real, some recently changed CLs may be
missing the 'first line of last message' part.
R=dsymonds
CC=golang-dev
https://golang.org/cl/6446065
To be filled in by a later CL. I deployed a test version to
App Engine to work on setting the values, so there are
a few records that have this field set already.
That field is breaking the live version, so I have pushed
a new copy with this 1-line change to the live version
I assumed that appengine/datastore was like every other
marshaling and unmarshaling package we have in Go
(for example, encoding/gob, encoding/json, encoding/xml,
and protobuf) and that if it loaded an unknown field it would
just ignore it. Apparently not. Sorry.
R=dsymonds
TBR=dsymonds
CC=golang-dev
https://golang.org/cl/6454064
This is the state when the CL has been submitted by someone other than
the CL author, but before the CL author has synched their client.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6458044
A "NOT LGTM" overrules a previous "LGTM" by the same person, and vice versa.
"NOT LGTM"s are shown in the same location as LGTMs, colored red.
R=rsc
CC=golang-dev
https://golang.org/cl/6453062
If a factored import group has a blank line, assume it is dividing
separate groups of imports (e.g. standard library vs. site-specific).
import (
"bytes"
"io"
"mycorp/package"
)
The most common case is inserting new standard library imports,
which are usually (stylistically) the first group, so we should drop
"net" in the above example immediately after "io".
Since this logic is getting non-trivial, add a test.
R=golang-dev, minux.ma, franciscossouza
CC=golang-dev
https://golang.org/cl/6445043
The previous code assumed the gofmt output referred to /tmp but
that's not true if TMPDIR points somewhere else (like on Macs).
Fixes#3782.
R=sameer
CC=golang-dev
https://golang.org/cl/6346050
Use code to be used in lisp programs as suggested in the doc strings for
replace-{string|regexp}. Bonus: This code works for XEmacs.
R=golang-dev, sameer, jmeurin
CC=golang-dev
https://golang.org/cl/6296073
Patching the buffer with the output from gofmt -d only works if
the file already exists. If it doesn't, replace the content with
the output of gofmt.
R=sameer
CC=golang-dev
https://golang.org/cl/6302063
The datastore.Query methods once mutated the Query value, but now they return
a derivative query, so the Hash= and ParentHash= filters were not being
applied.
R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/6300058
Split stdout/stderr into a separate file so that can be handled
differently on some platforms. Both NetBSD and OpenBSD have defines
for stdout/stderr that require some coercion in order for cgo to
handle them correctly.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6247062
specifically, adds a go-test element to compilation-error-regexp-alist[-alist].
Fixes#3629.
R=golang-dev, rsc, sameer
CC=golang-dev, jba
https://golang.org/cl/6197091
The previous heap profile format did not include buckets with
zero used bytes. Also add several missing MemStats fields in
debug mode.
R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/6249068
This uses the patch output of gofmt (-d option) and applies each
chunk to the buffer, instead of replacing the whole buffer. The
main advantage is that the undo history is kept across gofmt'ings,
so it can really be used as a before-save-hook.
R=sameer, sameer
CC=golang-dev
https://golang.org/cl/6198047
Two fixes for indentation problems:
1. Properly recognize multi-line strings. These start with `, not ".
2. Don't indent a line if the beginning of the line is the end of a multi-line string. This happened for instance when inserting a closing bracket after a multi-line string.
R=sameer
CC=golang-dev
https://golang.org/cl/6157044
As our CL number could be as small as 152046, changed CL number's lower bound
to 150000. Hopefully our issue count won't reach 150000 any time soon.
Chrome on Mac OS X has very strange behavior regarding the focus, although we
force the focus to the input box on load, the page still come up with focus on
"issue". Set the tabindex of the input box as a workaround.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6212055
This adds restoring the window position so that the buffer doesn't jump around after the erase/copy.
R=sameer
CC=golang-dev
https://golang.org/cl/5981055
1. In CL 5989057, I made a mistake in the last minute change.
"MOVW.W R4, -4(SP)" should really be "MOVW.W R4, -4(R13)",
as 5l will rewrite offset for SP.
2. misc/cgo/test/issue1560.go tests for parallel sleep of 1s,
but on ARM, the deadline is frequently missed, so change sleep
time to 2s on ARM.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6202043
If we delay the mail sending, we can't send as the current user.
If we don't fill in the time.Time fields, datastore.Put will fail
because the zero time.Time value is out of its range.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6136053
This changes the misc/dist program to generate OS X
packages using pkgbuild and productbuild.
The productbuild utility makes it easy to generate
packages with a custom Distribution file. This allows
us to add an installcheck script that presents a
friendly message to users who are running on an old
version of Mac OS X.
The change also fixes a few issues with the
postinstall script:
- In-repo version of the script has been made
executable. Installers generated using the new
tools couldn't execute it otherwise.
- It now uses -d for checking for the existence
of the Xcode specs directory.
- The call to sudo.bash has been dropped since cov
and prof aren't bundled with the binary
distributions.
Fixes#3455.
Tested on 10.5.8, 10.6.0, 10.6.8 and 10.7.3.
R=adg, golang-dev
CC=golang-dev
https://golang.org/cl/5987044
adg removed some now-unwanted fields in Package a while ago,
but there are still datastore entities with those fields,
so we must explicitly check for ErrFieldMismatch and ignore it.
R=golang-dev, rsc
CC=adg, golang-dev
https://golang.org/cl/6007043
Doesn't fix any known issue. This bit me in some unrelated
code and I thought of this tool.
R=golang-dev, krautz, mikkel
CC=golang-dev
https://golang.org/cl/5976067
- flag * and / as comment characters
- mark newline as a comment-ender
- include newline in go-mode-whitespace-p
Thanks Jonathan Amsterdam and Steve Yegge for the patch!
R=golang-dev, rsc
CC=golang-dev, jba, stevey
https://golang.org/cl/5938056
Fixes#3313
go-mode-backward-skip-comments is probably due for a more ambitious refactoring --- it repeats guard conditions after every nearly every movement of point.
R=sameer, r
CC=golang-dev
https://golang.org/cl/5844063