- 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

@ -23,9 +23,7 @@ const OS = "darwin"
// even linking this function into the binary. See ../os/getwd.go.
const ImplementsGetwd = false
func Getwd() (string, int) {
return "", ENOTSUP;
}
func Getwd() (string, int) { return "", ENOTSUP }
/*
@ -90,9 +88,7 @@ const (
stopped = 0x7F;
)
func (w WaitStatus) Exited() bool {
return w&mask == exited;
}
func (w WaitStatus) Exited() bool { return w&mask == exited }
func (w WaitStatus) ExitStatus() int {
if w&mask != exited {
@ -101,9 +97,7 @@ func (w WaitStatus) ExitStatus() int {
return int(w>>shift);
}
func (w WaitStatus) Signaled() bool {
return w&mask != stopped && w&mask != 0;
}
func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
func (w WaitStatus) Signal() int {
sig := int(w&mask);
@ -113,17 +107,11 @@ func (w WaitStatus) Signal() int {
return sig;
}
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) Stopped() bool {
return w&mask == stopped && w>>shift != SIGSTOP;
}
func (w WaitStatus) Stopped() bool { return w&mask == stopped && w>>shift != SIGSTOP }
func (w WaitStatus) Continued() bool {
return w&mask == stopped && w>>shift == SIGSTOP;
}
func (w WaitStatus) Continued() bool { return w&mask == stopped && w>>shift == SIGSTOP }
func (w WaitStatus) StopSignal() int {
if !w.Stopped() {