// Declaration stack & operations
-func dflag() bool {
- if Debug['d'] == 0 {
- return false
- }
- if Debug['y'] != 0 {
- return true
- }
- if incannedimport != 0 {
- return false
- }
- return true
-}
-
var externdcl []*Node
var blockgen int32 // max block number
func pushdcl(s *Sym) *Sym {
d := push()
dcopy(d, s)
- if dflag() {
- fmt.Printf("\t%v push %v %p\n", linestr(lineno), s, s.Def)
- }
return d
}
lno := s.Lastlineno
dcopy(s, d)
d.Lastlineno = lno
- if dflag() {
- fmt.Printf("\t%v pop %v %p\n", linestr(lineno), s, s.Def)
- }
}
if d == nil {
gen := 0
if ctxt == PEXTERN {
externdcl = append(externdcl, n)
- if dflag() {
- fmt.Printf("\t%v global decl %v %p\n", linestr(lineno), s, n)
- }
} else {
if Curfn == nil && ctxt == PAUTO {
Fatalf("automatic outside function")
obj.Flagcount("E", "debug symbol export", &Debug['E'])
obj.Flagfn1("I", "add `directory` to import search path", addidir)
obj.Flagcount("K", "debug missing line numbers", &Debug['K'])
- obj.Flagcount("L", "use full (long) path in error messages", &Debug['L'])
obj.Flagcount("M", "debug move generation", &Debug['M'])
obj.Flagcount("N", "disable optimizations", &Debug['N'])
obj.Flagcount("P", "debug peephole optimizer", &Debug['P'])
obj.Flagcount("w", "debug type checking", &Debug['w'])
flag.BoolVar(&use_writebarrier, "wb", true, "enable write barrier")
obj.Flagcount("x", "debug lexer", &Debug['x'])
- obj.Flagcount("y", "debug declarations in canned imports (with -d)", &Debug['y'])
var flag_shared bool
var flag_dynlink bool
if supportsDynlink(Thearch.LinkArch.Arch) {