mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj: convert fields of LSym from uint8 to bool
No performance regression measurable: name old time/op new time/op delta Template 432ms ± 3% 422ms ± 2% -2.34% (p=0.010 n=10+9) GoTypes 1.46s ± 1% 1.46s ± 1% ~ (p=0.796 n=10+10) Compiler 7.15s ± 1% 7.14s ± 1% ~ (p=0.447 n=10+9) Change-Id: I21b93cb989017b6fec2215de2423d87f25cf538c Reviewed-on: https://go-review.googlesource.com/21220 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8eec2bbfbc
commit
2326c24cc7
8 changed files with 54 additions and 42 deletions
|
|
@ -367,7 +367,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
|||
}
|
||||
|
||||
if cursym.Text.Mark&LEAF != 0 {
|
||||
cursym.Leaf = 1
|
||||
cursym.Leaf = true
|
||||
if autosize == 0 {
|
||||
break
|
||||
}
|
||||
|
|
@ -709,7 +709,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
|||
p.From.Type = obj.TYPE_MEM
|
||||
p.From.Reg = REGG
|
||||
p.From.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
|
||||
if ctxt.Cursym.Cfunc != 0 {
|
||||
if ctxt.Cursym.Cfunc {
|
||||
p.From.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
|
||||
}
|
||||
p.To.Type = obj.TYPE_REG
|
||||
|
|
@ -822,7 +822,7 @@ func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
|
|||
call.To.Type = obj.TYPE_BRANCH
|
||||
morestack := "runtime.morestack"
|
||||
switch {
|
||||
case ctxt.Cursym.Cfunc != 0:
|
||||
case ctxt.Cursym.Cfunc:
|
||||
morestack = "runtime.morestackc"
|
||||
case ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0:
|
||||
morestack = "runtime.morestack_noctxt"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue