Ai
2 Star 0 Fork 0

mirrors_chai2010/tinygo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ssa.go 443 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ayke van Laethem 提交于 2018-11-26 00:37 +08:00 . loader: switch to custom program loader
package loader
import (
"golang.org/x/tools/go/ssa"
)
// LoadSSA constructs the SSA form of the loaded packages.
//
// The program must already be parsed and type-checked with the .Parse() method.
func (p *Program) LoadSSA() *ssa.Program {
prog := ssa.NewProgram(p.fset, ssa.SanityCheckFunctions|ssa.BareInits|ssa.GlobalDebug)
for _, pkg := range p.Sorted() {
prog.CreatePackage(pkg.Pkg, pkg.Files, &pkg.Info, true)
}
return prog
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_chai2010/tinygo.git
git@gitee.com:mirrors_chai2010/tinygo.git
mirrors_chai2010
tinygo
tinygo
master

搜索帮助