2015-02-13 14:40:36 -05:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package gc
|
|
|
|
|
|
|
|
|
|
import (
|
2016-03-12 14:07:40 -08:00
|
|
|
"cmd/compile/internal/ssa"
|
2016-04-06 21:45:29 -07:00
|
|
|
"cmd/internal/bio"
|
2015-02-13 14:40:36 -05:00
|
|
|
"cmd/internal/obj"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
2015-03-05 10:39:23 -08:00
|
|
|
UINF = 100
|
|
|
|
|
BADWIDTH = -1000000000
|
|
|
|
|
MaxStackVarSize = 10 * 1024 * 1024
|
|
|
|
|
)
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
type Pkg struct {
|
2016-03-11 00:10:52 -05:00
|
|
|
Name string // package name, e.g. "sys"
|
|
|
|
|
Path string // string literal used in import statement, e.g. "runtime/internal/sys"
|
2016-03-31 10:02:10 -04:00
|
|
|
Pathsym *obj.LSym
|
2015-03-05 13:57:36 -05:00
|
|
|
Prefix string // escaped path for use in symbol table
|
2015-09-08 05:46:31 +02:00
|
|
|
Imported bool // export data of this package was parsed
|
|
|
|
|
Direct bool // imported directly
|
2015-03-02 16:21:15 -05:00
|
|
|
Syms map[string]*Sym
|
2015-02-13 14:40:36 -05:00
|
|
|
}
|
|
|
|
|
|
2016-04-05 12:48:49 -07:00
|
|
|
// Sym represents an object name. Most commonly, this is a Go identifier naming
|
|
|
|
|
// an object declared within a package, but Syms are also used to name internal
|
|
|
|
|
// synthesized objects.
|
|
|
|
|
//
|
2016-10-20 15:27:26 -07:00
|
|
|
// As an exception, field and method names that are exported use the Sym
|
2016-04-05 12:48:49 -07:00
|
|
|
// associated with localpkg instead of the package that declared them. This
|
|
|
|
|
// allows using Sym pointer equality to test for Go identifier uniqueness when
|
|
|
|
|
// handling selector expressions.
|
2015-02-13 14:40:36 -05:00
|
|
|
type Sym struct {
|
2016-03-01 16:37:20 -08:00
|
|
|
Flags SymFlags
|
2016-02-26 01:37:28 -08:00
|
|
|
Link *Sym
|
2015-03-05 13:57:36 -05:00
|
|
|
Importdef *Pkg // where imported definition was found
|
|
|
|
|
Linkname string // link name
|
|
|
|
|
|
|
|
|
|
// saved and restored by dcopy
|
2015-02-13 14:40:36 -05:00
|
|
|
Pkg *Pkg
|
2016-10-20 15:27:26 -07:00
|
|
|
Name string // object name
|
2015-03-05 13:57:36 -05:00
|
|
|
Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
|
|
|
|
|
Block int32 // blocknumber to catch redeclaration
|
|
|
|
|
Lastlineno int32 // last declaration for diagnostic
|
2016-03-10 15:07:08 -08:00
|
|
|
|
2016-10-26 17:14:35 -07:00
|
|
|
Label *Node // corresponding label (ephemeral)
|
|
|
|
|
Origpkg *Pkg // original package for . import
|
2016-03-10 15:07:08 -08:00
|
|
|
Lsym *obj.LSym
|
|
|
|
|
Fsym *Sym // funcsym
|
2015-02-13 14:40:36 -05:00
|
|
|
}
|
|
|
|
|
|
2016-03-01 16:37:20 -08:00
|
|
|
type SymFlags uint8
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
const (
|
2016-03-01 16:37:20 -08:00
|
|
|
SymExport SymFlags = 1 << iota // to be exported
|
|
|
|
|
SymPackage
|
|
|
|
|
SymExported // already written out by export
|
|
|
|
|
SymUniq
|
|
|
|
|
SymSiggen
|
|
|
|
|
SymAsm
|
|
|
|
|
SymAlgGen
|
2016-10-25 14:09:18 -07:00
|
|
|
SymAlias // alias, original is Sym.Def.Sym
|
2015-02-13 14:40:36 -05:00
|
|
|
)
|
|
|
|
|
|
2015-10-26 14:57:36 -07:00
|
|
|
// The Class of a variable/function describes the "storage class"
|
|
|
|
|
// of a variable or function. During parsing, storage classes are
|
|
|
|
|
// called declaration contexts.
|
|
|
|
|
type Class uint8
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
const (
|
2015-10-26 14:57:36 -07:00
|
|
|
Pxxx Class = iota
|
|
|
|
|
PEXTERN // global variable
|
|
|
|
|
PAUTO // local variables
|
cmd/compile: fix liveness computation for heap-escaped parameters
The liveness computation of parameters generally was never
correct, but forcing all parameters to be live throughout the
function covered up that problem. The new SSA back end is
too clever: even though it currently keeps the parameter values live
throughout the function, it may find optimizations that mean
the current values are not written back to the original parameter
stack slots immediately or ever (for example if a parameter is set
to nil, SSA constant propagation may replace all later uses of the
parameter with a constant nil, eliminating the need to write the nil
value back to the stack slot), so the liveness code must now
track the actual operations on the stack slots, exposing these
problems.
One small problem in the handling of arguments is that nodarg
can return ONAME PPARAM nodes with adjusted offsets, so that
there are actually multiple *Node pointers for the same parameter
in the instruction stream. This might be possible to correct, but
not in this CL. For now, we fix this by using n.Orig instead of n
when considering PPARAM and PPARAMOUT nodes.
The major problem in the handling of arguments is general
confusion in the liveness code about the meaning of PPARAM|PHEAP
and PPARAMOUT|PHEAP nodes, especially as contrasted with PAUTO|PHEAP.
The difference between these two is that when a local variable "moves"
to the heap, it's really just allocated there to start with; in contrast,
when an argument moves to the heap, the actual data has to be copied
there from the stack at the beginning of the function, and when a
result "moves" to the heap the value in the heap has to be copied
back to the stack when the function returns
This general confusion is also present in the SSA back end.
The PHEAP bit worked decently when I first introduced it 7 years ago (!)
in 391425ae. The back end did nothing sophisticated, and in particular
there was no analysis at all: no escape analysis, no liveness analysis,
and certainly no SSA back end. But the complications caused in the
various downstream consumers suggest that this should be a detail
kept mainly in the front end.
This CL therefore eliminates both the PHEAP bit and even the idea of
"heap variables" from the back ends.
First, it replaces the PPARAM|PHEAP, PPARAMOUT|PHEAP, and PAUTO|PHEAP
variable classes with the single PAUTOHEAP, a pseudo-class indicating
a variable maintained on the heap and available by indirecting a
local variable kept on the stack (a plain PAUTO).
Second, walkexpr replaces all references to PAUTOHEAP variables
with indirections of the corresponding PAUTO variable.
The back ends and the liveness code now just see plain indirected
variables. This may actually produce better code, but the real goal
here is to eliminate these little-used and somewhat suspect code
paths in the back end analyses.
The OPARAM node type goes away too.
A followup CL will do the same to PPARAMREF. I'm not sure that
the back ends (SSA in particular) are handling those right either,
and with the framework established in this CL that change is trivial
and the result clearly more correct.
Fixes #15747.
Change-Id: I2770b1ce3cbc93981bfc7166be66a9da12013d74
Reviewed-on: https://go-review.googlesource.com/23393
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-05-25 01:33:24 -04:00
|
|
|
PAUTOHEAP // local variable or parameter moved to heap
|
2015-10-26 14:57:36 -07:00
|
|
|
PPARAM // input arguments
|
|
|
|
|
PPARAMOUT // output results
|
|
|
|
|
PFUNC // global function
|
2015-03-05 13:57:36 -05:00
|
|
|
|
|
|
|
|
PDISCARD // discard during parse of duplicate import
|
2015-02-13 14:40:36 -05:00
|
|
|
)
|
|
|
|
|
|
2015-10-22 09:51:12 +09:00
|
|
|
// note this is the runtime representation
|
|
|
|
|
// of the compilers arrays.
|
|
|
|
|
//
|
|
|
|
|
// typedef struct
|
|
|
|
|
// { // must not move anything
|
|
|
|
|
// uchar array[8]; // pointer to data
|
|
|
|
|
// uchar nel[4]; // number of elements
|
|
|
|
|
// uchar cap[4]; // allocated number of elements
|
|
|
|
|
// } Array;
|
2016-09-16 00:33:29 +10:00
|
|
|
var array_array int // runtime offsetof(Array,array) - same for String
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var array_nel int // runtime offsetof(Array,nel) - same for String
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var array_cap int // runtime offsetof(Array,cap)
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var sizeof_Array int // runtime sizeof(Array)
|
|
|
|
|
|
2015-10-22 09:51:12 +09:00
|
|
|
// note this is the runtime representation
|
|
|
|
|
// of the compilers strings.
|
|
|
|
|
//
|
|
|
|
|
// typedef struct
|
|
|
|
|
// { // must not move anything
|
|
|
|
|
// uchar array[8]; // pointer to data
|
|
|
|
|
// uchar nel[4]; // number of elements
|
|
|
|
|
// } String;
|
2015-02-13 14:40:36 -05:00
|
|
|
var sizeof_String int // runtime sizeof(String)
|
|
|
|
|
|
|
|
|
|
var pragcgobuf string
|
|
|
|
|
|
|
|
|
|
var infile string
|
|
|
|
|
|
|
|
|
|
var outfile string
|
2016-04-26 21:50:59 -04:00
|
|
|
var linkobj string
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-08 19:14:03 +10:00
|
|
|
var bout *bio.Writer
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var nerrors int
|
|
|
|
|
|
|
|
|
|
var nsavederrors int
|
|
|
|
|
|
|
|
|
|
var nsyntaxerrors int
|
|
|
|
|
|
2015-05-14 19:33:31 -07:00
|
|
|
var decldepth int32
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var safemode bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var nolocalimports bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var Debug [256]int
|
|
|
|
|
|
|
|
|
|
var debugstr string
|
|
|
|
|
|
|
|
|
|
var Debug_checknil int
|
2015-03-20 00:06:10 -04:00
|
|
|
var Debug_typeassert int
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var localpkg *Pkg // package being compiled
|
|
|
|
|
|
|
|
|
|
var importpkg *Pkg // package being imported
|
|
|
|
|
|
2016-03-18 17:21:33 -07:00
|
|
|
var itabpkg *Pkg // fake pkg for itab entries
|
2016-03-17 06:18:13 -07:00
|
|
|
|
|
|
|
|
var itablinkpkg *Pkg // fake package for runtime itab entries
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
var Runtimepkg *Pkg // package runtime
|
|
|
|
|
|
|
|
|
|
var racepkg *Pkg // package runtime/race
|
|
|
|
|
|
2015-10-21 07:04:10 -07:00
|
|
|
var msanpkg *Pkg // package runtime/msan
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
var typepkg *Pkg // fake package for runtime type info (headers)
|
|
|
|
|
|
|
|
|
|
var unsafepkg *Pkg // package unsafe
|
|
|
|
|
|
|
|
|
|
var trackpkg *Pkg // fake package for field tracking
|
|
|
|
|
|
2016-04-19 08:31:04 -07:00
|
|
|
var mappkg *Pkg // fake package for map zero value
|
|
|
|
|
var zerosize int64
|
|
|
|
|
|
2015-09-24 23:21:18 +02:00
|
|
|
var Tptr EType // either TPTR32 or TPTR64
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var myimportpath string
|
|
|
|
|
|
|
|
|
|
var localimport string
|
|
|
|
|
|
|
|
|
|
var asmhdr string
|
|
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var simtype [NTYPE]EType
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-03-01 07:54:01 +00:00
|
|
|
var (
|
|
|
|
|
isforw [NTYPE]bool
|
2016-09-16 00:33:29 +10:00
|
|
|
isInt [NTYPE]bool
|
|
|
|
|
isFloat [NTYPE]bool
|
|
|
|
|
isComplex [NTYPE]bool
|
2015-03-01 07:54:01 +00:00
|
|
|
issimple [NTYPE]bool
|
|
|
|
|
)
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-03-01 07:54:01 +00:00
|
|
|
var (
|
|
|
|
|
okforeq [NTYPE]bool
|
|
|
|
|
okforadd [NTYPE]bool
|
|
|
|
|
okforand [NTYPE]bool
|
|
|
|
|
okfornone [NTYPE]bool
|
|
|
|
|
okforcmp [NTYPE]bool
|
|
|
|
|
okforbool [NTYPE]bool
|
|
|
|
|
okforcap [NTYPE]bool
|
|
|
|
|
okforlen [NTYPE]bool
|
|
|
|
|
okforarith [NTYPE]bool
|
|
|
|
|
okforconst [NTYPE]bool
|
|
|
|
|
)
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-03-01 07:54:01 +00:00
|
|
|
var (
|
|
|
|
|
okfor [OEND][]bool
|
|
|
|
|
iscmp [OEND]bool
|
|
|
|
|
)
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var minintval [NTYPE]*Mpint
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var maxintval [NTYPE]*Mpint
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var minfltval [NTYPE]*Mpflt
|
|
|
|
|
|
|
|
|
|
var maxfltval [NTYPE]*Mpflt
|
|
|
|
|
|
2016-03-09 20:29:21 -08:00
|
|
|
var xtop []*Node
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-08-12 14:29:50 -07:00
|
|
|
var exportlist []*Node
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-09-06 22:38:49 +02:00
|
|
|
var importlist []*Node // imported functions and methods with inlinable bodies
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-10-05 16:33:53 -07:00
|
|
|
var funcsyms []*Node
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-10-26 14:57:36 -07:00
|
|
|
var dclcontext Class // PEXTERN/PAUTO
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var statuniqgen int // name generator for static temps
|
|
|
|
|
|
2016-10-27 20:15:29 -07:00
|
|
|
var iota_ int64
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-03-09 20:29:21 -08:00
|
|
|
var lastconst []*Node
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var lasttype *Node
|
|
|
|
|
|
|
|
|
|
var Maxarg int64
|
|
|
|
|
|
|
|
|
|
var Stksize int64 // stack size for current frame
|
|
|
|
|
|
|
|
|
|
var stkptrsize int64 // prefix of stack containing pointers
|
|
|
|
|
|
2015-09-07 22:19:30 +02:00
|
|
|
var hasdefer bool // flag that curfn has defer statement
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var Curfn *Node
|
|
|
|
|
|
|
|
|
|
var Widthptr int
|
|
|
|
|
|
|
|
|
|
var Widthint int
|
|
|
|
|
|
|
|
|
|
var Widthreg int
|
|
|
|
|
|
|
|
|
|
var nblank *Node
|
|
|
|
|
|
2015-08-30 23:56:40 +02:00
|
|
|
var typecheckok bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var compiling_runtime bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var compiling_wrappers int
|
|
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var use_writebarrier bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var pure_go bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var flag_installsuffix string
|
|
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var flag_race bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var flag_msan bool
|
2015-10-21 07:04:10 -07:00
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var flag_largemodel bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-10-20 10:00:07 -07:00
|
|
|
// Whether we are adding any sort of code instrumentation, such as
|
|
|
|
|
// when the race detector is enabled.
|
|
|
|
|
var instrumenting bool
|
|
|
|
|
|
2015-02-13 14:40:36 -05:00
|
|
|
var debuglive int
|
|
|
|
|
|
|
|
|
|
var Ctxt *obj.Link
|
|
|
|
|
|
2016-04-13 18:37:18 -07:00
|
|
|
var writearchive bool
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var Nacl bool
|
|
|
|
|
|
2016-10-07 02:06:33 +09:00
|
|
|
var pc *obj.Prog
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
var nodfp *Node
|
|
|
|
|
|
2016-09-16 00:33:29 +10:00
|
|
|
var disable_checknil int
|
2015-02-13 14:40:36 -05:00
|
|
|
|
2015-10-22 09:51:12 +09:00
|
|
|
// interface to back end
|
2015-02-13 14:40:36 -05:00
|
|
|
|
|
|
|
|
const (
|
2015-03-05 13:57:36 -05:00
|
|
|
// Pseudo-op, like TEXT, GLOBL, TYPE, PCDATA, FUNCDATA.
|
|
|
|
|
Pseudo = 1 << 1
|
|
|
|
|
|
|
|
|
|
// There's nothing to say about the instruction,
|
|
|
|
|
// but it's still okay to see.
|
|
|
|
|
OK = 1 << 2
|
|
|
|
|
|
|
|
|
|
// Size of right-side write, or right-side read if no write.
|
|
|
|
|
SizeB = 1 << 3
|
|
|
|
|
SizeW = 1 << 4
|
|
|
|
|
SizeL = 1 << 5
|
|
|
|
|
SizeQ = 1 << 6
|
|
|
|
|
SizeF = 1 << 7
|
|
|
|
|
SizeD = 1 << 8
|
|
|
|
|
|
|
|
|
|
// Left side (Prog.from): address taken, read, write.
|
|
|
|
|
LeftAddr = 1 << 9
|
|
|
|
|
LeftRead = 1 << 10
|
|
|
|
|
LeftWrite = 1 << 11
|
|
|
|
|
|
|
|
|
|
// Register in middle (Prog.reg); only ever read. (arm, ppc64)
|
2015-02-13 14:40:36 -05:00
|
|
|
RegRead = 1 << 12
|
|
|
|
|
CanRegRead = 1 << 13
|
2015-03-05 13:57:36 -05:00
|
|
|
|
|
|
|
|
// Right side (Prog.to): address taken, read, write.
|
2015-02-13 14:40:36 -05:00
|
|
|
RightAddr = 1 << 14
|
|
|
|
|
RightRead = 1 << 15
|
|
|
|
|
RightWrite = 1 << 16
|
2015-03-05 13:57:36 -05:00
|
|
|
|
|
|
|
|
// Instruction kinds
|
|
|
|
|
Move = 1 << 17 // straight move
|
|
|
|
|
Conv = 1 << 18 // size conversion
|
|
|
|
|
Cjmp = 1 << 19 // conditional jump
|
|
|
|
|
Break = 1 << 20 // breaks control flow (no fallthrough)
|
|
|
|
|
Call = 1 << 21 // function call
|
|
|
|
|
Jump = 1 << 22 // jump
|
|
|
|
|
Skip = 1 << 23 // data instruction
|
|
|
|
|
|
|
|
|
|
// Set, use, or kill of carry bit.
|
|
|
|
|
// Kill means we never look at the carry bit after this kind of instruction.
|
2016-03-11 00:10:52 -05:00
|
|
|
// Originally for understanding ADC, RCR, and so on, but now also
|
|
|
|
|
// tracks set, use, and kill of the zero and overflow bits as well.
|
|
|
|
|
// TODO rename to {Set,Use,Kill}Flags
|
2015-03-05 13:57:36 -05:00
|
|
|
SetCarry = 1 << 24
|
|
|
|
|
UseCarry = 1 << 25
|
|
|
|
|
KillCarry = 1 << 26
|
|
|
|
|
|
|
|
|
|
// Special cases for register use. (amd64, 386)
|
|
|
|
|
ShiftCX = 1 << 27 // possible shift by CX
|
|
|
|
|
ImulAXDX = 1 << 28 // possible multiply into DX:AX
|
|
|
|
|
|
|
|
|
|
// Instruction updates whichever of from/to is type D_OREG. (ppc64)
|
|
|
|
|
PostInc = 1 << 29
|
2016-09-16 15:02:47 -07:00
|
|
|
|
|
|
|
|
// Optional 3rd input operand, only ever read.
|
|
|
|
|
From3Read = 1 << 30
|
2015-02-13 14:40:36 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Arch struct {
|
2016-04-06 12:01:40 -07:00
|
|
|
LinkArch *obj.LinkArch
|
|
|
|
|
|
2016-09-15 16:33:11 -07:00
|
|
|
REGSP int
|
|
|
|
|
MAXWIDTH int64
|
2015-03-18 17:26:36 -04:00
|
|
|
|
2016-09-15 16:37:17 -07:00
|
|
|
Defframe func(*obj.Prog)
|
2016-09-15 01:42:58 -07:00
|
|
|
Proginfo func(*obj.Prog) ProgInfo
|
|
|
|
|
Use387 bool // should 8g use 387 FP instructions instead of sse2.
|
2016-03-12 14:07:40 -08:00
|
|
|
|
|
|
|
|
// SSAMarkMoves marks any MOVXconst ops that need to avoid clobbering flags.
|
|
|
|
|
SSAMarkMoves func(*SSAGenState, *ssa.Block)
|
|
|
|
|
|
|
|
|
|
// SSAGenValue emits Prog(s) for the Value.
|
|
|
|
|
SSAGenValue func(*SSAGenState, *ssa.Value)
|
|
|
|
|
|
|
|
|
|
// SSAGenBlock emits end-of-block Progs. SSAGenValue should be called
|
|
|
|
|
// for all values in the block before SSAGenBlock.
|
|
|
|
|
SSAGenBlock func(s *SSAGenState, b, next *ssa.Block)
|
2015-02-13 14:40:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pcloc int32
|
|
|
|
|
|
|
|
|
|
var Thearch Arch
|
|
|
|
|
|
2016-10-28 11:37:45 -07:00
|
|
|
var (
|
|
|
|
|
Newproc,
|
|
|
|
|
Deferproc,
|
|
|
|
|
Deferreturn,
|
|
|
|
|
panicindex,
|
|
|
|
|
panicslice,
|
|
|
|
|
panicdivide,
|
|
|
|
|
growslice,
|
|
|
|
|
panicdottype,
|
|
|
|
|
panicnildottype,
|
|
|
|
|
assertE2I,
|
|
|
|
|
assertE2I2,
|
|
|
|
|
assertI2I,
|
|
|
|
|
assertI2I2 *Node
|
|
|
|
|
)
|