Main
function
#
Main parses flags and Go source files specified in the command-line
arguments, type-checks the parsed Go package, compiles functions to machine
code, and finally writes the compiled package definition to disk.
func Main(archInit func(*ssagen.ArchInfo))
addGCLocals
function
#
addGCLocals adds gcargs, gclocals, gcregs, and stack object symbols to Ctxt.Data.
This is done during the sequential phase after compilation, since
global symbols can't be declared during parallel compilation.
func addGCLocals()
compileFunctions
function
#
compileFunctions compiles all functions in compilequeue.
It fans out nBackendWorkers to do the work
and waits for them to complete.
func compileFunctions(profile *pgoir.Profile)
finishArchiveEntry
function
#
func finishArchiveEntry(bout *bio.Writer, start int64, name string)
handlePanic
function
#
handlePanic ensures that we print out an "internal compiler error" for any panic
or runtime exception during front-end compiler processing (unless there have
already been some compiler errors). It may also be invoked from the explicit panic in
hcrash(), in which case, we pass the panic on through.
func handlePanic()
prepareFunc
function
#
prepareFunc handles any remaining frontend compilation tasks that
aren't yet safe to perform concurrently.
func prepareFunc(fn *ir.Func)
startArchiveEntry
function
#
func startArchiveEntry(bout *bio.Writer) int64