"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cmd/compile/internal/ssagen/pgen.go" between
go1.19.src.tar.gz and go1.19.1.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language.
Latest stable release (1.19).

pgen.go  (go1.19.src):pgen.go  (go1.19.1.src)
skipping to change at line 99 skipping to change at line 99
default: default:
base.FatalfAt(n.Pos(), "%v has unexpected Class %v", n, n.Class) base.FatalfAt(n.Pos(), "%v has unexpected Class %v", n, n.Class)
return false return false
} }
} }
func (s *ssafn) AllocFrame(f *ssa.Func) { func (s *ssafn) AllocFrame(f *ssa.Func) {
s.stksize = 0 s.stksize = 0
s.stkptrsize = 0 s.stkptrsize = 0
s.stkalign = int64(types.RegSize)
fn := s.curfn fn := s.curfn
// Mark the PAUTO's unused. // Mark the PAUTO's unused.
for _, ln := range fn.Dcl { for _, ln := range fn.Dcl {
if needAlloc(ln) { if needAlloc(ln) {
ln.SetUsed(false) ln.SetUsed(false)
} }
} }
for _, l := range f.RegAlloc { for _, l := range f.RegAlloc {
skipping to change at line 163 skipping to change at line 164
} }
if w == 0 && lastHasPtr { if w == 0 && lastHasPtr {
// Pad between a pointer-containing object and a zero-siz ed object. // Pad between a pointer-containing object and a zero-siz ed object.
// This prevents a pointer to the zero-sized object from being interpreted // This prevents a pointer to the zero-sized object from being interpreted
// as a pointer to the pointer-containing object (and cau sing it // as a pointer to the pointer-containing object (and cau sing it
// to be scanned when it shouldn't be). See issue 24993. // to be scanned when it shouldn't be). See issue 24993.
w = 1 w = 1
} }
s.stksize += w s.stksize += w
s.stksize = types.Rnd(s.stksize, n.Type().Alignment()) s.stksize = types.Rnd(s.stksize, n.Type().Alignment())
if n.Type().Alignment() > int64(types.RegSize) {
s.stkalign = n.Type().Alignment()
}
if n.Type().HasPointers() { if n.Type().HasPointers() {
s.stkptrsize = s.stksize s.stkptrsize = s.stksize
lastHasPtr = true lastHasPtr = true
} else { } else {
lastHasPtr = false lastHasPtr = false
} }
n.SetFrameOffset(-s.stksize) n.SetFrameOffset(-s.stksize)
} }
s.stksize = types.Rnd(s.stksize, int64(types.RegSize)) s.stksize = types.Rnd(s.stksize, s.stkalign)
s.stkptrsize = types.Rnd(s.stkptrsize, int64(types.RegSize)) s.stkptrsize = types.Rnd(s.stkptrsize, s.stkalign)
} }
const maxStackSize = 1 << 30 const maxStackSize = 1 << 30
// Compile builds an SSA backend function, // Compile builds an SSA backend function,
// uses it to generate a plist, // uses it to generate a plist,
// and flushes that plist to machine code. // and flushes that plist to machine code.
// worker indicates which of the backend workers is doing the processing. // worker indicates which of the backend workers is doing the processing.
func Compile(fn *ir.Func, worker int) { func Compile(fn *ir.Func, worker int) {
f := buildssa(fn, worker) f := buildssa(fn, worker)
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)