MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / Build

Method Build

types/builder.go:2892–2906  ·  view source on GitHub ↗

Build calls Package.Build for each package in prog. Building occurs in parallel unless the BuildSerially mode flag was set. Build is intended for whole-program analysis; a typical compiler need only build a single package. Build is idempotent and thread-safe.

()

Source from the content-addressed store, hash-verified

2890// Build is idempotent and thread-safe.
2891//
2892func (prog *Program) Build() {
2893 var wg sync.WaitGroup
2894 for _, p := range prog.packages {
2895 if prog.mode&BuildSerially != 0 {
2896 p.Build(prog)
2897 } else {
2898 wg.Add(1)
2899 go func(p *SSAPackage) {
2900 p.Build(prog)
2901 wg.Done()
2902 }(p)
2903 }
2904 }
2905 wg.Wait()
2906}
2907
2908// Build builds SSA code for all functions and vars in package p.
2909//

Callers 15

TestInitFunction · 0.45
TestSyntheticFuncsFunction · 0.45
TestPhiEliminationFunction · 0.45
checkFilesMethod · 0.45
Example_loadPackagesFunction · 0.45
Example_loadWholeProgramFunction · 0.45
TestObjValueLookupFunction · 0.45
testValueForExprFunction · 0.45
TestEnclosingFunctionFunction · 0.45
TestStdlibSSAFunction · 0.45
TestPackagesFunction · 0.45
TestIssue28106Function · 0.45

Calls 1

AddMethod · 0.65

Tested by 14

TestInitFunction · 0.36
TestSyntheticFuncsFunction · 0.36
TestPhiEliminationFunction · 0.36
Example_loadPackagesFunction · 0.36
Example_loadWholeProgramFunction · 0.36
TestObjValueLookupFunction · 0.36
testValueForExprFunction · 0.36
TestEnclosingFunctionFunction · 0.36
TestStdlibSSAFunction · 0.36
TestPackagesFunction · 0.36
TestIssue28106Function · 0.36
TestSwitchesFunction · 0.36