本文整理匯總了Golang中bootstrap/internal/obj.Prog.From3方法的典型用法代碼示例。如果您正苦於以下問題:Golang Prog.From3方法的具體用法?Golang Prog.From3怎麽用?Golang Prog.From3使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bootstrap/internal/obj.Prog
的用法示例。
在下文中一共展示了Prog.From3方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: compile
func compile(fn *Node) {
if Newproc == nil {
Newproc = Sysfunc("newproc")
Deferproc = Sysfunc("deferproc")
Deferreturn = Sysfunc("deferreturn")
Panicindex = Sysfunc("panicindex")
panicslice = Sysfunc("panicslice")
throwreturn = Sysfunc("throwreturn")
}
lno := setlineno(fn)
Curfn = fn
dowidth(Curfn.Type)
var oldstksize int64
var nod1 Node
var ptxt *obj.Prog
var pl *obj.Plist
var p *obj.Prog
var n *Node
var nam *Node
var gcargs *Sym
var gclocals *Sym
if fn.Nbody == nil {
if pure_go != 0 || strings.HasPrefix(fn.Func.Nname.Sym.Name, "init.") {
Yyerror("missing function body for %q", fn.Func.Nname.Sym.Name)
goto ret
}
if Debug['A'] != 0 {
goto ret
}
emitptrargsmap()
goto ret
}
saveerrors()
// set up domain for labels
clearlabels()
if Curfn.Type.Outnamed {
// add clearing of the output parameters
var save Iter
t := Structfirst(&save, Getoutarg(Curfn.Type))
for t != nil {
if t.Nname != nil {
n = Nod(OAS, t.Nname, nil)
typecheck(&n, Etop)
Curfn.Nbody = concat(list1(n), Curfn.Nbody)
}
t = structnext(&save)
}
}
order(Curfn)
if nerrors != 0 {
goto ret
}
hasdefer = false
walk(Curfn)
if nerrors != 0 {
goto ret
}
if instrumenting {
instrument(Curfn)
}
if nerrors != 0 {
goto ret
}
continpc = nil
breakpc = nil
pl = newplist()
pl.Name = Linksym(Curfn.Func.Nname.Sym)
setlineno(Curfn)
Nodconst(&nod1, Types[TINT32], 0)
nam = Curfn.Func.Nname
if isblank(nam) {
nam = nil
}
ptxt = Thearch.Gins(obj.ATEXT, nam, &nod1)
Afunclit(&ptxt.From, Curfn.Func.Nname)
ptxt.From3 = new(obj.Addr)
if fn.Func.Dupok {
ptxt.From3.Offset |= obj.DUPOK
}
if fn.Func.Wrapper {
ptxt.From3.Offset |= obj.WRAPPER
}
if fn.Func.Needctxt {
ptxt.From3.Offset |= obj.NEEDCTXT
}
//.........這裏部分代碼省略.........