go.tools/ssa: new Function.Syntax() returns the declaring AST (debug mode) or just the Pos/End of the function's extent (otherwise).

R=gri
CC=golang-dev
https://golang.org/cl/16980043
diff --git a/ssa/ssa.go b/ssa/ssa.go
index e3624d4..d958e3a 100644
--- a/ssa/ssa.go
+++ b/ssa/ssa.go
@@ -268,6 +268,7 @@
 	pos       token.Pos
 
 	Synthetic string       // provenance of synthetic function; "" for true source functions
+	syntax    ast.Node     // *ast.Func{Decl,Lit}; replaced with simple ast.Node after build, unless debug mode
 	Enclosing *Function    // enclosing function if anon; nil if global
 	Pkg       *Package     // enclosing package; nil for shared funcs (wrappers and error.Error)
 	Prog      *Program     // enclosing program
@@ -283,7 +284,6 @@
 	currentBlock *BasicBlock             // where to emit code
 	objects      map[types.Object]Value  // addresses of local variables
 	namedResults []*Alloc                // tuple of named results
-	syntax       *funcSyntax             // abstract syntax trees for Go source functions
 	targets      *targets                // linked stack of branch targets
 	lblocks      map[*ast.Object]*lblock // labelled blocks
 }
@@ -1168,6 +1168,9 @@
 // consistency is maintained during transformation passes by the
 // ordinary SSA renaming machinery.)
 //
+// DebugRefs are generated only for functions built with debugging
+// enabled; see Package.SetDebugMode().
+//
 type DebugRef struct {
 	anInstruction
 	X      Value        // the value whose position we're declaring