- fine-tuning of one-line func heuristic (nodes.go)

- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)

R=r, rsc
CC=go-dev
http://go/go-review/1026006
This commit is contained in:
Robert Griesemer 2009-11-06 14:24:38 -08:00
parent 8c40900fc2
commit 368f8cbc75
213 changed files with 1297 additions and 3670 deletions

View file

@ -120,25 +120,15 @@ const (
shift = 8;
)
func (w WaitStatus) Exited() bool {
return w&mask == exited;
}
func (w WaitStatus) Exited() bool { return w&mask == exited }
func (w WaitStatus) Signaled() bool {
return w&mask != stopped && w&mask != exited;
}
func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
func (w WaitStatus) Stopped() bool {
return w&0xFF == stopped;
}
func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
func (w WaitStatus) Continued() bool {
return w == 0xFFFF;
}
func (w WaitStatus) Continued() bool { return w == 0xFFFF }
func (w WaitStatus) CoreDump() bool {
return w.Signaled() && w&core != 0;
}
func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
func (w WaitStatus) ExitStatus() int {
if !w.Exited() {
@ -536,17 +526,11 @@ func PtraceCont(pid int, signal int) (errno int) {
return ptrace(PTRACE_CONT, pid, 0, uintptr(signal));
}
func PtraceSingleStep(pid int) (errno int) {
return ptrace(PTRACE_SINGLESTEP, pid, 0, 0);
}
func PtraceSingleStep(pid int) (errno int) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
func PtraceAttach(pid int) (errno int) {
return ptrace(PTRACE_ATTACH, pid, 0, 0);
}
func PtraceAttach(pid int) (errno int) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
func PtraceDetach(pid int) (errno int) {
return ptrace(PTRACE_DETACH, pid, 0, 0);
}
func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
// Sendto
// Recvfrom