GCProg int `help:"print dump of GC programs"`
Gossahash string `help:"hash value for use in debugging the compiler"`
InlFuncsWithClosures int `help:"allow functions with closures to be inlined" concurrent:"ok"`
+ InlStaticInit int `help:"allow static initialization of inlined calls"`
InterfaceCycles int `help:"allow anonymous interface cycles"`
Libfuzzer int `help:"enable coverage instrumentation for libfuzzer"`
LocationLists int `help:"print information about DWARF location list creation"`
Debug.ConcurrentOk = true
Debug.InlFuncsWithClosures = 1
+ Debug.InlStaticInit = 0
if buildcfg.Experiment.Unified {
Debug.Unified = 1
}
}
func (s *Schedule) staticAssignInlinedCall(l *ir.Name, loff int64, call *ir.InlinedCallExpr, typ *types.Type) bool {
+ if base.Debug.InlStaticInit == 0 {
+ return false
+ }
+
// Handle the special case of an inlined call of
// a function body with a single return statement,
// which turns into a single assignment plus a goto.
-// compiledir
+// compiledir -d=inlstaticinit=1
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1
+// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 -d=inlstaticinit=1
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
-// run
+// run -gcflags=-d=inlstaticinit=1
//go:build !gcflags_noopt
// Copyright 2010 The Go Authors. All rights reserved.