mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change Func.Inldcl from *[]*Node to Nodes
Change-Id: I055e986c3f27d5c07badcd1684f4fe1d65a917a9 Reviewed-on: https://go-review.googlesource.com/20523 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
fe5b4a6503
commit
ed4a27a8dd
2 changed files with 5 additions and 9 deletions
|
|
@ -151,9 +151,7 @@ func caninl(fn *Node) {
|
||||||
fn.Func.Nname.Func.Inl.Set(fn.Nbody.Slice())
|
fn.Func.Nname.Func.Inl.Set(fn.Nbody.Slice())
|
||||||
fn.Nbody.Set(inlcopylist(fn.Func.Nname.Func.Inl.Slice()))
|
fn.Nbody.Set(inlcopylist(fn.Func.Nname.Func.Inl.Slice()))
|
||||||
inldcl := inlcopylist(fn.Func.Nname.Name.Defn.Func.Dcl)
|
inldcl := inlcopylist(fn.Func.Nname.Name.Defn.Func.Dcl)
|
||||||
if len(inldcl) > 0 {
|
fn.Func.Nname.Func.Inldcl.Set(inldcl)
|
||||||
fn.Func.Nname.Func.Inldcl = &inldcl
|
|
||||||
}
|
|
||||||
fn.Func.Nname.Func.InlCost = int32(maxBudget - budget)
|
fn.Func.Nname.Func.InlCost = int32(maxBudget - budget)
|
||||||
|
|
||||||
// hack, TODO, check for better way to link method nodes back to the thing with the ->inl
|
// hack, TODO, check for better way to link method nodes back to the thing with the ->inl
|
||||||
|
|
@ -565,9 +563,7 @@ func mkinlcall1(np **Node, fn *Node, isddd bool) {
|
||||||
var dcl []*Node
|
var dcl []*Node
|
||||||
if fn.Name.Defn != nil {
|
if fn.Name.Defn != nil {
|
||||||
// local function
|
// local function
|
||||||
if fn.Func.Inldcl != nil {
|
dcl = fn.Func.Inldcl.Slice()
|
||||||
dcl = *fn.Func.Inldcl
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// imported function
|
// imported function
|
||||||
dcl = fn.Func.Dcl
|
dcl = fn.Func.Dcl
|
||||||
|
|
|
||||||
|
|
@ -151,9 +151,9 @@ type Func struct {
|
||||||
Shortname *Node
|
Shortname *Node
|
||||||
Enter Nodes // for example, allocate and initialize memory for escaping parameters
|
Enter Nodes // for example, allocate and initialize memory for escaping parameters
|
||||||
Exit Nodes
|
Exit Nodes
|
||||||
Cvars Nodes // closure params
|
Cvars Nodes // closure params
|
||||||
Dcl []*Node // autodcl for this func/closure
|
Dcl []*Node // autodcl for this func/closure
|
||||||
Inldcl *[]*Node // copy of dcl for use in inlining
|
Inldcl Nodes // copy of dcl for use in inlining
|
||||||
Closgen int
|
Closgen int
|
||||||
Outerfunc *Node
|
Outerfunc *Node
|
||||||
Fieldtrack []*Type
|
Fieldtrack []*Type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue