mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: addressed vars and closures
Cleaned up first-block-in-function code. Added cases for |PHEAP for PPARAM and PAUTO. Made PPARAMOUT act more like PAUTO for purposes of address generation and vardef placement. Added cases for OCLOSUREVAR and Ops for getting closure pointer. Closure ops are scheduled at top of entry block to capture DX. Wrote test that seems to show proper behavior for addressed parameters, locals, and returns. Change-Id: Iee93ebf9e3d9f74cfb4d1c1da8038eb278d8a857 Reviewed-on: https://go-review.googlesource.com/14650 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: David Chase <drchase@google.com>
This commit is contained in:
parent
04d6edc36d
commit
956f3199a3
13 changed files with 339 additions and 22 deletions
|
|
@ -148,7 +148,7 @@ type Param struct {
|
|||
// Func holds Node fields used only with function-like nodes.
|
||||
type Func struct {
|
||||
Shortname *Node
|
||||
Enter *NodeList
|
||||
Enter *NodeList // for example, allocate and initialize memory for escaping parameters
|
||||
Exit *NodeList
|
||||
Cvars *NodeList // closure params
|
||||
Dcl *NodeList // autodcl for this func/closure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue