示例#1
0
文件: pkg.go 项目: 272489711/e8vm
// NewPkg creates a package with a particular path name.
func NewPkg(path string) *Pkg {
	return &Pkg{
		path:    path,
		lib:     link8.NewPkg(path),
		strPool: newStrPool(path),
		datPool: newDatPool(path),
		g:       newGener(),
	}
}
示例#2
0
文件: pkg.go 项目: NickDaison/e8vm
// NewPkg creates a package with a particular path name.
func NewPkg(path string) *Pkg {
	ret := new(Pkg)
	ret.path = path
	ret.lib = link8.NewPkg(path)
	ret.strPool = newStrPool(path)

	ret.g = newGener()

	return ret
}
示例#3
0
文件: lib.go 项目: NickDaison/e8vm
// NewPkgObj creates a new package compile object
func newLib(p string) *lib {
	ret := new(lib)
	ret.Pkg = link8.NewPkg(p)
	ret.symbols = make(map[string]*sym8.Symbol)
	return ret
}