}
w = 1 // anything will do
- // dummy type; should be replaced before use.
case TANY:
- if Debug['A'] == 0 {
- Fatalf("dowidth any")
- }
- w = 1 // anything will do
+ // dummy type; should be replaced before use.
+ Fatalf("dowidth any")
case TSTRING:
if sizeof_String == 0 {
import (
"bufio"
"bytes"
- "math/big"
"encoding/binary"
"fmt"
+ "math/big"
"sort"
"strings"
)
// export writes the exportlist for localpkg to out and returns the number of bytes written.
func export(out *bufio.Writer, trace bool) int {
p := exporter{
- out: out,
- strIndex: map[string]int{"": 0}, // empty string is mapped to 0
- pkgIndex: make(map[*Pkg]int),
- typIndex: make(map[*Type]int),
- // don't emit pos info for builtin packages
- // (not needed and avoids path name diffs in builtin.go between
- // Windows and non-Windows machines, exposed via builtin_test.go)
- posInfoFormat: Debug['A'] == 0,
+ out: out,
+ strIndex: map[string]int{"": 0}, // empty string is mapped to 0
+ pkgIndex: make(map[*Pkg]int),
+ typIndex: make(map[*Type]int),
+ posInfoFormat: true,
trace: trace,
}
import (
"bufio"
- "math/big"
"encoding/binary"
"fmt"
+ "math/big"
"strconv"
"strings"
)
return
}
- // -A is for cmd/gc/mkbuiltin script, so export everything
- if Debug['A'] != 0 || exportname(n.Sym.Name) || initname(n.Sym.Name) {
+ if exportname(n.Sym.Name) || initname(n.Sym.Name) {
exportsym(n)
}
if asmhdr != "" && n.Sym.Pkg == localpkg && n.Sym.Flags&SymAsm == 0 {
// mark the symbol so it is not reexported
if s.Def == nil {
- if Debug['A'] != 0 || exportname(s.Name) || initname(s.Name) {
+ if exportname(s.Name) || initname(s.Name) {
s.Flags |= SymExport
} else {
s.Flags |= SymPackage // package scope
}
func fninit(n []*Node) {
- if Debug['A'] != 0 {
- // sys.go or unsafe.go during compiler build
- return
- }
-
nf := initfix(n)
if !anyinit(nf) {
return
flag.BoolVar(&compiling_runtime, "+", false, "compiling runtime")
obj.Flagcount("%", "debug non-static initializers", &Debug['%'])
- obj.Flagcount("A", "for bootstrapping, allow 'any' type", &Debug['A'])
obj.Flagcount("B", "disable bounds checking", &Debug['B'])
flag.StringVar(&localimport, "D", "", "set relative `path` for local imports")
obj.Flagcount("E", "debug symbol export", &Debug['E'])
// so that the compiler can generate calls to them,
// but does not make them visible to user code.
func loadsys() {
- if Debug['A'] != 0 {
- return
- }
-
block = 1
iota_ = -1000000
return
}
- if Debug['A'] != 0 {
- return
- }
emitptrargsmap()
return
}
{"complex128", TCOMPLEX128},
{"bool", TBOOL},
{"string", TSTRING},
- {"any", TANY},
}
var typedefs = [...]struct {
idealstring = typ(TSTRING)
idealbool = typ(TBOOL)
+ Types[TANY] = typ(TANY)
s := Pkglookup("true", builtinpkg)
s.Def = nodbool(true)
// package block rather than emitting a redeclared symbol error.
for _, s := range builtinpkg.Syms {
- if s.Def == nil || (s.Name == "any" && Debug['A'] == 0) {
+ if s.Def == nil {
continue
}
s1 := lookup(s.Name)