Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1115)

Delta Between Two Patch Sets: src/pkg/exp/ssa/ssa.go

Issue 7229074: code review 7229074: exp/ssa: build fully pruned SSA form. (Closed)
Left Patch Set: diff -r dd18b993ba95 https://go.googlecode.com/hg/ Created 11 years, 1 month ago
Right Patch Set: diff -r 734059df2768 https://code.google.com/p/go/ Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/exp/ssa/sanity.go ('k') | src/pkg/exp/ssa/ssadump.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package ssa 1 package ssa
2 2
3 // This package defines a high-level intermediate representation for 3 // This package defines a high-level intermediate representation for
4 // Go programs using static single-assignment (SSA) form. 4 // Go programs using static single-assignment (SSA) form.
5 5
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "go/ast" 8 "go/ast"
9 "go/token" 9 "go/token"
10 "go/types" 10 "go/types"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // The order of Preds and Succs are significant (to Phi and If 260 // The order of Preds and Succs are significant (to Phi and If
261 // instructions, respectively). 261 // instructions, respectively).
262 // 262 //
263 type BasicBlock struct { 263 type BasicBlock struct {
264 Index int // index of this block within Func.Blocks 264 Index int // index of this block within Func.Blocks
265 Comment string // optional label; no semantic significance 265 Comment string // optional label; no semantic significance
266 Func *Function // containing function 266 Func *Function // containing function
267 Instrs []Instruction // instructions in order 267 Instrs []Instruction // instructions in order
268 Preds, Succs []*BasicBlock // predecessors and successors 268 Preds, Succs []*BasicBlock // predecessors and successors
269 succs2 [2]*BasicBlock // initial space for Succs. 269 succs2 [2]*BasicBlock // initial space for Succs.
270 » dom *domTree // node in dominator tree; optional. 270 » dom *domNode // node in dominator tree; optional.
271 gaps int // number of nil Instrs (transient). 271 gaps int // number of nil Instrs (transient).
272 } 272 }
273 273
274 // Pure values ---------------------------------------- 274 // Pure values ----------------------------------------
275 275
276 // A Capture is a pointer to a lexically enclosing local variable. 276 // A Capture is a pointer to a lexically enclosing local variable.
277 // 277 //
278 // The referent of a capture is an Alloc or another Capture and is 278 // The referent of a capture is an Alloc or another Capture and is
279 // always considered potentially escaping, so Captures are always 279 // always considered potentially escaping, so Captures are always
280 // addresses in the heap, and have pointer types. 280 // addresses in the heap, and have pointer types.
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 return append(rands, &s.Addr, &s.Val) 1264 return append(rands, &s.Addr, &s.Val)
1265 } 1265 }
1266 1266
1267 func (v *TypeAssert) Operands(rands []*Value) []*Value { 1267 func (v *TypeAssert) Operands(rands []*Value) []*Value {
1268 return append(rands, &v.X) 1268 return append(rands, &v.X)
1269 } 1269 }
1270 1270
1271 func (v *UnOp) Operands(rands []*Value) []*Value { 1271 func (v *UnOp) Operands(rands []*Value) []*Value {
1272 return append(rands, &v.X) 1272 return append(rands, &v.X)
1273 } 1273 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b