[dev.ssa] Merge remote-tracking branch 'origin/master' into mbranch
Semi-regular merge of tip into dev.ssa.
Change-Id: Iec8e4266426bed233892e7dbe4448d16c8b89018
diff --git a/src/cmd/compile/internal/gc/align.go b/src/cmd/compile/internal/gc/align.go
index 892595a..741c5dd 100644
--- a/src/cmd/compile/internal/gc/align.go
+++ b/src/cmd/compile/internal/gc/align.go
@@ -71,8 +71,8 @@
// in typecheck.c. usually addrescapes runs after
// widstruct, in which case we could drop this,
// but function closure functions are the exception.
- if f.Nname.Param.Stackparam != nil {
- f.Nname.Param.Stackparam.Xoffset = o
+ if f.Nname.Name.Param.Stackparam != nil {
+ f.Nname.Name.Param.Stackparam.Xoffset = o
f.Nname.Xoffset = 0
} else {
f.Nname.Xoffset = o
@@ -432,6 +432,7 @@
Types[TUNSAFEPTR] = t
t.Sym = Pkglookup("Pointer", unsafepkg)
t.Sym.Def = typenod(t)
+ t.Sym.Def.Name = new(Name)
dowidth(Types[TUNSAFEPTR])
@@ -654,6 +655,7 @@
dowidth(t)
Types[etype] = t
s1.Def = typenod(t)
+ s1.Def.Name = new(Name)
}
Array_array = int(Rnd(0, int64(Widthptr)))
diff --git a/src/cmd/compile/internal/gc/cgen.go b/src/cmd/compile/internal/gc/cgen.go
index ca58b1c..4160ae9 100644
--- a/src/cmd/compile/internal/gc/cgen.go
+++ b/src/cmd/compile/internal/gc/cgen.go
@@ -542,7 +542,7 @@
var n1 Node
Regalloc(&n1, Types[Tptr], res)
p1 := Thearch.Gins(Thearch.Optoas(OAS, n1.Type), nil, &n1)
- Datastring(nl.Val.U.(string), &p1.From)
+ Datastring(nl.Val().U.(string), &p1.From)
p1.From.Type = obj.TYPE_ADDR
Thearch.Gmove(&n1, res)
Regfree(&n1)
@@ -1036,7 +1036,7 @@
if Isconst(nl, CTSTR) {
Fatal("constant string constant index")
}
- v := uint64(Mpgetfix(nr.Val.U.(*Mpint)))
+ v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
var n2 Node
if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
if Debug['B'] == 0 && !n.Bounded {
@@ -1072,7 +1072,7 @@
if Debug['B'] == 0 && !n.Bounded {
// check bounds
if Isconst(nl, CTSTR) {
- Nodconst(&n4, Types[TUINT32], int64(len(nl.Val.U.(string))))
+ Nodconst(&n4, Types[TUINT32], int64(len(nl.Val().U.(string))))
} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
n1 = n3
n1.Op = OINDREG
@@ -1097,7 +1097,7 @@
if Isconst(nl, CTSTR) {
Regalloc(&n3, Types[Tptr], res)
p1 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &n3)
- Datastring(nl.Val.U.(string), &p1.From)
+ Datastring(nl.Val().U.(string), &p1.From)
p1.From.Type = obj.TYPE_ADDR
} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
n1 = n3
@@ -1188,7 +1188,7 @@
if Isconst(nl, CTSTR) {
Fatal("constant string constant index") // front end should handle
}
- v := uint64(Mpgetfix(nr.Val.U.(*Mpint)))
+ v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
if Debug['B'] == 0 && !n.Bounded {
nlen := n3
@@ -1233,7 +1233,7 @@
var nlen Node
if Isconst(nl, CTSTR) {
- Nodconst(&nlen, t, int64(len(nl.Val.U.(string))))
+ Nodconst(&nlen, t, int64(len(nl.Val().U.(string))))
} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
nlen = n3
nlen.Type = t
@@ -1253,7 +1253,7 @@
if Isconst(nl, CTSTR) {
Regalloc(&n3, Types[Tptr], res)
p1 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &n3)
- Datastring(nl.Val.U.(string), &p1.From)
+ Datastring(nl.Val().U.(string), &p1.From)
p1.From.Type = obj.TYPE_ADDR
Thearch.Gins(Thearch.Optoas(OADD, n3.Type), &n2, &n3)
goto indexdone1
@@ -1378,7 +1378,7 @@
if Isconst(nl, CTSTR) {
Fatal("constant string constant index") // front end should handle
}
- v := uint64(Mpgetfix(nr.Val.U.(*Mpint)))
+ v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
if Debug['B'] == 0 && !n.Bounded {
p1 := Thearch.Ginscmp(OGT, Types[Simtype[TUINT]], &nlen, Nodintconst(int64(v)), +1)
@@ -1416,7 +1416,7 @@
t = Types[TUINT64]
}
if Isconst(nl, CTSTR) {
- Nodconst(&nlen, t, int64(len(nl.Val.U.(string))))
+ Nodconst(&nlen, t, int64(len(nl.Val().U.(string))))
} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
// nlen already initialized
} else {
@@ -1431,7 +1431,7 @@
if Isconst(nl, CTSTR) {
Regalloc(&n3, Types[Tptr], res)
p1 := Thearch.Gins(Thearch.Optoas(OAS, n3.Type), nil, &n3) // XXX was LEAQ!
- Datastring(nl.Val.U.(string), &p1.From)
+ Datastring(nl.Val().U.(string), &p1.From)
p1.From.Type = obj.TYPE_ADDR
Thearch.Gins(Thearch.Optoas(OADD, n3.Type), &n2, &n3)
goto indexdone
@@ -1574,9 +1574,9 @@
case ONAME:
// should only get here with names in this func.
- if n.Funcdepth > 0 && n.Funcdepth != Funcdepth {
+ if n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {
Dump("bad agen", n)
- Fatal("agen: bad ONAME funcdepth %d != %d", n.Funcdepth, Funcdepth)
+ Fatal("agen: bad ONAME funcdepth %d != %d", n.Name.Funcdepth, Funcdepth)
}
// should only get here for heap vars or paramref
@@ -1718,7 +1718,7 @@
// Compute &a[i] as &a + i*width.
a.Type = n.Type
- a.Xoffset += Mpgetfix(n.Right.Val.U.(*Mpint)) * n.Type.Width
+ a.Xoffset += Mpgetfix(n.Right.Val().U.(*Mpint)) * n.Type.Width
Fixlargeoffset(a)
return
}
@@ -1868,11 +1868,11 @@
Fatal("bgen: non-bool const %v\n", Nconv(n, obj.FmtLong))
}
if genval {
- Cgen(Nodbool(wantTrue == n.Val.U.(bool)), res)
+ Cgen(Nodbool(wantTrue == n.Val().U.(bool)), res)
return
}
// If n == wantTrue, jump; otherwise do nothing.
- if wantTrue == n.Val.U.(bool) {
+ if wantTrue == n.Val().U.(bool) {
Patch(Gbranch(obj.AJMP, nil, likely), to)
}
return
@@ -2007,6 +2007,7 @@
var n1 Node
Regalloc(&n1, nl.Type, nil)
Cgen(nl, &n1)
+ nl = &n1
var tmp Node
Tempname(&tmp, nl.Type)
@@ -2016,6 +2017,7 @@
var n2 Node
Regalloc(&n2, nr.Type, nil)
Cgen(nr, &n2)
+ nr = &n2
Regfree(&n2)
Regalloc(&n1, nl.Type, nil)
@@ -2206,7 +2208,7 @@
return off
}
if Isconst(n.Right, CTINT) {
- return off + t.Type.Width*Mpgetfix(n.Right.Val.U.(*Mpint))
+ return off + t.Type.Width*Mpgetfix(n.Right.Val().U.(*Mpint))
}
return +1000 // on stack but not sure exactly where
@@ -2661,7 +2663,7 @@
case TUINT64:
var m Magic
m.W = w
- m.Ud = uint64(Mpgetfix(nr.Val.U.(*Mpint)))
+ m.Ud = uint64(Mpgetfix(nr.Val().U.(*Mpint)))
Umagic(&m)
if m.Bad != 0 {
break
@@ -2699,7 +2701,7 @@
case TINT64:
var m Magic
m.W = w
- m.Sd = Mpgetfix(nr.Val.U.(*Mpint))
+ m.Sd = Mpgetfix(nr.Val().U.(*Mpint))
Smagic(&m)
if m.Bad != 0 {
break
@@ -3048,7 +3050,7 @@
return
}
if n.Op == OSLICESTR && Isconst(n.Left, CTSTR) {
- Nodconst(&xlen, indexRegType, int64(len(n.Left.Val.U.(string))))
+ Nodconst(&xlen, indexRegType, int64(len(n.Left.Val().U.(string))))
return
}
regalloc(&xlen, indexRegType, nil)
@@ -3204,20 +3206,20 @@
if n.Op == OSLICEARR || n.Op == OSLICE3ARR {
bound = n.Left.Type.Type.Bound
} else if n.Op == OSLICESTR && Isconst(n.Left, CTSTR) {
- bound = int64(len(n.Left.Val.U.(string)))
+ bound = int64(len(n.Left.Val().U.(string)))
}
if Isconst(&i, CTINT) {
- if mpcmpfixc(i.Val.U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(i.Val.U.(*Mpint), bound) > 0 {
+ if mpcmpfixc(i.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(i.Val().U.(*Mpint), bound) > 0 {
Yyerror("slice index out of bounds")
}
}
if Isconst(&j, CTINT) {
- if mpcmpfixc(j.Val.U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(j.Val.U.(*Mpint), bound) > 0 {
+ if mpcmpfixc(j.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(j.Val().U.(*Mpint), bound) > 0 {
Yyerror("slice index out of bounds")
}
}
if Isconst(&k, CTINT) {
- if mpcmpfixc(k.Val.U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(k.Val.U.(*Mpint), bound) > 0 {
+ if mpcmpfixc(k.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(k.Val().U.(*Mpint), bound) > 0 {
Yyerror("slice index out of bounds")
}
}
@@ -3226,7 +3228,7 @@
same := func(n1, n2 *Node) bool {
return n1.Op == OREGISTER && n2.Op == OREGISTER && n1.Reg == n2.Reg ||
n1.Op == ONAME && n2.Op == ONAME && n1.Orig == n2.Orig && n1.Type == n2.Type && n1.Xoffset == n2.Xoffset ||
- n1.Op == OLITERAL && n2.Op == OLITERAL && Mpcmpfixfix(n1.Val.U.(*Mpint), n2.Val.U.(*Mpint)) == 0
+ n1.Op == OLITERAL && n2.Op == OLITERAL && Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint)) == 0
}
// obvious reports whether n1 <= n2 is obviously true,
@@ -3245,7 +3247,7 @@
return true // len(x) <= cap(x) always true
}
if Isconst(n1, CTINT) && Isconst(n2, CTINT) {
- if Mpcmpfixfix(n1.Val.U.(*Mpint), n2.Val.U.(*Mpint)) <= 0 {
+ if Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint)) <= 0 {
return true // n1, n2 constants such that n1 <= n2
}
Yyerror("slice index out of bounds")
@@ -3258,11 +3260,11 @@
// n1 might be a 64-bit constant, even on 32-bit architectures,
// but it will be represented in 32 bits.
if Ctxt.Arch.Regsize == 4 && Is64(n1.Type) {
- if mpcmpfixc(n1.Val.U.(*Mpint), 1<<31) >= 0 {
+ if mpcmpfixc(n1.Val().U.(*Mpint), 1<<31) >= 0 {
Fatal("missed slice out of bounds check")
}
var tmp Node
- Nodconst(&tmp, indexRegType, Mpgetfix(n1.Val.U.(*Mpint)))
+ Nodconst(&tmp, indexRegType, Mpgetfix(n1.Val().U.(*Mpint)))
n1 = &tmp
}
p := Thearch.Ginscmp(OGT, indexRegType, n1, n2, -1)
@@ -3346,9 +3348,9 @@
switch j.Op {
case OLITERAL:
if Isconst(&i, CTINT) {
- Nodconst(&j, indexRegType, Mpgetfix(j.Val.U.(*Mpint))-Mpgetfix(i.Val.U.(*Mpint)))
+ Nodconst(&j, indexRegType, Mpgetfix(j.Val().U.(*Mpint))-Mpgetfix(i.Val().U.(*Mpint)))
if Debug_slice > 0 {
- Warn("slice: result len == %d", Mpgetfix(j.Val.U.(*Mpint)))
+ Warn("slice: result len == %d", Mpgetfix(j.Val().U.(*Mpint)))
}
break
}
@@ -3363,7 +3365,7 @@
fallthrough
case OREGISTER:
if i.Op == OLITERAL {
- v := Mpgetfix(i.Val.U.(*Mpint))
+ v := Mpgetfix(i.Val().U.(*Mpint))
if v != 0 {
ginscon(Thearch.Optoas(OSUB, indexRegType), v, &j)
}
@@ -3406,9 +3408,9 @@
switch k.Op {
case OLITERAL:
if Isconst(&i, CTINT) {
- Nodconst(&k, indexRegType, Mpgetfix(k.Val.U.(*Mpint))-Mpgetfix(i.Val.U.(*Mpint)))
+ Nodconst(&k, indexRegType, Mpgetfix(k.Val().U.(*Mpint))-Mpgetfix(i.Val().U.(*Mpint)))
if Debug_slice > 0 {
- Warn("slice: result cap == %d", Mpgetfix(k.Val.U.(*Mpint)))
+ Warn("slice: result cap == %d", Mpgetfix(k.Val().U.(*Mpint)))
}
break
}
@@ -3429,7 +3431,7 @@
Warn("slice: result cap == 0")
}
} else if i.Op == OLITERAL {
- v := Mpgetfix(i.Val.U.(*Mpint))
+ v := Mpgetfix(i.Val().U.(*Mpint))
if v != 0 {
ginscon(Thearch.Optoas(OSUB, indexRegType), v, &k)
}
@@ -3512,7 +3514,7 @@
w = res.Type.Type.Width // res is []T, elem size is T.width
}
if Isconst(&i, CTINT) {
- ginscon(Thearch.Optoas(OADD, xbase.Type), Mpgetfix(i.Val.U.(*Mpint))*w, &xbase)
+ ginscon(Thearch.Optoas(OADD, xbase.Type), Mpgetfix(i.Val().U.(*Mpint))*w, &xbase)
} else if Thearch.AddIndex != nil && Thearch.AddIndex(&i, w, &xbase) {
// done by back end
} else if w == 1 {
diff --git a/src/cmd/compile/internal/gc/closure.go b/src/cmd/compile/internal/gc/closure.go
index 64cd972..601154b 100644
--- a/src/cmd/compile/internal/gc/closure.go
+++ b/src/cmd/compile/internal/gc/closure.go
@@ -17,8 +17,8 @@
var a *Node
n := Nod(OCLOSURE, nil, nil)
- n.Param.Ntype = ntype
- n.Funcdepth = Funcdepth
+ n.Func.Ntype = ntype
+ n.Func.Depth = Funcdepth
n.Func.Outerfunc = Curfn
funchdr(n)
@@ -72,8 +72,8 @@
var v *Node
for l := func_.Func.Cvars; l != nil; l = l.Next {
v = l.N
- v.Param.Closure.Param.Closure = v.Param.Outer
- v.Param.Outerexpr = oldname(v.Sym)
+ v.Name.Param.Closure.Name.Param.Closure = v.Name.Param.Outer
+ v.Name.Param.Outerexpr = oldname(v.Sym)
}
return func_
@@ -83,7 +83,7 @@
var n *Node
for l := func_.Func.Cvars; l != nil; l = l.Next {
- n = l.N.Param.Closure
+ n = l.N.Name.Param.Closure
if !n.Name.Captured {
n.Name.Captured = true
if n.Name.Decldepth == 0 {
@@ -105,9 +105,9 @@
}
oldfn := Curfn
- typecheck(&func_.Param.Ntype, Etype)
- func_.Type = func_.Param.Ntype.Type
- func_.Param.Top = top
+ typecheck(&func_.Func.Ntype, Etype)
+ func_.Type = func_.Func.Ntype.Type
+ func_.Func.Top = top
// Type check the body now, but only if we're inside a function.
// At top level (in a variable initialization: curfn==nil) we're not
@@ -150,14 +150,14 @@
gen = closurename_closgen
} else if n.Func.Outerfunc.Op == ODCLFUNC {
// The outermost closure inside of a named function.
- outer = n.Func.Outerfunc.Nname.Sym.Name
+ outer = n.Func.Outerfunc.Func.Nname.Sym.Name
prefix = "func"
// Yes, functions can be named _.
// Can't use function closgen in such case,
// because it would lead to name clashes.
- if !isblank(n.Func.Outerfunc.Nname) {
+ if !isblank(n.Func.Outerfunc.Func.Nname) {
n.Func.Outerfunc.Func.Closgen++
gen = n.Func.Outerfunc.Func.Closgen
} else {
@@ -191,13 +191,13 @@
// create the function
xfunc := Nod(ODCLFUNC, nil, nil)
- xfunc.Nname = newfuncname(closurename(func_))
- xfunc.Nname.Sym.Flags |= SymExported // disable export
- xfunc.Nname.Param.Ntype = xtype
- xfunc.Nname.Defn = xfunc
- declare(xfunc.Nname, PFUNC)
- xfunc.Nname.Funcdepth = func_.Funcdepth
- xfunc.Funcdepth = func_.Funcdepth
+ xfunc.Func.Nname = newfuncname(closurename(func_))
+ xfunc.Func.Nname.Sym.Flags |= SymExported // disable export
+ xfunc.Func.Nname.Name.Param.Ntype = xtype
+ xfunc.Func.Nname.Name.Defn = xfunc
+ declare(xfunc.Func.Nname, PFUNC)
+ xfunc.Func.Nname.Name.Funcdepth = func_.Func.Depth
+ xfunc.Func.Depth = func_.Func.Depth
xfunc.Func.Endlineno = func_.Func.Endlineno
xfunc.Nbody = func_.Nbody
@@ -207,8 +207,8 @@
}
typecheck(&xfunc, Etop)
- xfunc.Param.Closure = func_
- func_.Param.Closure = xfunc
+ xfunc.Func.Closure = func_
+ func_.Func.Closure = xfunc
func_.Nbody = nil
func_.List = nil
@@ -229,7 +229,7 @@
lno := int(lineno)
lineno = xfunc.Lineno
- func_ := xfunc.Param.Closure
+ func_ := xfunc.Func.Closure
func_.Func.Enter = nil
for l := func_.Func.Cvars; l != nil; l = l.Next {
v = l.N
@@ -249,27 +249,27 @@
// so that the outer frame also grabs them and knows they escape.
dowidth(v.Type)
- outer = v.Param.Outerexpr
- v.Param.Outerexpr = nil
+ outer = v.Name.Param.Outerexpr
+ v.Name.Param.Outerexpr = nil
// out parameters will be assigned to implicitly upon return.
- if outer.Class != PPARAMOUT && !v.Param.Closure.Addrtaken && !v.Param.Closure.Assigned && v.Type.Width <= 128 {
+ if outer.Class != PPARAMOUT && !v.Name.Param.Closure.Addrtaken && !v.Name.Param.Closure.Assigned && v.Type.Width <= 128 {
v.Name.Byval = true
} else {
- v.Param.Closure.Addrtaken = true
+ v.Name.Param.Closure.Addrtaken = true
outer = Nod(OADDR, outer, nil)
}
if Debug['m'] > 1 {
var name *Sym
- if v.Curfn != nil && v.Curfn.Nname != nil {
- name = v.Curfn.Nname.Sym
+ if v.Name.Curfn != nil && v.Name.Curfn.Func.Nname != nil {
+ name = v.Name.Curfn.Func.Nname.Sym
}
how := "ref"
if v.Name.Byval {
how = "value"
}
- Warnl(int(v.Lineno), "%v capturing by %s: %v (addr=%v assign=%v width=%d)", name, how, v.Sym, v.Param.Closure.Addrtaken, v.Param.Closure.Assigned, int32(v.Type.Width))
+ Warnl(int(v.Lineno), "%v capturing by %s: %v (addr=%v assign=%v width=%d)", name, how, v.Sym, v.Name.Param.Closure.Addrtaken, v.Name.Param.Closure.Assigned, int32(v.Type.Width))
}
typecheck(&outer, Erv)
@@ -284,9 +284,9 @@
func transformclosure(xfunc *Node) {
lno := int(lineno)
lineno = xfunc.Lineno
- func_ := xfunc.Param.Closure
+ func_ := xfunc.Func.Closure
- if func_.Param.Top&Ecall != 0 {
+ if func_.Func.Top&Ecall != 0 {
// If the closure is directly called, we transform it to a plain function call
// with variables passed as args. This avoids allocation of a closure object.
// Here we do only a part of the transformation. Walk of OCALLFUNC(OCLOSURE)
@@ -303,7 +303,7 @@
// }(42, byval, &byref)
// f is ONAME of the actual function.
- f := xfunc.Nname
+ f := xfunc.Func.Nname
// Get pointer to input arguments and rewind to the end.
// We are going to append captured variables to input args.
@@ -395,10 +395,10 @@
// Declare variable holding addresses taken from closure
// and initialize in entry prologue.
addr = newname(Lookupf("&%s", v.Sym.Name))
- addr.Param.Ntype = Nod(OIND, typenod(v.Type), nil)
+ addr.Name.Param.Ntype = Nod(OIND, typenod(v.Type), nil)
addr.Class = PAUTO
addr.Used = true
- addr.Curfn = xfunc
+ addr.Name.Curfn = xfunc
xfunc.Func.Dcl = list(xfunc.Func.Dcl, addr)
v.Name.Heapaddr = addr
if v.Name.Byval {
@@ -420,7 +420,7 @@
func walkclosure(func_ *Node, init **NodeList) *Node {
// If no closure vars, don't bother wrapping.
if func_.Func.Cvars == nil {
- return func_.Param.Closure.Nname
+ return func_.Func.Closure.Func.Nname
}
// Create closure in the form of a composite literal.
@@ -457,7 +457,7 @@
clos := Nod(OCOMPLIT, nil, Nod(OIND, typ, nil))
clos.Esc = func_.Esc
clos.Right.Implicit = true
- clos.List = concat(list1(Nod(OCFUNC, func_.Param.Closure.Nname, nil)), func_.Func.Enter)
+ clos.List = concat(list1(Nod(OCFUNC, func_.Func.Closure.Func.Nname, nil)), func_.Func.Enter)
// Force type conversion from *struct to the func type.
clos = Nod(OCONVNOP, clos, nil)
@@ -472,11 +472,11 @@
// non-escaping temp to use, if any.
// orderexpr did not compute the type; fill it in now.
- if func_.Alloc != nil {
- func_.Alloc.Type = clos.Left.Left.Type
- func_.Alloc.Orig.Type = func_.Alloc.Type
- clos.Left.Right = func_.Alloc
- func_.Alloc = nil
+ if x := prealloc[func_]; x != nil {
+ x.Type = clos.Left.Left.Type
+ x.Orig.Type = x.Type
+ clos.Left.Right = x
+ delete(prealloc, func_)
}
walkexpr(&clos, init)
@@ -494,11 +494,11 @@
}
// Create top-level function.
- fn.Nname = makepartialcall(fn, fn.Type, sym)
-
+ xfunc := makepartialcall(fn, fn.Type, sym)
+ fn.Func = xfunc.Func
fn.Right = sym
fn.Op = OCALLPART
- fn.Type = fn.Nname.Type
+ fn.Type = xfunc.Type
}
var makepartialcall_gopkg *Pkg
@@ -581,11 +581,11 @@
xtype.Rlist = l
xfunc.Func.Dupok = true
- xfunc.Nname = newfuncname(sym)
- xfunc.Nname.Sym.Flags |= SymExported // disable export
- xfunc.Nname.Param.Ntype = xtype
- xfunc.Nname.Defn = xfunc
- declare(xfunc.Nname, PFUNC)
+ xfunc.Func.Nname = newfuncname(sym)
+ xfunc.Func.Nname.Sym.Flags |= SymExported // disable export
+ xfunc.Func.Nname.Name.Param.Ntype = xtype
+ xfunc.Func.Nname.Name.Defn = xfunc
+ declare(xfunc.Func.Nname, PFUNC)
// Declare and initialize variable holding receiver.
@@ -602,14 +602,14 @@
ptr.Addable = true
ptr.Ullman = 1
ptr.Used = true
- ptr.Curfn = xfunc
+ ptr.Name.Curfn = xfunc
xfunc.Func.Dcl = list(xfunc.Func.Dcl, ptr)
var body *NodeList
if Isptr[rcvrtype.Etype] || Isinter(rcvrtype) {
- ptr.Param.Ntype = typenod(rcvrtype)
+ ptr.Name.Param.Ntype = typenod(rcvrtype)
body = list(body, Nod(OAS, ptr, cv))
} else {
- ptr.Param.Ntype = typenod(Ptrto(rcvrtype))
+ ptr.Name.Param.Ntype = typenod(Ptrto(rcvrtype))
body = list(body, Nod(OAS, ptr, Nod(OADDR, cv, nil)))
}
@@ -660,7 +660,7 @@
clos := Nod(OCOMPLIT, nil, Nod(OIND, typ, nil))
clos.Esc = n.Esc
clos.Right.Implicit = true
- clos.List = list1(Nod(OCFUNC, n.Nname.Nname, nil))
+ clos.List = list1(Nod(OCFUNC, n.Func.Nname, nil))
clos.List = list(clos.List, n.Left)
// Force type conversion from *struct to the func type.
@@ -676,11 +676,11 @@
// non-escaping temp to use, if any.
// orderexpr did not compute the type; fill it in now.
- if n.Alloc != nil {
- n.Alloc.Type = clos.Left.Left.Type
- n.Alloc.Orig.Type = n.Alloc.Type
- clos.Left.Right = n.Alloc
- n.Alloc = nil
+ if x := prealloc[n]; x != nil {
+ x.Type = clos.Left.Left.Type
+ x.Orig.Type = x.Type
+ clos.Left.Right = x
+ delete(prealloc, n)
}
walkexpr(&clos, init)
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go
index b3605ab..9eb4983 100644
--- a/src/cmd/compile/internal/gc/const.go
+++ b/src/cmd/compile/internal/gc/const.go
@@ -16,7 +16,7 @@
if !Isconst(n, CTINT) {
Fatal("Int(%v)", n)
}
- return Mpgetfix(n.Val.U.(*Mpint))
+ return Mpgetfix(n.Val().U.(*Mpint))
}
// SetInt sets n's value to i.
@@ -25,7 +25,7 @@
if !Isconst(n, CTINT) {
Fatal("SetInt(%v)", n)
}
- Mpmovecfix(n.Val.U.(*Mpint), i)
+ Mpmovecfix(n.Val().U.(*Mpint), i)
}
// SetBigInt sets n's value to x.
@@ -34,7 +34,7 @@
if !Isconst(n, CTINT) {
Fatal("SetBigInt(%v)", n)
}
- n.Val.U.(*Mpint).Val.Set(x)
+ n.Val().U.(*Mpint).Val.Set(x)
}
// Bool returns n as an bool.
@@ -43,7 +43,7 @@
if !Isconst(n, CTBOOL) {
Fatal("Int(%v)", n)
}
- return n.Val.U.(bool)
+ return n.Val().U.(bool)
}
/*
@@ -56,7 +56,6 @@
}
var v Val
- v.Ctype = CTFLT
v.U = oldv
overflow(v, t)
@@ -136,8 +135,8 @@
case OLSH, ORSH:
convlit1(&n.Left, t, explicit && isideal(n.Left.Type))
t = n.Left.Type
- if t != nil && t.Etype == TIDEAL && n.Val.Ctype != CTINT {
- n.Val = toint(n.Val)
+ if t != nil && t.Etype == TIDEAL && n.Val().Ctype() != CTINT {
+ n.SetVal(toint(n.Val()))
}
if t != nil && !Isint[t.Etype] {
Yyerror("invalid operation: %v (shift of type %v)", n, t)
@@ -227,9 +226,8 @@
// if it is an unsafe.Pointer
case TUINTPTR:
if n.Type.Etype == TUNSAFEPTR {
- n.Val.U = new(Mpint)
- Mpmovecfix(n.Val.U.(*Mpint), 0)
- n.Val.Ctype = CTINT
+ n.SetVal(Val{new(Mpint)})
+ Mpmovecfix(n.Val().U.(*Mpint), 0)
} else {
goto bad
}
@@ -244,19 +242,19 @@
if n.Type.Etype == TUNSAFEPTR && t.Etype != TUINTPTR {
goto bad
}
- ct := int(n.Val.Ctype)
+ ct := int(n.Val().Ctype())
if Isint[et] {
switch ct {
default:
goto bad
case CTCPLX, CTFLT, CTRUNE:
- n.Val = toint(n.Val)
+ n.SetVal(toint(n.Val()))
fallthrough
// flowthrough
case CTINT:
- overflow(n.Val, t)
+ overflow(n.Val(), t)
}
} else if Isfloat[et] {
switch ct {
@@ -264,12 +262,12 @@
goto bad
case CTCPLX, CTINT, CTRUNE:
- n.Val = toflt(n.Val)
+ n.SetVal(toflt(n.Val()))
fallthrough
// flowthrough
case CTFLT:
- n.Val.U = truncfltlit(n.Val.U.(*Mpflt), t)
+ n.SetVal(Val{truncfltlit(n.Val().U.(*Mpflt), t)})
}
} else if Iscomplex[et] {
switch ct {
@@ -277,13 +275,13 @@
goto bad
case CTFLT, CTINT, CTRUNE:
- n.Val = tocplx(n.Val)
+ n.SetVal(tocplx(n.Val()))
case CTCPLX:
- overflow(n.Val, t)
+ overflow(n.Val(), t)
}
} else if et == TSTRING && (ct == CTINT || ct == CTRUNE) && explicit {
- n.Val = tostr(n.Val)
+ n.SetVal(tostr(n.Val()))
} else {
goto bad
}
@@ -307,10 +305,11 @@
}
func copyval(v Val) Val {
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
i := new(Mpint)
mpmovefixfix(i, v.U.(*Mpint))
+ i.Rune = v.U.(*Mpint).Rune
v.U = i
case CTFLT:
@@ -329,19 +328,17 @@
}
func tocplx(v Val) Val {
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
c := new(Mpcplx)
Mpmovefixflt(&c.Real, v.U.(*Mpint))
Mpmovecflt(&c.Imag, 0.0)
- v.Ctype = CTCPLX
v.U = c
case CTFLT:
c := new(Mpcplx)
mpmovefltflt(&c.Real, v.U.(*Mpflt))
Mpmovecflt(&c.Imag, 0.0)
- v.Ctype = CTCPLX
v.U = c
}
@@ -349,11 +346,10 @@
}
func toflt(v Val) Val {
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
f := newMpflt()
Mpmovefixflt(f, v.U.(*Mpint))
- v.Ctype = CTFLT
v.U = f
case CTCPLX:
@@ -362,7 +358,6 @@
if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) != 0 {
Yyerror("constant %v%vi truncated to real", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp|obj.FmtSign))
}
- v.Ctype = CTFLT
v.U = f
}
@@ -370,16 +365,17 @@
}
func toint(v Val) Val {
- switch v.Ctype {
+ switch v.Ctype() {
case CTRUNE:
- v.Ctype = CTINT
+ i := new(Mpint)
+ mpmovefixfix(i, v.U.(*Mpint))
+ v.U = i
case CTFLT:
i := new(Mpint)
if mpmovefltfix(i, v.U.(*Mpflt)) < 0 {
Yyerror("constant %v truncated to integer", Fconv(v.U.(*Mpflt), obj.FmtSharp))
}
- v.Ctype = CTINT
v.U = i
case CTCPLX:
@@ -390,7 +386,6 @@
if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) != 0 {
Yyerror("constant %v%vi truncated to real", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp|obj.FmtSign))
}
- v.Ctype = CTINT
v.U = i
}
@@ -398,7 +393,7 @@
}
func doesoverflow(v Val, t *Type) bool {
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
if !Isint[t.Etype] {
Fatal("overflow: %v integer constant", t)
@@ -443,7 +438,7 @@
return
}
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
Yyerror("constant %v overflows %v", v.U.(*Mpint), t)
@@ -456,14 +451,13 @@
}
func tostr(v Val) Val {
- switch v.Ctype {
+ switch v.Ctype() {
case CTINT, CTRUNE:
if Mpcmpfixfix(v.U.(*Mpint), Minintval[TINT]) < 0 || Mpcmpfixfix(v.U.(*Mpint), Maxintval[TINT]) > 0 {
Yyerror("overflow in int -> string")
}
r := uint(Mpgetfix(v.U.(*Mpint)))
v = Val{}
- v.Ctype = CTSTR
v.U = string(r)
case CTFLT:
@@ -472,7 +466,6 @@
case CTNIL:
v = Val{}
- v.Ctype = CTSTR
v.U = ""
}
@@ -483,7 +476,7 @@
if n == nil || n.Op != OLITERAL {
return -1
}
- return int(n.Val.Ctype)
+ return int(n.Val().Ctype())
}
func Isconst(n *Node, ct int) bool {
@@ -562,15 +555,14 @@
l2 = l1
for l2 != nil && Isconst(l2.N, CTSTR) {
nr = l2.N
- strs = append(strs, nr.Val.U.(string))
+ strs = append(strs, nr.Val().U.(string))
l2 = l2.Next
}
nl = Nod(OXXX, nil, nil)
*nl = *l1.N
nl.Orig = nl
- nl.Val.Ctype = CTSTR
- nl.Val.U = strings.Join(strs, "")
+ nl.SetVal(Val{strings.Join(strs, "")})
l1.N = nl
l1.Next = l2
}
@@ -584,7 +576,7 @@
// collapse single-constant list to single constant.
if count(n.List) == 1 && Isconst(n.List.N, CTSTR) {
n.Op = OLITERAL
- n.Val = n.List.N.Val
+ n.SetVal(n.List.N.Val())
}
return
@@ -611,13 +603,13 @@
if nr == nil {
// copy numeric value to avoid modifying
// nl, in case someone still refers to it (e.g. iota).
- v = nl.Val
+ v = nl.Val()
if wl == TIDEAL {
v = copyval(v)
}
- switch uint32(n.Op)<<16 | uint32(v.Ctype) {
+ switch uint32(n.Op)<<16 | uint32(v.Ctype()) {
default:
if n.Diag == 0 {
Yyerror("illegal constant expression %v %v", Oconv(int(n.Op), 0), nl.Type)
@@ -642,7 +634,7 @@
OCONV<<16 | CTSTR:
convlit1(&nl, n.Type, true)
- v = nl.Val
+ v = nl.Val()
case OPLUS<<16 | CTINT,
OPLUS<<16 | CTRUNE:
@@ -743,55 +735,63 @@
if nr.Type != nil && (Issigned[nr.Type.Etype] || !Isint[nr.Type.Etype]) {
goto illegal
}
- if nl.Val.Ctype != CTRUNE {
- nl.Val = toint(nl.Val)
+ if nl.Val().Ctype() != CTRUNE {
+ nl.SetVal(toint(nl.Val()))
}
- nr.Val = toint(nr.Val)
+ nr.SetVal(toint(nr.Val()))
}
// copy numeric value to avoid modifying
// n->left, in case someone still refers to it (e.g. iota).
- v = nl.Val
+ v = nl.Val()
if wl == TIDEAL {
v = copyval(v)
}
- rv = nr.Val
+ rv = nr.Val()
// convert to common ideal
- if v.Ctype == CTCPLX || rv.Ctype == CTCPLX {
+ if v.Ctype() == CTCPLX || rv.Ctype() == CTCPLX {
v = tocplx(v)
rv = tocplx(rv)
}
- if v.Ctype == CTFLT || rv.Ctype == CTFLT {
+ if v.Ctype() == CTFLT || rv.Ctype() == CTFLT {
v = toflt(v)
rv = toflt(rv)
}
// Rune and int turns into rune.
- if v.Ctype == CTRUNE && rv.Ctype == CTINT {
- rv.Ctype = CTRUNE
+ if v.Ctype() == CTRUNE && rv.Ctype() == CTINT {
+ i := new(Mpint)
+ mpmovefixfix(i, rv.U.(*Mpint))
+ i.Rune = true
+ rv.U = i
}
- if v.Ctype == CTINT && rv.Ctype == CTRUNE {
+ if v.Ctype() == CTINT && rv.Ctype() == CTRUNE {
if n.Op == OLSH || n.Op == ORSH {
- rv.Ctype = CTINT
+ i := new(Mpint)
+ mpmovefixfix(i, rv.U.(*Mpint))
+ rv.U = i
} else {
- v.Ctype = CTRUNE
+ i := new(Mpint)
+ mpmovefixfix(i, v.U.(*Mpint))
+ i.Rune = true
+ v.U = i
}
}
- if v.Ctype != rv.Ctype {
+ if v.Ctype() != rv.Ctype() {
// Use of undefined name as constant?
- if (v.Ctype == 0 || rv.Ctype == 0) && nerrors > 0 {
+ if (v.Ctype() == 0 || rv.Ctype() == 0) && nerrors > 0 {
return
}
- Fatal("constant type mismatch %v(%d) %v(%d)", nl.Type, v.Ctype, nr.Type, rv.Ctype)
+ Fatal("constant type mismatch %v(%d) %v(%d)", nl.Type, v.Ctype(), nr.Type, rv.Ctype())
}
// run op
- switch uint32(n.Op)<<16 | uint32(v.Ctype) {
+ switch uint32(n.Op)<<16 | uint32(v.Ctype()) {
default:
goto illegal
@@ -1066,7 +1066,7 @@
// restore value of n->orig.
n.Orig = norig
- n.Val = v
+ n.SetVal(v)
// check range.
lno = int(setlineno(n))
@@ -1075,8 +1075,8 @@
lineno = int32(lno)
// truncate precision for non-ideal float.
- if v.Ctype == CTFLT && n.Type.Etype != TIDEAL {
- n.Val.U = truncfltlit(v.U.(*Mpflt), n.Type)
+ if v.Ctype() == CTFLT && n.Type.Etype != TIDEAL {
+ n.SetVal(Val{truncfltlit(v.U.(*Mpflt), n.Type)})
}
return
@@ -1103,10 +1103,10 @@
func nodlit(v Val) *Node {
n := Nod(OLITERAL, nil, nil)
- n.Val = v
- switch v.Ctype {
+ n.SetVal(v)
+ switch v.Ctype() {
default:
- Fatal("nodlit ctype %d", v.Ctype)
+ Fatal("nodlit ctype %d", v.Ctype())
case CTSTR:
n.Type = idealstring
@@ -1131,11 +1131,10 @@
c := new(Mpcplx)
n := Nod(OLITERAL, nil, nil)
n.Type = Types[TIDEAL]
- n.Val.U = c
- n.Val.Ctype = CTCPLX
+ n.SetVal(Val{c})
- if r.Ctype != CTFLT || i.Ctype != CTFLT {
- Fatal("nodcplxlit ctype %d/%d", r.Ctype, i.Ctype)
+ if r.Ctype() != CTFLT || i.Ctype() != CTFLT {
+ Fatal("nodcplxlit ctype %d/%d", r.Ctype(), i.Ctype())
}
mpmovefltflt(&c.Real, r.U.(*Mpflt))
@@ -1155,7 +1154,7 @@
return CTxxx
case OLITERAL:
- return int(n.Val.Ctype)
+ return int(n.Val().Ctype())
// numeric kinds.
case OADD,
@@ -1230,7 +1229,7 @@
return
}
- if n.Val.Ctype == CTNIL {
+ if n.Val().Ctype() == CTNIL {
lineno = int32(lno)
if n.Diag == 0 {
Yyerror("use of untyped nil")
@@ -1241,7 +1240,7 @@
break
}
- if n.Val.Ctype == CTSTR {
+ if n.Val().Ctype() == CTSTR {
t1 := Types[TSTRING]
Convlit(np, t1)
break
@@ -1283,17 +1282,17 @@
if t != nil {
if Isint[t.Etype] {
t1 = t
- n.Val = toint(n.Val)
+ n.SetVal(toint(n.Val()))
} else if Isfloat[t.Etype] {
t1 = t
- n.Val = toflt(n.Val)
+ n.SetVal(toflt(n.Val()))
} else if Iscomplex[t.Etype] {
t1 = t
- n.Val = tocplx(n.Val)
+ n.SetVal(tocplx(n.Val()))
}
}
- overflow(n.Val, t1)
+ overflow(n.Val(), t1)
Convlit(np, t1)
lineno = int32(lno)
return
@@ -1354,7 +1353,7 @@
}
func cmpslit(l, r *Node) int {
- return stringsCompare(l.Val.U.(string), r.Val.U.(string))
+ return stringsCompare(l.Val().U.(string), r.Val().U.(string))
}
func Smallintconst(n *Node) bool {
@@ -1371,7 +1370,7 @@
return true
case TIDEAL, TINT64, TUINT64, TPTR64:
- if Mpcmpfixfix(n.Val.U.(*Mpint), Minintval[TINT32]) < 0 || Mpcmpfixfix(n.Val.U.(*Mpint), Maxintval[TINT32]) > 0 {
+ if Mpcmpfixfix(n.Val().U.(*Mpint), Minintval[TINT32]) < 0 || Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT32]) > 0 {
break
}
return true
@@ -1394,10 +1393,10 @@
TINT64,
TUINT64,
TIDEAL:
- if Mpcmpfixfix(n.Val.U.(*Mpint), Minintval[TUINT32]) < 0 || Mpcmpfixfix(n.Val.U.(*Mpint), Maxintval[TINT32]) > 0 {
+ if Mpcmpfixfix(n.Val().U.(*Mpint), Minintval[TUINT32]) < 0 || Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT32]) > 0 {
break
}
- return int(Mpgetfix(n.Val.U.(*Mpint)))
+ return int(Mpgetfix(n.Val().U.(*Mpint)))
}
}
@@ -1444,47 +1443,46 @@
Nodconst(con, Types[TINT8], 0)
con.Type = t
- con.Val = n.Val
+ con.SetVal(n.Val())
if Isint[tt] {
- con.Val.Ctype = CTINT
- con.Val.U = new(Mpint)
+ con.SetVal(Val{new(Mpint)})
var i int64
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
default:
- Fatal("convconst ctype=%d %v", n.Val.Ctype, Tconv(t, obj.FmtLong))
+ Fatal("convconst ctype=%d %v", n.Val().Ctype(), Tconv(t, obj.FmtLong))
case CTINT, CTRUNE:
- i = Mpgetfix(n.Val.U.(*Mpint))
+ i = Mpgetfix(n.Val().U.(*Mpint))
case CTBOOL:
- i = int64(obj.Bool2int(n.Val.U.(bool)))
+ i = int64(obj.Bool2int(n.Val().U.(bool)))
case CTNIL:
i = 0
}
i = iconv(i, tt)
- Mpmovecfix(con.Val.U.(*Mpint), i)
+ Mpmovecfix(con.Val().U.(*Mpint), i)
return
}
if Isfloat[tt] {
- con.Val = toflt(con.Val)
- if con.Val.Ctype != CTFLT {
- Fatal("convconst ctype=%d %v", con.Val.Ctype, t)
+ con.SetVal(toflt(con.Val()))
+ if con.Val().Ctype() != CTFLT {
+ Fatal("convconst ctype=%d %v", con.Val().Ctype(), t)
}
if tt == TFLOAT32 {
- con.Val.U = truncfltlit(con.Val.U.(*Mpflt), t)
+ con.SetVal(Val{truncfltlit(con.Val().U.(*Mpflt), t)})
}
return
}
if Iscomplex[tt] {
- con.Val = tocplx(con.Val)
+ con.SetVal(tocplx(con.Val()))
if tt == TCOMPLEX64 {
- con.Val.U.(*Mpcplx).Real = *truncfltlit(&con.Val.U.(*Mpcplx).Real, Types[TFLOAT32])
- con.Val.U.(*Mpcplx).Imag = *truncfltlit(&con.Val.U.(*Mpcplx).Imag, Types[TFLOAT32])
+ con.Val().U.(*Mpcplx).Real = *truncfltlit(&con.Val().U.(*Mpcplx).Real, Types[TFLOAT32])
+ con.Val().U.(*Mpcplx).Imag = *truncfltlit(&con.Val().U.(*Mpcplx).Imag, Types[TFLOAT32])
}
return
}
@@ -1636,13 +1634,13 @@
}
case OLITERAL:
- if n.Val.Ctype != CTNIL {
+ if n.Val().Ctype() != CTNIL {
return true
}
case ONAME:
l := n.Sym.Def
- if l != nil && l.Op == OLITERAL && n.Val.Ctype != CTNIL {
+ if l != nil && l.Op == OLITERAL && n.Val().Ctype() != CTNIL {
return true
}
diff --git a/src/cmd/compile/internal/gc/cplx.go b/src/cmd/compile/internal/gc/cplx.go
index 56a4892..1643f26 100644
--- a/src/cmd/compile/internal/gc/cplx.go
+++ b/src/cmd/compile/internal/gc/cplx.go
@@ -89,8 +89,8 @@
t := Types[tc]
if nc.Op == OLITERAL {
- nodfconst(nr, t, &nc.Val.U.(*Mpcplx).Real)
- nodfconst(ni, t, &nc.Val.U.(*Mpcplx).Imag)
+ nodfconst(nr, t, &nc.Val().U.(*Mpcplx).Real)
+ nodfconst(ni, t, &nc.Val().U.(*Mpcplx).Imag)
return
}
@@ -226,8 +226,7 @@
n.Op = OLITERAL
n.Addable = true
ullmancalc(n)
- n.Val.U = fval
- n.Val.Ctype = CTFLT
+ n.SetVal(Val{fval})
n.Type = t
if !Isfloat[t.Etype] {
diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go
index 4a9cb29..cba8e21 100644
--- a/src/cmd/compile/internal/gc/dcl.go
+++ b/src/cmd/compile/internal/gc/dcl.go
@@ -174,6 +174,10 @@
return
}
+ if n.Name == nil {
+ // named OLITERAL needs Name; most OLITERALs don't.
+ n.Name = new(Name)
+ }
n.Lineno = int32(parserline())
s := n.Sym
@@ -207,7 +211,7 @@
gen = vargen
}
pushdcl(s)
- n.Curfn = Curfn
+ n.Name.Curfn = Curfn
}
if ctxt == PAUTO {
@@ -225,8 +229,8 @@
s.Block = block
s.Lastlineno = int32(parserline())
s.Def = n
- n.Vargen = int32(gen)
- n.Funcdepth = Funcdepth
+ n.Name.Vargen = int32(gen)
+ n.Name.Funcdepth = Funcdepth
n.Class = uint8(ctxt)
autoexport(n, ctxt)
@@ -260,8 +264,8 @@
v = vl.N
v.Op = ONAME
declare(v, dclcontext)
- v.Param.Ntype = t
- v.Defn = as2
+ v.Name.Param.Ntype = t
+ v.Name.Defn = as2
if Funcdepth > 0 {
init = list(init, Nod(ODCL, v, nil))
}
@@ -288,7 +292,7 @@
v = vl.N
v.Op = ONAME
declare(v, dclcontext)
- v.Param.Ntype = t
+ v.Name.Param.Ntype = t
if e != nil || Funcdepth > 0 || isblank(v) {
if Funcdepth > 0 {
@@ -297,7 +301,7 @@
e = Nod(OAS, v, e)
init = list(init, e)
if e.Right != nil {
- v.Defn = e
+ v.Name.Defn = e
}
}
}
@@ -343,8 +347,8 @@
v.Op = OLITERAL
declare(v, dclcontext)
- v.Param.Ntype = t
- v.Defn = c
+ v.Name.Param.Ntype = t
+ v.Name.Defn = c
vv = list(vv, Nod(ODCLCONST, v, nil))
}
@@ -379,6 +383,7 @@
func newfuncname(s *Sym) *Node {
n := newname(s)
n.Func = new(Func)
+ n.Func.FCurfn = Curfn
return n
}
@@ -419,38 +424,37 @@
// walkdef will check s->def again once
// all the input source has been processed.
n = newname(s)
-
n.Op = ONONAME
- n.Iota = iota_ // save current iota value in const declarations
+ n.Name.Iota = iota_ // save current iota value in const declarations
}
- if Curfn != nil && n.Funcdepth > 0 && n.Funcdepth != Funcdepth && n.Op == ONAME {
+ if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {
// inner func is referring to var in outer func.
//
// TODO(rsc): If there is an outer variable x and we
// are parsing x := 5 inside the closure, until we get to
// the := it looks like a reference to the outer x so we'll
// make x a closure variable unnecessarily.
- if n.Param.Closure == nil || n.Param.Closure.Funcdepth != Funcdepth {
+ if n.Name.Param.Closure == nil || n.Name.Param.Closure.Name.Funcdepth != Funcdepth {
// create new closure var.
c := Nod(ONAME, nil, nil)
c.Sym = s
c.Class = PPARAMREF
c.Isddd = n.Isddd
- c.Defn = n
+ c.Name.Defn = n
c.Addable = false
c.Ullman = 2
- c.Funcdepth = Funcdepth
- c.Param.Outer = n.Param.Closure
- n.Param.Closure = c
- c.Param.Closure = n
+ c.Name.Funcdepth = Funcdepth
+ c.Name.Param.Outer = n.Name.Param.Closure
+ n.Name.Param.Closure = c
+ c.Name.Param.Closure = n
c.Xoffset = 0
Curfn.Func.Cvars = list(Curfn.Func.Cvars, c)
}
// return ref to closure var, not original
- return n.Param.Closure
+ return n.Name.Param.Closure
}
return n
@@ -508,7 +512,7 @@
nnew++
n = newname(n.Sym)
declare(n, dclcontext)
- n.Defn = defn
+ n.Name.Defn = defn
defn.Ninit = list(defn.Ninit, Nod(ODCL, n, nil))
l.N = n
}
@@ -552,10 +556,11 @@
}
n.Func = new(Func)
+ n.Func.FCurfn = Curfn
dclcontext = PPARAM
markdcl()
Funcdepth++
- n.Param.Outer = Curfn
+ n.Func.Outer = Curfn
Curfn = n
funcargs(n.Right)
@@ -584,13 +589,13 @@
markdcl()
Funcdepth++
- n.Param.Outer = Curfn
+ n.Func.Outer = Curfn
Curfn = n
- if n.Nname != nil {
- funcargs(n.Nname.Param.Ntype)
- } else if n.Param.Ntype != nil {
- funcargs(n.Param.Ntype)
+ if n.Func.Nname != nil {
+ funcargs(n.Func.Nname.Name.Param.Ntype)
+ } else if n.Func.Ntype != nil {
+ funcargs(n.Func.Ntype)
} else {
funcargs2(n.Type)
}
@@ -616,11 +621,11 @@
}
if n.Left != nil {
n.Left.Op = ONAME
- n.Left.Param.Ntype = n.Right
+ n.Left.Name.Param.Ntype = n.Right
declare(n.Left, PPARAM)
if dclcontext == PAUTO {
vargen++
- n.Left.Vargen = int32(vargen)
+ n.Left.Name.Vargen = int32(vargen)
}
}
}
@@ -633,11 +638,11 @@
}
if n.Left != nil {
n.Left.Op = ONAME
- n.Left.Param.Ntype = n.Right
+ n.Left.Name.Param.Ntype = n.Right
declare(n.Left, PPARAM)
if dclcontext == PAUTO {
vargen++
- n.Left.Vargen = int32(vargen)
+ n.Left.Name.Vargen = int32(vargen)
}
}
}
@@ -680,11 +685,11 @@
n.Left = nn
}
- n.Left.Param.Ntype = n.Right
+ n.Left.Name.Param.Ntype = n.Right
declare(n.Left, PPARAMOUT)
if dclcontext == PAUTO {
i++
- n.Left.Vargen = int32(i)
+ n.Left.Name.Vargen = int32(i)
}
}
}
@@ -748,8 +753,8 @@
}
popdcl()
Funcdepth--
- Curfn = n.Param.Outer
- n.Param.Outer = nil
+ Curfn = n.Func.Outer
+ n.Func.Outer = nil
if Funcdepth == 0 {
dclcontext = PEXTERN
}
@@ -771,7 +776,7 @@
* return the ODCLTYPE node to use.
*/
func typedcl1(n *Node, t *Node, local bool) *Node {
- n.Param.Ntype = t
+ n.Name.Param.Ntype = t
n.Local = local
return Nod(ODCLTYPE, n, nil)
}
@@ -828,10 +833,10 @@
f.Broke = 1
}
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
case CTSTR:
f.Note = new(string)
- *f.Note = n.Val.U.(string)
+ *f.Note = n.Val().U.(string)
default:
Yyerror("field annotation must be string")
@@ -913,7 +918,7 @@
// esc.c needs to find f given a PPARAM to add the tag.
if l.N.Left != nil && l.N.Left.Class == PPARAM {
- l.N.Left.Paramfld = f
+ l.N.Left.Name.Param.Field = f
}
*tp = f
@@ -937,7 +942,7 @@
Fatal("interfacefield: oops %v\n", n)
}
- if n.Val.Ctype != CTxxx {
+ if n.Val().Ctype() != CTxxx {
Yyerror("interface method cannot have annotation")
}
@@ -1466,12 +1471,12 @@
checkwidth(n.Type)
if Curfn != nil {
- Fatal("funccompile %v inside %v", n.Nname.Sym, Curfn.Nname.Sym)
+ Fatal("funccompile %v inside %v", n.Func.Nname.Sym, Curfn.Func.Nname.Sym)
}
Stksize = 0
dclcontext = PAUTO
- Funcdepth = n.Funcdepth + 1
+ Funcdepth = n.Func.Depth + 1
compile(n)
Curfn = nil
Funcdepth = 0
diff --git a/src/cmd/compile/internal/gc/esc.go b/src/cmd/compile/internal/gc/esc.go
index 2c13493..020ca9b 100644
--- a/src/cmd/compile/internal/gc/esc.go
+++ b/src/cmd/compile/internal/gc/esc.go
@@ -33,12 +33,10 @@
// more precise when analyzing a single non-recursive function than
// when analyzing a set of mutually recursive functions.
-// TODO(rsc): Look into using a map[*Node]bool instead of walkgen,
-// to allow analysis passes to use walkgen themselves.
-
type bottomUpVisitor struct {
analyze func(*NodeList, bool)
visitgen uint32
+ nodeID map[*Node]uint32
stack *NodeList
}
@@ -56,31 +54,25 @@
// If recursive is true, the list may still contain only a single function,
// if that function is itself recursive.
func visitBottomUp(list *NodeList, analyze func(list *NodeList, recursive bool)) {
- for l := list; l != nil; l = l.Next {
- l.N.Walkgen = 0
- }
-
var v bottomUpVisitor
v.analyze = analyze
+ v.nodeID = make(map[*Node]uint32)
for l := list; l != nil; l = l.Next {
- if l.N.Op == ODCLFUNC && l.N.Curfn == nil {
+ if l.N.Op == ODCLFUNC && l.N.Func.FCurfn == nil {
v.visit(l.N)
}
}
-
- for l := list; l != nil; l = l.Next {
- l.N.Walkgen = 0
- }
}
func (v *bottomUpVisitor) visit(n *Node) uint32 {
- if n.Walkgen > 0 {
+ if id := v.nodeID[n]; id > 0 {
// already visited
- return n.Walkgen
+ return id
}
v.visitgen++
- n.Walkgen = v.visitgen
+ id := v.visitgen
+ v.nodeID[n] = id
v.visitgen++
min := v.visitgen
@@ -89,14 +81,14 @@
l.N = n
v.stack = l
min = v.visitcodelist(n.Nbody, min)
- if (min == n.Walkgen || min == n.Walkgen+1) && n.Curfn == nil {
+ if (min == id || min == id+1) && n.Func.FCurfn == nil {
// This node is the root of a strongly connected component.
// The original min passed to visitcodelist was n->walkgen+1.
// If visitcodelist found its way back to n->walkgen, then this
// block is a set of mutually recursive functions.
// Otherwise it's just a lone function that does not recurse.
- recursive := min == n.Walkgen
+ recursive := min == id
// Remove connected component from stack.
// Mark walkgen so that future visits return a large number
@@ -105,9 +97,9 @@
var l *NodeList
for l = v.stack; l.N != n; l = l.Next {
- l.N.Walkgen = ^uint32(0)
+ v.nodeID[l.N] = ^uint32(0)
}
- n.Walkgen = ^uint32(0)
+ v.nodeID[n] = ^uint32(0)
v.stack = l.Next
l.Next = nil
@@ -134,10 +126,7 @@
min = v.visitcode(n.Left, min)
min = v.visitcode(n.Right, min)
min = v.visitcodelist(n.List, min)
- min = v.visitcode(n.Ntest, min)
- min = v.visitcode(n.Nincr, min)
min = v.visitcodelist(n.Nbody, min)
- min = v.visitcodelist(n.Nelse, min)
min = v.visitcodelist(n.Rlist, min)
if n.Op == OCALLFUNC || n.Op == OCALLMETH {
@@ -145,8 +134,8 @@
if n.Op == OCALLMETH {
fn = n.Left.Right.Sym.Def
}
- if fn != nil && fn.Op == ONAME && fn.Class == PFUNC && fn.Defn != nil {
- m := v.visit(fn.Defn)
+ if fn != nil && fn.Op == ONAME && fn.Class == PFUNC && fn.Name.Defn != nil {
+ m := v.visit(fn.Name.Defn)
if m < min {
min = m
}
@@ -154,7 +143,7 @@
}
if n.Op == OCLOSURE {
- m := v.visit(n.Param.Closure)
+ m := v.visit(n.Func.Closure)
if m < min {
min = m
}
@@ -320,6 +309,39 @@
return int(l.suffixValue)
}
+type NodeEscState struct {
+ Curfn *Node
+ Escflowsrc *NodeList // flow(this, src)
+ Escretval *NodeList // on OCALLxxx, list of dummy return values
+ Escloopdepth int32 // -1: global, 0: return variables, 1:function top level, increased inside function for every loop or label to mark scopes
+ Esclevel Level
+ Walkgen uint32
+}
+
+func (e *EscState) nodeEscState(n *Node) *NodeEscState {
+ if nE, ok := n.Opt().(*NodeEscState); ok {
+ return nE
+ }
+ if n.Opt() != nil {
+ Fatal("nodeEscState: opt in use (%T)", n.Opt())
+ }
+ nE := new(NodeEscState)
+ nE.Curfn = Curfn
+ n.SetOpt(nE)
+ e.opts = append(e.opts, n)
+ return nE
+}
+
+func (e *EscState) track(n *Node) {
+ if Curfn == nil {
+ Fatal("EscState.track: Curfn nil")
+ }
+ n.Esc = EscNone // until proven otherwise
+ nE := e.nodeEscState(n)
+ nE.Escloopdepth = e.loopdepth
+ e.noesc = list(e.noesc, n)
+}
+
// Escape constants are numbered in order of increasing "escapiness"
// to help make inferences be monotonic. With the exception of
// EscNever which is sticky, eX < eY means that eY is more exposed
@@ -385,19 +407,22 @@
edgecount int // diagnostic
noesc *NodeList // list of possible non-escaping nodes, for printing
recursive bool // recursive function or group of mutually recursive functions.
+ opts []*Node // nodes with .Opt initialized
+ walkgen uint32
}
-// funcSym returns n.Nname.Sym if no nils are encountered along the way.
-func funcSym(n *Node) *Sym {
- if n == nil || n.Nname == nil {
+// funcSym returns fn.Func.Nname.Sym if no nils are encountered along the way.
+func funcSym(fn *Node) *Sym {
+ if fn == nil || fn.Func.Nname == nil {
return nil
}
- return n.Nname.Sym
+ return fn.Func.Nname.Sym
}
// curfnSym returns n.Curfn.Nname.Sym if no nils are encountered along the way.
-func curfnSym(n *Node) *Sym {
- return funcSym(n.Curfn)
+func (e *EscState) curfnSym(n *Node) *Sym {
+ nE := e.nodeEscState(n)
+ return funcSym(nE.Curfn)
}
func escAnalyze(all *NodeList, recursive bool) {
@@ -407,7 +432,7 @@
e.theSink.Orig = &e.theSink
e.theSink.Class = PEXTERN
e.theSink.Sym = Lookup(".sink")
- e.theSink.Escloopdepth = -1
+ e.nodeEscState(&e.theSink).Escloopdepth = -1
e.recursive = recursive
for l := all; l != nil; l = l.Next {
@@ -441,17 +466,19 @@
if Debug['m'] != 0 {
for l := e.noesc; l != nil; l = l.Next {
if l.N.Esc == EscNone {
- Warnl(int(l.N.Lineno), "%v %v does not escape", curfnSym(l.N), Nconv(l.N, obj.FmtShort))
+ Warnl(int(l.N.Lineno), "%v %v does not escape", e.curfnSym(l.N), Nconv(l.N, obj.FmtShort))
}
}
}
+ for _, x := range e.opts {
+ x.SetOpt(nil)
+ }
}
func escfunc(e *EscState, func_ *Node) {
// print("escfunc %N %s\n", func->nname, e->recursive?"(recursive)":"");
-
if func_.Esc != 1 {
- Fatal("repeat escfunc %v", func_.Nname)
+ Fatal("repeat escfunc %v", func_.Func.Nname)
}
func_.Esc = EscFuncStarted
@@ -464,13 +491,14 @@
if ll.N.Op != ONAME {
continue
}
+ llNE := e.nodeEscState(ll.N)
switch ll.N.Class {
// out params are in a loopdepth between the sink and all local variables
case PPARAMOUT:
- ll.N.Escloopdepth = 0
+ llNE.Escloopdepth = 0
case PPARAM:
- ll.N.Escloopdepth = 1
+ llNE.Escloopdepth = 1
if ll.N.Type != nil && !haspointers(ll.N.Type) {
break
}
@@ -545,10 +573,7 @@
escloopdepth(e, n.Left)
escloopdepth(e, n.Right)
escloopdepthlist(e, n.List)
- escloopdepth(e, n.Ntest)
- escloopdepth(e, n.Nincr)
escloopdepthlist(e, n.Nbody)
- escloopdepthlist(e, n.Nelse)
escloopdepthlist(e, n.Rlist)
}
@@ -576,12 +601,12 @@
// process type switch as declaration.
// must happen before processing of switch body,
// so before recursion.
- if n.Op == OSWITCH && n.Ntest != nil && n.Ntest.Op == OTYPESW {
+ if n.Op == OSWITCH && n.Left != nil && n.Left.Op == OTYPESW {
for ll := n.List; ll != nil; ll = ll.Next { // cases
- // ll->n->nname is the variable per case
- if ll.N.Nname != nil {
- ll.N.Nname.Escloopdepth = e.loopdepth
+ // ll.N.Rlist is the variable per case
+ if ll.N.Rlist != nil {
+ e.nodeEscState(ll.N.Rlist.N).Escloopdepth = e.loopdepth
}
}
}
@@ -601,10 +626,7 @@
esc(e, n.Left, n)
esc(e, n.Right, n)
- esc(e, n.Ntest, n)
- esc(e, n.Nincr, n)
esclist(e, n.Nbody, n)
- esclist(e, n.Nelse, n)
esclist(e, n.List, n)
esclist(e, n.Rlist, n)
@@ -620,7 +642,7 @@
// Record loop depth at declaration.
case ODCL:
if n.Left != nil {
- n.Left.Escloopdepth = e.loopdepth
+ e.nodeEscState(n.Left).Escloopdepth = e.loopdepth
}
case OLABEL:
@@ -647,17 +669,19 @@
if Isfixedarray(n.Type) {
escassign(e, n.List.Next.N, n.Right)
} else {
- escassign(e, n.List.Next.N, addDereference(n.Right))
+ escassignDereference(e, n.List.Next.N, n.Right)
}
}
case OSWITCH:
- if n.Ntest != nil && n.Ntest.Op == OTYPESW {
- for ll := n.List; ll != nil; ll = ll.Next { // cases
-
- // ntest->right is the argument of the .(type),
- // ll->n->nname is the variable per case
- escassign(e, ll.N.Nname, n.Ntest.Right)
+ if n.Left != nil && n.Left.Op == OTYPESW {
+ for ll := n.List; ll != nil; ll = ll.Next {
+ // cases
+ // n.Left.Right is the argument of the .(type),
+ // ll.N.Rlist is the variable per case
+ if ll.N.Rlist != nil {
+ escassign(e, ll.N.Rlist.N, n.Left.Right)
+ }
}
}
@@ -688,7 +712,7 @@
// b escapes as well. If we ignore such OSLICEARR, we will conclude
// that b does not escape when b contents do.
if Debug['m'] != 0 {
- Warnl(int(n.Lineno), "%v ignoring self-assignment to %v", curfnSym(n), Nconv(n.Left, obj.FmtShort))
+ Warnl(int(n.Lineno), "%v ignoring self-assignment to %v", e.curfnSym(n), Nconv(n.Left, obj.FmtShort))
}
break
@@ -735,7 +759,7 @@
// esccall already done on n->rlist->n. tie it's escretval to n->list
case OAS2FUNC: // x,y = f()
- lr := n.Rlist.N.Escretval
+ lr := e.nodeEscState(n.Rlist.N).Escretval
var ll *NodeList
for ll = n.List; lr != nil && ll != nil; lr, ll = lr.Next, ll.Next {
@@ -751,7 +775,7 @@
// OAS2FUNC in disguise
// esccall already done on n->list->n
// tie n->list->n->escretval to curfn->dcl PPARAMOUT's
- ll = n.List.N.Escretval
+ ll = e.nodeEscState(n.List.N).Escretval
}
for lr := Curfn.Func.Dcl; lr != nil && ll != nil; lr = lr.Next {
@@ -778,28 +802,24 @@
} else {
// append(slice1, slice2...) -- slice2 itself does not escape, but contents do.
slice2 := n.List.Next.N
- escassign(e, &e.theSink, addDereference(slice2)) // lose track of assign of dereference
+ escassignDereference(e, &e.theSink, slice2) // lose track of assign of dereference
if Debug['m'] > 2 {
- Warnl(int(n.Lineno), "%v special treatment of append(slice1, slice2...) %v", curfnSym(n), Nconv(n, obj.FmtShort))
+ Warnl(int(n.Lineno), "%v special treatment of append(slice1, slice2...) %v", e.curfnSym(n), Nconv(n, obj.FmtShort))
}
}
- escassign(e, &e.theSink, addDereference(n.List.N)) // The original elements are now leaked, too
+ escassignDereference(e, &e.theSink, n.List.N) // The original elements are now leaked, too
case OCONV, OCONVNOP:
escassign(e, n, n.Left)
case OCONVIFACE:
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
- n.Escloopdepth = e.loopdepth
+ e.track(n)
escassign(e, n, n.Left)
case OARRAYLIT:
if Isslice(n.Type) {
// Slice itself is not leaked until proven otherwise
- n.Esc = EscNone
- e.noesc = list(e.noesc, n)
- n.Escloopdepth = e.loopdepth
+ e.track(n)
}
// Link values to array/slice
@@ -814,25 +834,19 @@
}
case OPTRLIT:
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
- n.Escloopdepth = e.loopdepth
+ e.track(n)
// Link OSTRUCTLIT to OPTRLIT; if OPTRLIT escapes, OSTRUCTLIT elements do too.
escassign(e, n, n.Left)
case OCALLPART:
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
- n.Escloopdepth = e.loopdepth
+ e.track(n)
// Contents make it to memory, lose track.
escassign(e, &e.theSink, n.Left)
case OMAPLIT:
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
- n.Escloopdepth = e.loopdepth
+ e.track(n)
// Keys and values make it to memory, lose track.
for ll := n.List; ll != nil; ll = ll.Next {
@@ -849,11 +863,11 @@
if v.Op == OXXX { // unnamed out argument; see dcl.c:/^funcargs
continue
}
- a = v.Param.Closure
+ a = v.Name.Param.Closure
if !v.Name.Byval {
a = Nod(OADDR, a, nil)
a.Lineno = v.Lineno
- a.Escloopdepth = e.loopdepth
+ e.nodeEscState(a).Escloopdepth = e.loopdepth
typecheck(&a, Erv)
}
@@ -870,25 +884,16 @@
OSTRARRAYRUNE,
OSTRARRAYBYTE,
ORUNESTR:
- n.Escloopdepth = e.loopdepth
-
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
+ e.track(n)
case OADDSTR:
- n.Escloopdepth = e.loopdepth
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
-
- // Arguments of OADDSTR do not escape.
+ e.track(n)
+ // Arguments of OADDSTR do not escape.
case OADDR:
- n.Esc = EscNone // until proven otherwise
- e.noesc = list(e.noesc, n)
-
// current loop depth is an upper bound on actual loop depth
// of addressed value.
- n.Escloopdepth = e.loopdepth
+ e.track(n)
// for &x, use loop depth of x if known.
// it should always be known, but if not, be conservative
@@ -896,8 +901,10 @@
if n.Left.Op == ONAME {
switch n.Left.Class {
case PAUTO:
- if n.Left.Escloopdepth != 0 {
- n.Escloopdepth = n.Left.Escloopdepth
+ nE := e.nodeEscState(n)
+ leftE := e.nodeEscState(n.Left)
+ if leftE.Escloopdepth != 0 {
+ nE.Escloopdepth = leftE.Escloopdepth
}
// PPARAM is loop depth 1 always.
@@ -907,7 +914,8 @@
// to another (or the same) result makes the
// first result move to the heap.
case PPARAM, PPARAMOUT:
- n.Escloopdepth = 1
+ nE := e.nodeEscState(n)
+ nE.Escloopdepth = 1
}
}
}
@@ -1012,14 +1020,14 @@
// insert OADDR to account for the additional indirection.
a := Nod(OADDR, src, nil)
a.Lineno = src.Lineno
- a.Escloopdepth = src.Escloopdepth
+ e.nodeEscState(a).Escloopdepth = e.nodeEscState(src).Escloopdepth
a.Type = Ptrto(src.Type)
escflows(e, dst, a)
// Flowing multiple returns to a single dst happens when
// analyzing "go f(g())": here g() flows to sink (issue 4529).
case OCALLMETH, OCALLFUNC, OCALLINTER:
- for ll := src.Escretval; ll != nil; ll = ll.Next {
+ for ll := e.nodeEscState(src).Escretval; ll != nil; ll = ll.Next {
escflows(e, dst, ll.N)
}
@@ -1183,6 +1191,9 @@
// calls arguments, where the flow is encoded in "note".
func escassignfromtag(e *EscState, note *string, dsts *NodeList, src *Node) uint16 {
em := parsetag(note)
+ if src.Op == OLITERAL {
+ return em
+ }
if Debug['m'] > 2 {
fmt.Printf("%v::assignfromtag:: src=%v, em=%s\n",
@@ -1201,7 +1212,7 @@
// If content inside parameter (reached via indirection)
// escapes to heap, mark as such.
if em&EscContentEscapes != 0 {
- escassign(e, &e.theSink, addDereference(src))
+ escassign(e, &e.theSink, e.addDereference(src))
}
em0 := em
@@ -1215,7 +1226,7 @@
if embits > 0 {
n := src
for i := uint16(0); i < embits-1; i++ {
- n = addDereference(n) // encode level>0 as indirections
+ n = e.addDereference(n) // encode level>0 as indirections
}
escassign(e, dsts.N, n)
}
@@ -1230,12 +1241,19 @@
return em0
}
+func escassignDereference(e *EscState, dst *Node, src *Node) {
+ if src.Op == OLITERAL {
+ return
+ }
+ escassign(e, dst, e.addDereference(src))
+}
+
// addDereference constructs a suitable OIND note applied to src.
// Because this is for purposes of escape accounting, not execution,
// some semantically dubious node combinations are (currently) possible.
-func addDereference(n *Node) *Node {
+func (e *EscState) addDereference(n *Node) *Node {
ind := Nod(OIND, n, nil)
- ind.Escloopdepth = n.Escloopdepth
+ e.nodeEscState(ind).Escloopdepth = e.nodeEscState(n).Escloopdepth
ind.Lineno = n.Lineno
t := n.Type
if Istype(t, Tptr) {
@@ -1284,7 +1302,8 @@
func initEscretval(e *EscState, n *Node, fntype *Type) {
i := 0
- n.Escretval = nil // Suspect this is not nil for indirect calls.
+ nE := e.nodeEscState(n)
+ nE.Escretval = nil // Suspect this is not nil for indirect calls.
for t := getoutargx(fntype).Type; t != nil; t = t.Down {
src := Nod(ONAME, nil, nil)
buf := fmt.Sprintf(".out%d", i)
@@ -1292,11 +1311,11 @@
src.Sym = Lookup(buf)
src.Type = t.Type
src.Class = PAUTO
- src.Curfn = Curfn
- src.Escloopdepth = e.loopdepth
+ src.Name.Curfn = Curfn
+ e.nodeEscState(src).Escloopdepth = e.loopdepth
src.Used = true
src.Lineno = n.Lineno
- n.Escretval = list(n.Escretval, src)
+ nE.Escretval = list(nE.Escretval, src)
}
}
@@ -1336,7 +1355,7 @@
if n.List != nil && n.List.Next == nil {
a := n.List.N
if a.Type.Etype == TSTRUCT && a.Type.Funarg != 0 { // f(g()).
- ll = a.Escretval
+ ll = e.nodeEscState(a).Escretval
}
}
@@ -1362,43 +1381,41 @@
return
}
+ nE := e.nodeEscState(n)
if fn != nil && fn.Op == ONAME && fn.Class == PFUNC &&
- fn.Defn != nil && fn.Defn.Nbody != nil && fn.Param.Ntype != nil && fn.Defn.Esc < EscFuncTagged {
+ fn.Name.Defn != nil && fn.Name.Defn.Nbody != nil && fn.Name.Param.Ntype != nil && fn.Name.Defn.Esc < EscFuncTagged {
if Debug['m'] > 2 {
fmt.Printf("%v::esccall:: %v in recursive group\n", Ctxt.Line(int(lineno)), Nconv(n, obj.FmtShort))
}
// function in same mutually recursive group. Incorporate into flow graph.
// print("esc local fn: %N\n", fn->ntype);
- if fn.Defn.Esc == EscFuncUnknown || n.Escretval != nil {
+ if fn.Name.Defn.Esc == EscFuncUnknown || nE.Escretval != nil {
Fatal("graph inconsistency")
}
// set up out list on this call node
- for lr := fn.Param.Ntype.Rlist; lr != nil; lr = lr.Next {
- n.Escretval = list(n.Escretval, lr.N.Left) // type.rlist -> dclfield -> ONAME (PPARAMOUT)
+ for lr := fn.Name.Param.Ntype.Rlist; lr != nil; lr = lr.Next {
+ nE.Escretval = list(nE.Escretval, lr.N.Left) // type.rlist -> dclfield -> ONAME (PPARAMOUT)
}
// Receiver.
if n.Op != OCALLFUNC {
- escassign(e, fn.Param.Ntype.Left.Left, n.Left.Left)
+ escassign(e, fn.Name.Param.Ntype.Left.Left, n.Left.Left)
}
var src *Node
- for lr := fn.Param.Ntype.List; ll != nil && lr != nil; ll, lr = ll.Next, lr.Next {
+ for lr := fn.Name.Param.Ntype.List; ll != nil && lr != nil; ll, lr = ll.Next, lr.Next {
src = ll.N
if lr.N.Isddd && !n.Isddd {
// Introduce ODDDARG node to represent ... allocation.
src = Nod(ODDDARG, nil, nil)
-
src.Type = typ(TARRAY)
src.Type.Type = lr.N.Type.Type
src.Type.Bound = int64(count(ll))
src.Type = Ptrto(src.Type) // make pointer so it will be tracked
- src.Escloopdepth = e.loopdepth
src.Lineno = n.Lineno
- src.Esc = EscNone // until we find otherwise
- e.noesc = list(e.noesc, src)
+ e.track(src)
n.Right = src
}
@@ -1422,7 +1439,7 @@
}
// Imported or completely analyzed function. Use the escape tags.
- if n.Escretval != nil {
+ if nE.Escretval != nil {
Fatal("esc already decorated call %v\n", Nconv(n, obj.FmtSign))
}
@@ -1440,7 +1457,7 @@
t := getthisx(fntype).Type
src := n.Left.Left
if haspointers(t.Type) {
- escassignfromtag(e, t.Note, n.Escretval, src)
+ escassignfromtag(e, t.Note, nE.Escretval, src)
}
}
@@ -1449,20 +1466,17 @@
if t.Isddd && !n.Isddd {
// Introduce ODDDARG node to represent ... allocation.
src = Nod(ODDDARG, nil, nil)
-
- src.Escloopdepth = e.loopdepth
src.Lineno = n.Lineno
src.Type = typ(TARRAY)
src.Type.Type = t.Type.Type
src.Type.Bound = int64(count(ll))
src.Type = Ptrto(src.Type) // make pointer so it will be tracked
- src.Esc = EscNone // until we find otherwise
- e.noesc = list(e.noesc, src)
+ e.track(src)
n.Right = src
}
if haspointers(t.Type) {
- if escassignfromtag(e, t.Note, n.Escretval, src) == EscNone && up.Op != ODEFER && up.Op != OPROC {
+ if escassignfromtag(e, t.Note, nE.Escretval, src) == EscNone && up.Op != ODEFER && up.Op != OPROC {
a := src
for a.Op == OCONVNOP {
a = a.Left
@@ -1519,14 +1533,15 @@
fmt.Printf("%v::flows:: %v <- %v\n", Ctxt.Line(int(lineno)), Nconv(dst, obj.FmtShort), Nconv(src, obj.FmtShort))
}
- if dst.Escflowsrc == nil {
+ dstE := e.nodeEscState(dst)
+ if dstE.Escflowsrc == nil {
e.dsts = list(e.dsts, dst)
e.dstcount++
}
e.edgecount++
- dst.Escflowsrc = list(dst.Escflowsrc, src)
+ dstE.Escflowsrc = list(dstE.Escflowsrc, src)
}
// Whenever we hit a reference node, the level goes up by one, and whenever
@@ -1547,12 +1562,13 @@
return
}
+ dstE := e.nodeEscState(dst)
if Debug['m'] > 1 {
- fmt.Printf("\nescflood:%d: dst %v scope:%v[%d]\n", walkgen, Nconv(dst, obj.FmtShort), curfnSym(dst), dst.Escloopdepth)
+ fmt.Printf("\nescflood:%d: dst %v scope:%v[%d]\n", e.walkgen, Nconv(dst, obj.FmtShort), e.curfnSym(dst), dstE.Escloopdepth)
}
- for l := dst.Escflowsrc; l != nil; l = l.Next {
- walkgen++
+ for l := dstE.Escflowsrc; l != nil; l = l.Next {
+ e.walkgen++
escwalk(e, levelFrom(0), dst, l.N)
}
}
@@ -1561,33 +1577,37 @@
func funcOutputAndInput(dst, src *Node) bool {
// Note if dst is marked as escaping, then "returned" is too weak.
return dst.Op == ONAME && dst.Class == PPARAMOUT &&
- src.Op == ONAME && src.Class == PPARAM && src.Curfn == dst.Curfn
+ src.Op == ONAME && src.Class == PPARAM && src.Name.Curfn == dst.Name.Curfn
}
func escwalk(e *EscState, level Level, dst *Node, src *Node) {
-
- if src.Walkgen == walkgen {
+ if src.Op == OLITERAL {
+ return
+ }
+ srcE := e.nodeEscState(src)
+ if srcE.Walkgen == e.walkgen {
// Esclevels are vectors, do not compare as integers,
// and must use "min" of old and new to guarantee
// convergence.
- level = level.min(src.Esclevel)
- if level == src.Esclevel {
+ level = level.min(srcE.Esclevel)
+ if level == srcE.Esclevel {
return
}
}
- src.Walkgen = walkgen
- src.Esclevel = level
+ srcE.Walkgen = e.walkgen
+ srcE.Esclevel = level
if Debug['m'] > 1 {
fmt.Printf("escwalk: level:%d depth:%d %.*s op=%v %v(%v) scope:%v[%d]\n",
- level, e.pdepth, e.pdepth, "\t\t\t\t\t\t\t\t\t\t", Oconv(int(src.Op), 0), Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), curfnSym(src), src.Escloopdepth)
+ level, e.pdepth, e.pdepth, "\t\t\t\t\t\t\t\t\t\t", Oconv(int(src.Op), 0), Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), e.curfnSym(src), srcE.Escloopdepth)
}
e.pdepth++
// Input parameter flowing to output parameter?
var leaks bool
+ dstE := e.nodeEscState(dst)
if funcOutputAndInput(dst, src) && src.Esc&EscMask < EscScope && dst.Esc != EscHeap {
// This case handles:
// 1. return in
@@ -1604,7 +1624,7 @@
if src.Esc&EscMask != EscReturn {
src.Esc = EscReturn | src.Esc&EscContentEscapes
}
- src.Esc = escNoteOutputParamFlow(src.Esc, dst.Vargen, level)
+ src.Esc = escNoteOutputParamFlow(src.Esc, dst.Name.Vargen, level)
goto recurse
}
@@ -1619,11 +1639,11 @@
}
}
- leaks = level.int() <= 0 && level.guaranteedDereference() <= 0 && dst.Escloopdepth < src.Escloopdepth
+ leaks = level.int() <= 0 && level.guaranteedDereference() <= 0 && dstE.Escloopdepth < srcE.Escloopdepth
switch src.Op {
case ONAME:
- if src.Class == PPARAM && (leaks || dst.Escloopdepth < 0) && src.Esc&EscMask < EscScope {
+ if src.Class == PPARAM && (leaks || dstE.Escloopdepth < 0) && src.Esc&EscMask < EscScope {
if level.guaranteedDereference() > 0 {
src.Esc = escMax(EscContentEscapes|src.Esc, EscNone)
if Debug['m'] != 0 {
@@ -1631,7 +1651,7 @@
Warnl(int(src.Lineno), "leaking param content: %v", Nconv(src, obj.FmtShort))
} else {
Warnl(int(src.Lineno), "leaking param content: %v level=%v dst.eld=%v src.eld=%v dst=%v",
- Nconv(src, obj.FmtShort), level, dst.Escloopdepth, src.Escloopdepth, Nconv(dst, obj.FmtShort))
+ Nconv(src, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth, Nconv(dst, obj.FmtShort))
}
}
} else {
@@ -1641,7 +1661,7 @@
Warnl(int(src.Lineno), "leaking param: %v", Nconv(src, obj.FmtShort))
} else {
Warnl(int(src.Lineno), "leaking param: %v level=%v dst.eld=%v src.eld=%v dst=%v",
- Nconv(src, obj.FmtShort), level, dst.Escloopdepth, src.Escloopdepth, Nconv(dst, obj.FmtShort))
+ Nconv(src, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth, Nconv(dst, obj.FmtShort))
}
}
}
@@ -1653,7 +1673,7 @@
if leaks && Debug['m'] != 0 {
Warnl(int(src.Lineno), "leaking closure reference %v", Nconv(src, obj.FmtShort))
}
- escwalk(e, level, dst, src.Param.Closure)
+ escwalk(e, level, dst, src.Name.Param.Closure)
}
case OPTRLIT, OADDR:
@@ -1667,7 +1687,7 @@
}
if Debug['m'] > 1 {
Warnl(int(src.Lineno), "%v escapes to heap, level=%v, dst.eld=%v, src.eld=%v",
- Nconv(p, obj.FmtShort), level, dst.Escloopdepth, src.Escloopdepth)
+ Nconv(p, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth)
} else {
Warnl(int(src.Lineno), "%v escapes to heap", Nconv(p, obj.FmtShort))
}
@@ -1735,19 +1755,20 @@
// See e.g. #10466
// This can only happen with functions returning a single result.
case OCALLMETH, OCALLFUNC, OCALLINTER:
- if src.Escretval != nil {
+ if srcE.Escretval != nil {
if Debug['m'] > 1 {
fmt.Printf("%v:[%d] dst %v escwalk replace src: %v with %v\n",
Ctxt.Line(int(lineno)), e.loopdepth,
- Nconv(dst, obj.FmtShort), Nconv(src, obj.FmtShort), Nconv(src.Escretval.N, obj.FmtShort))
+ Nconv(dst, obj.FmtShort), Nconv(src, obj.FmtShort), Nconv(srcE.Escretval.N, obj.FmtShort))
}
- src = src.Escretval.N
+ src = srcE.Escretval.N
+ srcE = e.nodeEscState(src)
}
}
recurse:
level = level.copy()
- for ll := src.Escflowsrc; ll != nil; ll = ll.Next {
+ for ll := srcE.Escflowsrc; ll != nil; ll = ll.Next {
escwalk(e, level, dst, ll.N)
}
@@ -1783,7 +1804,7 @@
case EscNone, // not touched by escflood
EscReturn:
if haspointers(ll.N.Type) { // don't bother tagging for scalars
- ll.N.Paramfld.Note = mktag(int(ll.N.Esc))
+ ll.N.Name.Param.Field.Note = mktag(int(ll.N.Esc))
}
case EscHeap, // touched by escflood, moved to heap
diff --git a/src/cmd/compile/internal/gc/export.go b/src/cmd/compile/internal/gc/export.go
index 5117490..66ae881 100644
--- a/src/cmd/compile/internal/gc/export.go
+++ b/src/cmd/compile/internal/gc/export.go
@@ -64,7 +64,7 @@
if (ctxt != PEXTERN && ctxt != PFUNC) || dclcontext != PEXTERN {
return
}
- if n.Param != nil && n.Param.Ntype != nil && n.Param.Ntype.Op == OTFUNC && n.Param.Ntype.Left != nil { // method
+ if n.Name.Param != nil && n.Name.Param.Ntype != nil && n.Name.Param.Ntype.Op == OTFUNC && n.Name.Param.Ntype.Left != nil { // method
return
}
@@ -202,10 +202,7 @@
reexportdeplist(n.List)
reexportdeplist(n.Rlist)
reexportdeplist(n.Ninit)
- reexportdep(n.Ntest)
- reexportdep(n.Nincr)
reexportdeplist(n.Nbody)
- reexportdeplist(n.Nelse)
}
func dumpexportconst(s *Sym) {
@@ -219,9 +216,9 @@
dumpexporttype(t)
if t != nil && !isideal(t) {
- fmt.Fprintf(bout, "\tconst %v %v = %v\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtSharp), Vconv(&n.Val, obj.FmtSharp))
+ fmt.Fprintf(bout, "\tconst %v %v = %v\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtSharp), Vconv(n.Val(), obj.FmtSharp))
} else {
- fmt.Fprintf(bout, "\tconst %v = %v\n", Sconv(s, obj.FmtSharp), Vconv(&n.Val, obj.FmtSharp))
+ fmt.Fprintf(bout, "\tconst %v = %v\n", Sconv(s, obj.FmtSharp), Vconv(n.Val(), obj.FmtSharp))
}
}
@@ -364,6 +361,9 @@
func dumpexport() {
lno := lineno
+ if buildid != "" {
+ fmt.Fprintf(bout, "build id %q\n", buildid)
+ }
fmt.Fprintf(bout, "\n$$\npackage %s", localpkg.Name)
if safemode != 0 {
fmt.Fprintf(bout, " safe")
@@ -419,6 +419,7 @@
t := typ(TFORW)
t.Sym = s
s.Def = typenod(t)
+ s.Def.Name = new(Name)
}
if s.Def.Type == nil {
@@ -540,7 +541,7 @@
}
switch n.Op {
case OLITERAL:
- fmt.Fprintf(b, "#define const_%s %v\n", n.Sym.Name, Vconv(&n.Val, obj.FmtSharp))
+ fmt.Fprintf(b, "#define const_%s %v\n", n.Sym.Name, Vconv(n.Val(), obj.FmtSharp))
case OTYPE:
t = n.Type
diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go
index 4b93363..b40014b 100644
--- a/src/cmd/compile/internal/gc/fmt.go
+++ b/src/cmd/compile/internal/gc/fmt.go
@@ -205,8 +205,8 @@
fmt.Fprintf(&buf, " a(%v)", n.Addable)
}
- if c == 0 && n.Vargen != 0 {
- fmt.Fprintf(&buf, " g(%d)", n.Vargen)
+ if c == 0 && n.Name != nil && n.Name.Vargen != 0 {
+ fmt.Fprintf(&buf, " g(%d)", n.Name.Vargen)
}
if n.Lineno != 0 {
@@ -214,7 +214,7 @@
}
if c == 0 && n.Xoffset != BADWIDTH {
- fmt.Fprintf(&buf, " x(%d%+d)", n.Xoffset, n.Stkdelta)
+ fmt.Fprintf(&buf, " x(%d%+d)", n.Xoffset, stkdelta[n])
}
if n.Class != 0 {
@@ -233,8 +233,11 @@
fmt.Fprintf(&buf, " colas(%v)", n.Colas)
}
- if n.Funcdepth != 0 {
- fmt.Fprintf(&buf, " f(%d)", n.Funcdepth)
+ if n.Name != nil && n.Name.Funcdepth != 0 {
+ fmt.Fprintf(&buf, " f(%d)", n.Name.Funcdepth)
+ }
+ if n.Func != nil && n.Func.Depth != 0 {
+ fmt.Fprintf(&buf, " ff(%d)", n.Func.Depth)
}
switch n.Esc {
@@ -259,8 +262,8 @@
fmt.Fprintf(&buf, " esc(%d)", n.Esc)
}
- if n.Escloopdepth != 0 {
- fmt.Fprintf(&buf, " ld(%d)", n.Escloopdepth)
+ if e, ok := n.Opt().(*NodeEscState); ok && e.Escloopdepth != 0 {
+ fmt.Fprintf(&buf, " ld(%d)", e.Escloopdepth)
}
if c == 0 && n.Typecheck != 0 {
@@ -298,8 +301,8 @@
}
// Fmt "%V": Values
-func Vconv(v *Val, flag int) string {
- switch v.Ctype {
+func Vconv(v Val, flag int) string {
+ switch v.Ctype() {
case CTINT:
if (flag&obj.FmtSharp != 0) || fmtmode == FExp {
return Bconv(v.U.(*Mpint), obj.FmtSharp)
@@ -863,12 +866,12 @@
case OIF:
if simpleinit {
- f += fmt.Sprintf("if %v; %v { %v }", n.Ninit.N, n.Ntest, n.Nbody)
+ f += fmt.Sprintf("if %v; %v { %v }", n.Ninit.N, n.Left, n.Nbody)
} else {
- f += fmt.Sprintf("if %v { %v }", n.Ntest, n.Nbody)
+ f += fmt.Sprintf("if %v { %v }", n.Left, n.Nbody)
}
- if n.Nelse != nil {
- f += fmt.Sprintf(" else { %v }", n.Nelse)
+ if n.Rlist != nil {
+ f += fmt.Sprintf(" else { %v }", n.Rlist)
}
case OFOR:
@@ -880,16 +883,16 @@
f += "for"
if simpleinit {
f += fmt.Sprintf(" %v;", n.Ninit.N)
- } else if n.Nincr != nil {
+ } else if n.Right != nil {
f += " ;"
}
- if n.Ntest != nil {
- f += fmt.Sprintf(" %v", n.Ntest)
+ if n.Left != nil {
+ f += fmt.Sprintf(" %v", n.Left)
}
- if n.Nincr != nil {
- f += fmt.Sprintf("; %v", n.Nincr)
+ if n.Right != nil {
+ f += fmt.Sprintf("; %v", n.Right)
} else if simpleinit {
f += ";"
}
@@ -919,8 +922,8 @@
if simpleinit {
f += fmt.Sprintf(" %v;", n.Ninit.N)
}
- if n.Ntest != nil {
- f += Nconv(n.Ntest, 0)
+ if n.Left != nil {
+ f += Nconv(n.Left, 0)
}
f += fmt.Sprintf(" { %v }", n.List)
@@ -1109,20 +1112,20 @@
return Sconv(n.Sym, 0)
}
}
- if n.Val.Ctype == CTNIL && n.Orig != nil && n.Orig != n {
+ if n.Val().Ctype() == CTNIL && n.Orig != nil && n.Orig != n {
return exprfmt(n.Orig, prec)
}
if n.Type != nil && n.Type != Types[n.Type.Etype] && n.Type != idealbool && n.Type != idealstring {
// Need parens when type begins with what might
// be misinterpreted as a unary operator: * or <-.
if Isptr[n.Type.Etype] || (n.Type.Etype == TCHAN && n.Type.Chan == Crecv) {
- return fmt.Sprintf("(%v)(%v)", n.Type, Vconv(&n.Val, 0))
+ return fmt.Sprintf("(%v)(%v)", n.Type, Vconv(n.Val(), 0))
} else {
- return fmt.Sprintf("%v(%v)", n.Type, Vconv(&n.Val, 0))
+ return fmt.Sprintf("%v(%v)", n.Type, Vconv(n.Val(), 0))
}
}
- return Vconv(&n.Val, 0)
+ return Vconv(n.Val(), 0)
// Special case: name used as local variable in export.
// _ becomes ~b%d internally; print as _ for export
@@ -1130,8 +1133,8 @@
if (fmtmode == FExp || fmtmode == FErr) && n.Sym != nil && n.Sym.Name[0] == '~' && n.Sym.Name[1] == 'b' {
return "_"
}
- if fmtmode == FExp && n.Sym != nil && !isblank(n) && n.Vargen > 0 {
- return fmt.Sprintf("%v·%d", n.Sym, n.Vargen)
+ if fmtmode == FExp && n.Sym != nil && !isblank(n) && n.Name.Vargen > 0 {
+ return fmt.Sprintf("%v·%d", n.Sym, n.Name.Vargen)
}
// Special case: explicit name of func (*T) method(...) is turned into pkg.(*T).method,
@@ -1199,7 +1202,7 @@
if n.Nbody != nil {
return fmt.Sprintf("%v { %v }", n.Type, n.Nbody)
}
- return fmt.Sprintf("%v { %v }", n.Type, n.Param.Closure.Nbody)
+ return fmt.Sprintf("%v { %v }", n.Type, n.Name.Param.Closure.Nbody)
case OCOMPLIT:
ptrlit := n.Right != nil && n.Right.Implicit && n.Right.Type != nil && Isptr[n.Right.Type.Etype]
@@ -1513,7 +1516,7 @@
fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), obj.Rconv(int(n.Reg)), Jconv(n, 0))
case OLITERAL:
- fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), Vconv(&n.Val, 0), Jconv(n, 0))
+ fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), Vconv(n.Val(), 0), Jconv(n, 0))
case ONAME, ONONAME:
if n.Sym != nil {
@@ -1521,9 +1524,9 @@
} else {
fmt.Fprintf(&buf, "%v%v", Oconv(int(n.Op), 0), Jconv(n, 0))
}
- if recur && n.Type == nil && n.Param.Ntype != nil {
+ if recur && n.Type == nil && n.Name.Param.Ntype != nil {
indent(&buf)
- fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Param.Ntype)
+ fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Name.Param.Ntype)
}
case OASOP:
@@ -1531,14 +1534,14 @@
case OTYPE:
fmt.Fprintf(&buf, "%v %v%v type=%v", Oconv(int(n.Op), 0), n.Sym, Jconv(n, 0), n.Type)
- if recur && n.Type == nil && n.Param.Ntype != nil {
+ if recur && n.Type == nil && n.Name.Param.Ntype != nil {
indent(&buf)
- fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Param.Ntype)
+ fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Name.Param.Ntype)
}
}
if n.Sym != nil && n.Op != ONAME {
- fmt.Fprintf(&buf, " %v G%d", n.Sym, n.Vargen)
+ fmt.Fprintf(&buf, " %v", n.Sym)
}
if n.Type != nil {
@@ -1562,25 +1565,10 @@
fmt.Fprintf(&buf, "%v-rlist%v", Oconv(int(n.Op), 0), n.Rlist)
}
- if n.Ntest != nil {
- indent(&buf)
- fmt.Fprintf(&buf, "%v-test%v", Oconv(int(n.Op), 0), n.Ntest)
- }
-
if n.Nbody != nil {
indent(&buf)
fmt.Fprintf(&buf, "%v-body%v", Oconv(int(n.Op), 0), n.Nbody)
}
-
- if n.Nelse != nil {
- indent(&buf)
- fmt.Fprintf(&buf, "%v-else%v", Oconv(int(n.Op), 0), n.Nelse)
- }
-
- if n.Nincr != nil {
- indent(&buf)
- fmt.Fprintf(&buf, "%v-incr%v", Oconv(int(n.Op), 0), n.Nincr)
- }
}
return buf.String()
diff --git a/src/cmd/compile/internal/gc/gen.go b/src/cmd/compile/internal/gc/gen.go
index c0dd996..764895f 100644
--- a/src/cmd/compile/internal/gc/gen.go
+++ b/src/cmd/compile/internal/gc/gen.go
@@ -47,7 +47,7 @@
switch n.Class {
case PPARAMREF:
- addrescapes(n.Defn)
+ addrescapes(n.Name.Defn)
// if func param, need separate temporary
// to hold heap pointer.
@@ -57,14 +57,14 @@
// expression to refer to stack copy
case PPARAM, PPARAMOUT:
- n.Param.Stackparam = Nod(OPARAM, n, nil)
+ n.Name.Param.Stackparam = Nod(OPARAM, n, nil)
- n.Param.Stackparam.Type = n.Type
- n.Param.Stackparam.Addable = true
+ n.Name.Param.Stackparam.Type = n.Type
+ n.Name.Param.Stackparam.Addable = true
if n.Xoffset == BADWIDTH {
Fatal("addrescapes before param assignment")
}
- n.Param.Stackparam.Xoffset = n.Xoffset
+ n.Name.Param.Stackparam.Xoffset = n.Xoffset
fallthrough
case PAUTO:
@@ -77,7 +77,7 @@
// create stack variable to hold pointer to heap
oldfn := Curfn
- Curfn = n.Curfn
+ Curfn = n.Name.Curfn
n.Name.Heapaddr = temp(Ptrto(n.Type))
buf := fmt.Sprintf("&%v", n.Sym)
n.Name.Heapaddr.Sym = Lookup(buf)
@@ -202,7 +202,7 @@
lab := n.Sym.Label
if lab != nil {
if lab.Def != nil {
- if lab.Def.Defn == n {
+ if lab.Def.Name.Defn == n {
return lab
}
}
@@ -259,10 +259,10 @@
if compiling_runtime != 0 {
Yyerror("%v escapes to heap, not allowed in runtime.", n)
}
- if n.Alloc == nil {
- n.Alloc = callnew(n.Type)
+ if prealloc[n] == nil {
+ prealloc[n] = callnew(n.Type)
}
- Cgen_as(n.Name.Heapaddr, n.Alloc)
+ Cgen_as(n.Name.Heapaddr, prealloc[n])
}
/*
@@ -333,22 +333,20 @@
switch Simtype[n.Type.Etype] {
case TCOMPLEX64, TCOMPLEX128:
- z.Val.U = new(Mpcplx)
- Mpmovecflt(&z.Val.U.(*Mpcplx).Real, 0.0)
- Mpmovecflt(&z.Val.U.(*Mpcplx).Imag, 0.0)
+ z.SetVal(Val{new(Mpcplx)})
+ Mpmovecflt(&z.Val().U.(*Mpcplx).Real, 0.0)
+ Mpmovecflt(&z.Val().U.(*Mpcplx).Imag, 0.0)
case TFLOAT32, TFLOAT64:
var zero Mpflt
Mpmovecflt(&zero, 0.0)
- z.Val.Ctype = CTFLT
- z.Val.U = &zero
+ z.SetVal(Val{&zero})
case TPTR32, TPTR64, TCHAN, TMAP:
- z.Val.Ctype = CTNIL
+ z.SetVal(Val{new(NilVal)})
case TBOOL:
- z.Val.Ctype = CTBOOL
- z.Val.U = false
+ z.SetVal(Val{false})
case TINT8,
TINT16,
@@ -358,9 +356,8 @@
TUINT16,
TUINT32,
TUINT64:
- z.Val.Ctype = CTINT
- z.Val.U = new(Mpint)
- Mpmovecfix(z.Val.U.(*Mpint), 0)
+ z.SetVal(Val{new(Mpint)})
+ Mpmovecfix(z.Val().U.(*Mpint), 0)
default:
Fatal("clearslim called on type %v", n.Type)
@@ -630,7 +627,7 @@
n.Addable = true
n.Ullman = 1
n.Esc = EscNever
- n.Curfn = Curfn
+ n.Name.Curfn = Curfn
Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
dowidth(t)
@@ -700,11 +697,11 @@
lab.Labelpc = Pc
}
- if n.Defn != nil {
- switch n.Defn.Op {
+ if n.Name.Defn != nil {
+ switch n.Name.Defn.Op {
// so stmtlabel can find the label
case OFOR, OSWITCH, OSELECT:
- n.Defn.Sym = lab.Sym
+ n.Name.Defn.Sym = lab.Sym
}
}
@@ -788,10 +785,10 @@
lab.Continpc = continpc
}
- gen(n.Nincr) // contin: incr
- Patch(p1, Pc) // test:
- Bgen(n.Ntest, false, -1, breakpc) // if(!test) goto break
- Genlist(n.Nbody) // body
+ gen(n.Right) // contin: incr
+ Patch(p1, Pc) // test:
+ Bgen(n.Left, false, -1, breakpc) // if(!test) goto break
+ Genlist(n.Nbody) // body
gjmp(continpc)
Patch(breakpc, Pc) // done:
continpc = scontin
@@ -802,15 +799,15 @@
}
case OIF:
- p1 := gjmp(nil) // goto test
- p2 := gjmp(nil) // p2: goto else
- Patch(p1, Pc) // test:
- Bgen(n.Ntest, false, int(-n.Likely), p2) // if(!test) goto p2
- Genlist(n.Nbody) // then
- p3 := gjmp(nil) // goto done
- Patch(p2, Pc) // else:
- Genlist(n.Nelse) // else
- Patch(p3, Pc) // done:
+ p1 := gjmp(nil) // goto test
+ p2 := gjmp(nil) // p2: goto else
+ Patch(p1, Pc) // test:
+ Bgen(n.Left, false, int(-n.Likely), p2) // if(!test) goto p2
+ Genlist(n.Nbody) // then
+ p3 := gjmp(nil) // goto done
+ Patch(p2, Pc) // else:
+ Genlist(n.Rlist) // else
+ Patch(p3, Pc) // done:
case OSWITCH:
sbreak := breakpc
@@ -1122,7 +1119,7 @@
nodl.Type = Ptrto(Types[TUINT8])
Regalloc(&nodr, Types[Tptr], nil)
p := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &nodr)
- Datastring(nr.Val.U.(string), &p.From)
+ Datastring(nr.Val().U.(string), &p.From)
p.From.Type = obj.TYPE_ADDR
Thearch.Gmove(&nodr, &nodl)
Regfree(&nodr)
@@ -1130,7 +1127,7 @@
// length
nodl.Type = Types[Simtype[TUINT]]
nodl.Xoffset += int64(Array_nel) - int64(Array_array)
- Nodconst(&nodr, nodl.Type, int64(len(nr.Val.U.(string))))
+ Nodconst(&nodr, nodl.Type, int64(len(nr.Val().U.(string))))
Thearch.Gmove(&nodr, &nodl)
return true
}
diff --git a/src/cmd/compile/internal/gc/go.go b/src/cmd/compile/internal/gc/go.go
index dc33f62..024810e 100644
--- a/src/cmd/compile/internal/gc/go.go
+++ b/src/cmd/compile/internal/gc/go.go
@@ -66,8 +66,9 @@
// Mpint represents an integer constant.
type Mpint struct {
- Val big.Int
- Ovf bool // set if Val overflowed compiler limit (sticky)
+ Val big.Int
+ Ovf bool // set if Val overflowed compiler limit (sticky)
+ Rune bool // set if syntax indicates default type rune
}
// Mpflt represents a floating-point constant.
@@ -82,16 +83,43 @@
}
type Val struct {
- Ctype int16
// U contains one of:
- // bool bool when Ctype == CTBOOL
- // *Mpint int when Ctype == CTINT, rune when Ctype == CTRUNE
- // *Mpflt float when Ctype == CTFLT
- // *Mpcplx pair of floats when Ctype == CTCPLX
- // string string when Ctype == CTSTR
+ // bool bool when n.ValCtype() == CTBOOL
+ // *Mpint int when n.ValCtype() == CTINT, rune when n.ValCtype() == CTRUNE
+ // *Mpflt float when n.ValCtype() == CTFLT
+ // *Mpcplx pair of floats when n.ValCtype() == CTCPLX
+ // string string when n.ValCtype() == CTSTR
+ // *Nilval when n.ValCtype() == CTNIL
U interface{}
}
+type NilVal struct{}
+
+func (v Val) Ctype() int {
+ switch x := v.U.(type) {
+ default:
+ Fatal("unexpected Ctype for %T", v.U)
+ panic("not reached")
+ case nil:
+ return 0
+ case *NilVal:
+ return CTNIL
+ case bool:
+ return CTBOOL
+ case *Mpint:
+ if x.Rune {
+ return CTRUNE
+ }
+ return CTINT
+ case *Mpflt:
+ return CTFLT
+ case *Mpcplx:
+ return CTCPLX
+ case string:
+ return CTSTR
+ }
+}
+
type Pkg struct {
Name string // package name
Path string // string literal used in import statement
diff --git a/src/cmd/compile/internal/gc/go.y b/src/cmd/compile/internal/gc/go.y
index ae2e761..b2e0aed 100644
--- a/src/cmd/compile/internal/gc/go.y
+++ b/src/cmd/compile/internal/gc/go.y
@@ -246,7 +246,7 @@
pack := Nod(OPACK, nil, nil);
pack.Sym = my;
- pack.Pkg = ipkg;
+ pack.Name.Pkg = ipkg;
pack.Lineno = int32($1);
if strings.HasPrefix(my.Name, ".") {
@@ -549,10 +549,10 @@
// type switch - declare variable
nn = newname(n.Sym);
declare(nn, dclcontext);
- $$.Nname = nn;
+ $$.Rlist = list1(nn);
// keep track of the instances for reporting unused
- nn.Defn = typesw.Right;
+ nn.Name.Defn = typesw.Right;
}
}
}
@@ -595,10 +595,10 @@
// type switch - declare variable
nn = newname(n.Sym);
declare(nn, dclcontext);
- $$.Nname = nn;
+ $$.Rlist = list1(nn);
// keep track of the instances for reporting unused
- nn.Defn = typesw.Right;
+ nn.Name.Defn = typesw.Right;
}
}
}
@@ -700,14 +700,14 @@
if $1 != nil {
$$.Ninit = list1($1);
}
- $$.Ntest = $3;
- $$.Nincr = $5;
+ $$.Left = $3;
+ $$.Right = $5;
}
| osimple_stmt
{
// normal test
$$ = Nod(OFOR, nil, nil);
- $$.Ntest = $1;
+ $$.Left = $1;
}
| range_stmt
@@ -734,7 +734,7 @@
{
// test
$$ = Nod(OIF, nil, nil);
- $$.Ntest = $1;
+ $$.Left = $1;
}
| osimple_stmt ';' osimple_stmt
{
@@ -743,7 +743,7 @@
if $1 != nil {
$$.Ninit = list1($1);
}
- $$.Ntest = $3;
+ $$.Left = $3;
}
/* IF cond body (ELSE IF cond body)* (ELSE block)? */
@@ -754,7 +754,7 @@
}
if_header
{
- if $3.Ntest == nil {
+ if $3.Left == nil {
Yyerror("missing condition in if statement");
}
}
@@ -774,7 +774,7 @@
if nn.N.Op == OIF {
popdcl();
}
- n.Nelse = list1(nn.N);
+ n.Rlist = list1(nn.N);
n = nn.N;
}
}
@@ -786,7 +786,7 @@
}
if_header loop_body
{
- if $4.Ntest == nil {
+ if $4.Left == nil {
Yyerror("missing condition in if statement");
}
$4.Nbody = $5;
@@ -821,7 +821,7 @@
if_header
{
var n *Node
- n = $3.Ntest;
+ n = $3.Left;
if n != nil && n.Op != OTYPESW {
n = nil;
}
@@ -1010,7 +1010,7 @@
{
if $1.Op == OPACK {
var s *Sym
- s = restrictlookup($3.Name, $1.Pkg);
+ s = restrictlookup($3.Name, $1.Name.Pkg);
$1.Used = true;
$$ = oldname(s);
break;
@@ -1080,7 +1080,7 @@
}
keyval:
- expr ':' complitexpr
+ complitexpr ':' complitexpr
{
$$ = Nod(OKEY, $1, $3);
}
@@ -1221,8 +1221,8 @@
sym %prec NotParen
{
$$ = oldname($1);
- if $$.Pack != nil {
- $$.Pack.Used = true;
+ if $$.Name != nil && $$.Name.Pack != nil {
+ $$.Name.Pack.Used = true;
}
}
@@ -1299,7 +1299,7 @@
{
if $1.Op == OPACK {
var s *Sym
- s = restrictlookup($3.Name, $1.Pkg);
+ s = restrictlookup($3.Name, $1.Name.Pkg);
$1.Used = true;
$$ = oldname(s);
break;
@@ -1420,10 +1420,10 @@
t.Rlist = $5;
$$ = Nod(ODCLFUNC, nil, nil);
- $$.Nname = newfuncname($1);
- $$.Nname.Defn = $$;
- $$.Nname.Param.Ntype = t; // TODO: check if nname already has an ntype
- declare($$.Nname, PFUNC);
+ $$.Func.Nname = newfuncname($1);
+ $$.Func.Nname.Name.Defn = $$;
+ $$.Func.Nname.Name.Param.Ntype = t; // TODO: check if nname already has an ntype
+ declare($$.Func.Nname, PFUNC);
funchdr($$);
}
@@ -1455,11 +1455,11 @@
$$ = Nod(ODCLFUNC, nil, nil);
$$.Func.Shortname = newfuncname($4);
- $$.Nname = methodname1($$.Func.Shortname, rcvr.Right);
- $$.Nname.Defn = $$;
- $$.Nname.Param.Ntype = t;
- $$.Nname.Nointerface = nointerface;
- declare($$.Nname, PFUNC);
+ $$.Func.Nname = methodname1($$.Func.Shortname, rcvr.Right);
+ $$.Func.Nname.Name.Defn = $$;
+ $$.Func.Nname.Name.Param.Ntype = t;
+ $$.Func.Nname.Nointerface = nointerface;
+ declare($$.Func.Nname, PFUNC);
funchdr($$);
}
@@ -1638,44 +1638,44 @@
}
n = embedded(n.Sym, importpkg);
n.Right = $2;
- n.Val = $3;
+ n.SetVal($3)
$$ = list1(n);
break;
}
for l=$1; l != nil; l=l.Next {
l.N = Nod(ODCLFIELD, l.N, $2);
- l.N.Val = $3;
+ l.N.SetVal($3)
}
}
| embed oliteral
{
- $1.Val = $2;
+ $1.SetVal($2)
$$ = list1($1);
}
| '(' embed ')' oliteral
{
- $2.Val = $4;
+ $2.SetVal($4)
$$ = list1($2);
Yyerror("cannot parenthesize embedded type");
}
| '*' embed oliteral
{
$2.Right = Nod(OIND, $2.Right, nil);
- $2.Val = $3;
+ $2.SetVal($3)
$$ = list1($2);
}
| '(' '*' embed ')' oliteral
{
$3.Right = Nod(OIND, $3.Right, nil);
- $3.Val = $5;
+ $3.SetVal($5)
$$ = list1($3);
Yyerror("cannot parenthesize embedded type");
}
| '*' '(' embed ')' oliteral
{
$3.Right = Nod(OIND, $3.Right, nil);
- $3.Val = $5;
+ $3.SetVal($5)
$$ = list1($3);
Yyerror("cannot parenthesize embedded type");
}
@@ -1687,8 +1687,8 @@
$$ = $1;
n = oldname($1);
- if n.Pack != nil {
- n.Pack.Used = true;
+ if n.Name != nil && n.Name.Pack != nil {
+ n.Name.Pack.Used = true;
}
}
| LNAME '.' sym
@@ -1700,7 +1700,7 @@
pkg = localpkg;
} else {
$1.Def.Used = true;
- pkg = $1.Def.Pkg;
+ pkg = $1.Def.Name.Pkg;
}
$$ = restrictlookup($3.Name, pkg);
}
@@ -1808,7 +1808,7 @@
{
var l *NodeList
- $1.Defn = $4;
+ $1.Name.Defn = $4;
l = list1($1);
if $4 != nil {
l = list(l, $4);
@@ -1996,7 +1996,7 @@
oliteral:
{
- $$.Ctype = CTxxx;
+ $$.U = nil
}
| LLITERAL
@@ -2151,7 +2151,7 @@
if $1 != nil {
$$.Left = newname($1);
}
- $$.Val = $3;
+ $$.SetVal($3)
}
| sym LDDD hidden_type oliteral
{
@@ -2166,7 +2166,7 @@
$$.Left = newname($1);
}
$$.Isddd = true;
- $$.Val = $4;
+ $$.SetVal($4)
}
hidden_structdcl:
@@ -2177,7 +2177,7 @@
if $1 != nil && $1.Name != "?" {
$$ = Nod(ODCLFIELD, newname($1), typenod($2));
- $$.Val = $3;
+ $$.SetVal($3)
} else {
s = $2.Sym;
if s == nil && Isptr[$2.Etype] {
@@ -2189,7 +2189,7 @@
}
$$ = embedded(s, p);
$$.Right = typenod($2);
- $$.Val = $3;
+ $$.SetVal($3)
}
}
@@ -2231,16 +2231,16 @@
| '-' LLITERAL
{
$$ = nodlit($2);
- switch($$.Val.Ctype){
+ switch($$.Val().Ctype()){
case CTINT, CTRUNE:
- mpnegfix($$.Val.U.(*Mpint));
+ mpnegfix($$.Val().U.(*Mpint));
break;
case CTFLT:
- mpnegflt($$.Val.U.(*Mpflt));
+ mpnegflt($$.Val().U.(*Mpflt));
break;
case CTCPLX:
- mpnegflt(&$$.Val.U.(*Mpcplx).Real);
- mpnegflt(&$$.Val.U.(*Mpcplx).Imag);
+ mpnegflt(&$$.Val().U.(*Mpcplx).Real);
+ mpnegflt(&$$.Val().U.(*Mpcplx).Imag);
break;
default:
Yyerror("bad negated constant");
@@ -2258,14 +2258,14 @@
hidden_literal
| '(' hidden_literal '+' hidden_literal ')'
{
- if $2.Val.Ctype == CTRUNE && $4.Val.Ctype == CTINT {
+ if $2.Val().Ctype() == CTRUNE && $4.Val().Ctype() == CTINT {
$$ = $2;
- mpaddfixfix($2.Val.U.(*Mpint), $4.Val.U.(*Mpint), 0);
+ mpaddfixfix($2.Val().U.(*Mpint), $4.Val().U.(*Mpint), 0);
break;
}
- $4.Val.U.(*Mpcplx).Real = $4.Val.U.(*Mpcplx).Imag;
- Mpmovecflt(&$4.Val.U.(*Mpcplx).Imag, 0.0);
- $$ = nodcplxlit($2.Val, $4.Val);
+ $4.Val().U.(*Mpcplx).Real = $4.Val().U.(*Mpcplx).Imag;
+ Mpmovecflt(&$4.Val().U.(*Mpcplx).Imag, 0.0);
+ $$ = nodcplxlit($2.Val(), $4.Val());
}
hidden_import_list:
diff --git a/src/cmd/compile/internal/gc/gsubr.go b/src/cmd/compile/internal/gc/gsubr.go
index 5ec4587..14dc927 100644
--- a/src/cmd/compile/internal/gc/gsubr.go
+++ b/src/cmd/compile/internal/gc/gsubr.go
@@ -196,11 +196,11 @@
}
if p.From.Name == obj.NAME_AUTO && p.From.Node != nil {
- p.From.Offset += ((p.From.Node).(*Node)).Stkdelta
+ p.From.Offset += stkdelta[p.From.Node.(*Node)]
}
if p.To.Name == obj.NAME_AUTO && p.To.Node != nil {
- p.To.Offset += ((p.To.Node).(*Node)).Stkdelta
+ p.To.Offset += stkdelta[p.To.Node.(*Node)]
}
lp = &p.Link
@@ -214,6 +214,7 @@
p.To.Sym = nil
p.To.Type = obj.TYPE_CONST
p.To.Offset = nam.Type.Width
+ p.From3 = new(obj.Addr)
if nam.Name.Readonly {
p.From3.Offset = obj.RODATA
}
@@ -233,6 +234,7 @@
}
p.To.Type = obj.TYPE_CONST
p.To.Offset = int64(width)
+ p.From3 = new(obj.Addr)
p.From3.Offset = int64(flags)
}
@@ -406,26 +408,26 @@
if Thearch.Thechar == '8' {
a.Width = 0
}
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
default:
Fatal("naddr: const %v", Tconv(n.Type, obj.FmtLong))
case CTFLT:
a.Type = obj.TYPE_FCONST
- a.Val = mpgetflt(n.Val.U.(*Mpflt))
+ a.Val = mpgetflt(n.Val().U.(*Mpflt))
case CTINT, CTRUNE:
a.Sym = nil
a.Type = obj.TYPE_CONST
- a.Offset = Mpgetfix(n.Val.U.(*Mpint))
+ a.Offset = Mpgetfix(n.Val().U.(*Mpint))
case CTSTR:
- datagostring(n.Val.U.(string), a)
+ datagostring(n.Val().U.(string), a)
case CTBOOL:
a.Sym = nil
a.Type = obj.TYPE_CONST
- a.Offset = int64(obj.Bool2int(n.Val.U.(bool)))
+ a.Offset = int64(obj.Bool2int(n.Val().U.(bool)))
case CTNIL:
a.Sym = nil
diff --git a/src/cmd/compile/internal/gc/init.go b/src/cmd/compile/internal/gc/init.go
index 92bfeec..5fbc82d 100644
--- a/src/cmd/compile/internal/gc/init.go
+++ b/src/cmd/compile/internal/gc/init.go
@@ -114,22 +114,22 @@
fn := Nod(ODCLFUNC, nil, nil)
initsym := Lookup("init")
- fn.Nname = newname(initsym)
- fn.Nname.Defn = fn
- fn.Nname.Param.Ntype = Nod(OTFUNC, nil, nil)
- declare(fn.Nname, PFUNC)
+ fn.Func.Nname = newname(initsym)
+ fn.Func.Nname.Name.Defn = fn
+ fn.Func.Nname.Name.Param.Ntype = Nod(OTFUNC, nil, nil)
+ declare(fn.Func.Nname, PFUNC)
funchdr(fn)
// (3)
a := Nod(OIF, nil, nil)
- a.Ntest = Nod(ONE, gatevar, Nodintconst(0))
+ a.Left = Nod(ONE, gatevar, Nodintconst(0))
r = list(r, a)
// (4)
b := Nod(OIF, nil, nil)
- b.Ntest = Nod(OEQ, gatevar, Nodintconst(2))
+ b.Left = Nod(OEQ, gatevar, Nodintconst(2))
b.Nbody = list1(Nod(ORETURN, nil, nil))
a.Nbody = list1(b)
@@ -176,7 +176,7 @@
a = Nod(ORETURN, nil, nil)
r = list(r, a)
- exportsym(fn.Nname)
+ exportsym(fn.Func.Nname)
fn.Nbody = r
funcbody(fn)
diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
index 22a5d3d..ea11740 100644
--- a/src/cmd/compile/internal/gc/inl.go
+++ b/src/cmd/compile/internal/gc/inl.go
@@ -102,7 +102,7 @@
if fn.Op != ODCLFUNC {
Fatal("caninl %v", fn)
}
- if fn.Nname == nil {
+ if fn.Func.Nname == nil {
Fatal("caninl no nname %v", Nconv(fn, obj.FmtSign))
}
@@ -143,19 +143,19 @@
savefn := Curfn
Curfn = fn
- fn.Nname.Func.Inl = fn.Nbody
- fn.Nbody = inlcopylist(fn.Nname.Func.Inl)
- fn.Nname.Func.Inldcl = inlcopylist(fn.Nname.Defn.Func.Dcl)
- fn.Nname.Func.InlCost = int32(maxBudget - budget)
+ fn.Func.Nname.Func.Inl = fn.Nbody
+ fn.Nbody = inlcopylist(fn.Func.Nname.Func.Inl)
+ fn.Func.Nname.Func.Inldcl = inlcopylist(fn.Func.Nname.Name.Defn.Func.Dcl)
+ 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
// this is so export can find the body of a method
- fn.Type.Nname = fn.Nname
+ fn.Type.Nname = fn.Func.Nname
if Debug['m'] > 1 {
- fmt.Printf("%v: can inline %v as: %v { %v }\n", fn.Line(), Nconv(fn.Nname, obj.FmtSharp), Tconv(fn.Type, obj.FmtSharp), Hconv(fn.Nname.Func.Inl, obj.FmtSharp))
+ fmt.Printf("%v: can inline %v as: %v { %v }\n", fn.Line(), Nconv(fn.Func.Nname, obj.FmtSharp), Tconv(fn.Type, obj.FmtSharp), Hconv(fn.Func.Nname.Func.Inl, obj.FmtSharp))
} else if Debug['m'] != 0 {
- fmt.Printf("%v: can inline %v\n", fn.Line(), fn.Nname)
+ fmt.Printf("%v: can inline %v\n", fn.Line(), fn.Func.Nname)
}
Curfn = savefn
@@ -231,7 +231,7 @@
(*budget)--
- return *budget < 0 || ishairy(n.Left, budget) || ishairy(n.Right, budget) || ishairylist(n.List, budget) || ishairylist(n.Rlist, budget) || ishairylist(n.Ninit, budget) || ishairy(n.Ntest, budget) || ishairy(n.Nincr, budget) || ishairylist(n.Nbody, budget) || ishairylist(n.Nelse, budget)
+ return *budget < 0 || ishairy(n.Left, budget) || ishairy(n.Right, budget) || ishairylist(n.List, budget) || ishairylist(n.Rlist, budget) || ishairylist(n.Ninit, budget) || ishairylist(n.Nbody, budget)
}
// Inlcopy and inlcopylist recursively copy the body of a function.
@@ -265,10 +265,7 @@
m.List = inlcopylist(n.List)
m.Rlist = inlcopylist(n.Rlist)
m.Ninit = inlcopylist(n.Ninit)
- m.Ntest = inlcopy(n.Ntest)
- m.Nincr = inlcopy(n.Nincr)
m.Nbody = inlcopylist(n.Nbody)
- m.Nelse = inlcopylist(n.Nelse)
return m
}
@@ -374,7 +371,11 @@
inlnode(&n.Right)
if n.Right != nil && n.Right.Op == OINLCALL {
- inlconv2expr(&n.Right)
+ if n.Op == OFOR {
+ inlconv2stmt(n.Right)
+ } else {
+ inlconv2expr(&n.Right)
+ }
}
inlnodelist(n.List)
@@ -423,21 +424,15 @@
default:
for l := n.Rlist; l != nil; l = l.Next {
if l.N.Op == OINLCALL {
- inlconv2expr(&l.N)
+ if n.Op == OIF {
+ inlconv2stmt(l.N)
+ } else {
+ inlconv2expr(&l.N)
+ }
}
}
}
- inlnode(&n.Ntest)
- if n.Ntest != nil && n.Ntest.Op == OINLCALL {
- inlconv2expr(&n.Ntest)
- }
-
- inlnode(&n.Nincr)
- if n.Nincr != nil && n.Nincr.Op == OINLCALL {
- inlconv2stmt(n.Nincr)
- }
-
inlnodelist(n.Nbody)
for l := n.Nbody; l != nil; l = l.Next {
if l.N.Op == OINLCALL {
@@ -445,13 +440,6 @@
}
}
- inlnodelist(n.Nelse)
- for l := n.Nelse; l != nil; l = l.Next {
- if l.N.Op == OINLCALL {
- inlconv2stmt(l.N)
- }
- }
-
// with all the branches out of the way, it is now time to
// transmogrify this node itself unless inhibited by the
// switch at the top of this function.
@@ -533,7 +521,7 @@
return
}
- if fn == Curfn || fn.Defn == Curfn {
+ if fn == Curfn || fn.Name.Defn == Curfn {
return
}
@@ -562,7 +550,7 @@
//dumplist("ninit pre", ninit);
var dcl *NodeList
- if fn.Defn != nil { // local function
+ if fn.Name.Defn != nil { // local function
dcl = fn.Func.Inldcl // imported function
} else {
dcl = fn.Func.Dcl
@@ -784,7 +772,7 @@
inlgen++
body := inlsubstlist(fn.Func.Inl)
- body = list(body, Nod(OGOTO, inlretlabel, nil)) // avoid 'not used' when function doesnt have return
+ body = list(body, Nod(OGOTO, inlretlabel, nil)) // avoid 'not used' when function doesn't have return
body = list(body, Nod(OLABEL, inlretlabel, nil))
typechecklist(body, Etop)
@@ -840,7 +828,7 @@
n.Type = var_.Type
n.Class = PAUTO
n.Used = true
- n.Curfn = Curfn // the calling function, not the called one
+ n.Name.Curfn = Curfn // the calling function, not the called one
n.Addrtaken = var_.Addrtaken
// Esc pass wont run if we're inlining into a iface wrapper.
@@ -862,7 +850,7 @@
n.Type = t.Type
n.Class = PAUTO
n.Used = true
- n.Curfn = Curfn // the calling function, not the called one
+ n.Name.Curfn = Curfn // the calling function, not the called one
Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
return n
}
@@ -874,7 +862,7 @@
n.Type = t.Type
n.Class = PAUTO
n.Used = true
- n.Curfn = Curfn // the calling function, not the called one
+ n.Name.Curfn = Curfn // the calling function, not the called one
Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
return n
}
@@ -971,10 +959,7 @@
m.List = inlsubstlist(n.List)
m.Rlist = inlsubstlist(n.Rlist)
m.Ninit = concat(m.Ninit, inlsubstlist(n.Ninit))
- m.Ntest = inlsubst(n.Ntest)
- m.Nincr = inlsubst(n.Nincr)
m.Nbody = inlsubstlist(n.Nbody)
- m.Nelse = inlsubstlist(n.Nelse)
return m
}
@@ -1001,8 +986,5 @@
setlnolist(n.List, lno)
setlnolist(n.Rlist, lno)
setlnolist(n.Ninit, lno)
- setlno(n.Ntest, lno)
- setlno(n.Nincr, lno)
setlnolist(n.Nbody, lno)
- setlnolist(n.Nelse, lno)
}
diff --git a/src/cmd/compile/internal/gc/lex.go b/src/cmd/compile/internal/gc/lex.go
index cf41c40..afc5de9 100644
--- a/src/cmd/compile/internal/gc/lex.go
+++ b/src/cmd/compile/internal/gc/lex.go
@@ -28,11 +28,12 @@
var imported_unsafe int
-var goos string
-
-var goarch string
-
-var goroot string
+var (
+ goos string
+ goarch string
+ goroot string
+ buildid string
+)
var (
Debug_wb int
@@ -203,6 +204,7 @@
obj.Flagfn0("V", "print compiler version", doversion)
obj.Flagcount("W", "debug parse tree after type checking", &Debug['W'])
obj.Flagstr("asmhdr", "write assembly header to `file`", &asmhdr)
+ obj.Flagstr("buildid", "record `id` as the build id in the export metadata", &buildid)
obj.Flagcount("complete", "compiling complete package (no C or assembly)", &pure_go)
obj.Flagstr("d", "print debug information about items in `list`", &debugstr)
obj.Flagcount("e", "no limit on number of errors reported", &Debug['e'])
@@ -368,7 +370,7 @@
defercheckwidth()
for l := xtop; l != nil; l = l.Next {
- if l.N.Op != ODCL && l.N.Op != OAS {
+ if l.N.Op != ODCL && l.N.Op != OAS && l.N.Op != OAS2 {
typecheck(&l.N, Etop)
}
}
@@ -376,7 +378,7 @@
// Phase 2: Variable assignments.
// To check interface assignments, depends on phase 1.
for l := xtop; l != nil; l = l.Next {
- if l.N.Op == ODCL || l.N.Op == OAS {
+ if l.N.Op == ODCL || l.N.Op == OAS || l.N.Op == OAS2 {
typecheck(&l.N, Etop)
}
}
@@ -400,7 +402,7 @@
// This needs to run before escape analysis,
// because variables captured by value do not escape.
for l := xtop; l != nil; l = l.Next {
- if l.N.Op == ODCLFUNC && l.N.Param.Closure != nil {
+ if l.N.Op == ODCLFUNC && l.N.Func.Closure != nil {
Curfn = l.N
capturevars(l.N)
}
@@ -454,7 +456,7 @@
// This needs to happen before walk, because closures must be transformed
// before walk reaches a call of a closure.
for l := xtop; l != nil; l = l.Next {
- if l.N.Op == ODCLFUNC && l.N.Param.Closure != nil {
+ if l.N.Op == ODCLFUNC && l.N.Func.Closure != nil {
Curfn = l.N
transformclosure(l.N)
}
@@ -639,7 +641,7 @@
}
func importfile(f *Val, line int) {
- if f.Ctype != CTSTR {
+ if _, ok := f.U.(string); !ok {
Yyerror("import statement not a string")
fakeimport()
return
@@ -1064,9 +1066,10 @@
ungetc(int(v))
}
- yylval.val.U = new(Mpint)
- Mpmovecfix(yylval.val.U.(*Mpint), v)
- yylval.val.Ctype = CTRUNE
+ x := new(Mpint)
+ yylval.val.U = x
+ Mpmovecfix(x, v)
+ x.Rune = true
if Debug['x'] != 0 {
fmt.Printf("lex: codepoint literal\n")
}
@@ -1410,7 +1413,6 @@
Mpmovecfix(yylval.val.U.(*Mpint), 0)
}
- yylval.val.Ctype = CTINT
if Debug['x'] != 0 {
fmt.Printf("lex: integer literal\n")
}
@@ -1472,7 +1474,6 @@
Mpmovecflt(&yylval.val.U.(*Mpcplx).Real, 0.0)
}
- yylval.val.Ctype = CTCPLX
if Debug['x'] != 0 {
fmt.Printf("lex: imaginary literal\n")
}
@@ -1491,7 +1492,6 @@
Mpmovecflt(yylval.val.U.(*Mpflt), 0.0)
}
- yylval.val.Ctype = CTFLT
if Debug['x'] != 0 {
fmt.Printf("lex: floating literal\n")
}
@@ -1500,7 +1500,6 @@
strlit:
yylval.val.U = internString(cp.Bytes())
- yylval.val.Ctype = CTSTR
if Debug['x'] != 0 {
fmt.Printf("lex: string literal\n")
}
@@ -2185,6 +2184,7 @@
s1.Lexical = LNAME
s1.Def = typenod(t)
+ s1.Def.Name = new(Name)
continue
}
@@ -2210,11 +2210,13 @@
s = Pkglookup("true", builtinpkg)
s.Def = Nodbool(true)
s.Def.Sym = Lookup("true")
+ s.Def.Name = new(Name)
s.Def.Type = idealbool
s = Pkglookup("false", builtinpkg)
s.Def = Nodbool(false)
s.Def.Sym = Lookup("false")
+ s.Def.Name = new(Name)
s.Def.Type = idealbool
s = Lookup("_")
@@ -2235,9 +2237,10 @@
Types[TNIL] = typ(TNIL)
s = Pkglookup("nil", builtinpkg)
var v Val
- v.Ctype = CTNIL
+ v.U = new(NilVal)
s.Def = nodlit(v)
s.Def.Sym = s
+ s.Def.Name = new(Name)
}
func lexinit1() {
@@ -2285,6 +2288,7 @@
bytetype.Sym = s1
s1.Lexical = LNAME
s1.Def = typenod(bytetype)
+ s1.Def.Name = new(Name)
// rune alias
s = Lookup("rune")
@@ -2295,6 +2299,7 @@
runetype.Sym = s1
s1.Lexical = LNAME
s1.Def = typenod(runetype)
+ s1.Def.Name = new(Name)
}
func lexfini() {
@@ -2314,6 +2319,7 @@
etype = syms[i].etype
if etype != Txxx && (etype != TANY || Debug['A'] != 0) && s.Def == nil {
s.Def = typenod(Types[etype])
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
@@ -2331,6 +2337,7 @@
s = Lookup(Thearch.Typedefs[i].Name)
if s.Def == nil {
s.Def = typenod(Types[Thearch.Typedefs[i].Etype])
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
}
@@ -2341,27 +2348,31 @@
if s.Def == nil {
s.Def = typenod(bytetype)
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
s = Lookup("error")
if s.Def == nil {
s.Def = typenod(errortype)
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
s = Lookup("rune")
if s.Def == nil {
s.Def = typenod(runetype)
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
s = Lookup("nil")
if s.Def == nil {
var v Val
- v.Ctype = CTNIL
+ v.U = new(NilVal)
s.Def = nodlit(v)
s.Def.Sym = s
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
@@ -2376,6 +2387,7 @@
if s.Def == nil {
s.Def = Nodbool(true)
s.Def.Sym = s
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
@@ -2383,6 +2395,7 @@
if s.Def == nil {
s.Def = Nodbool(false)
s.Def.Sym = s
+ s.Def.Name = new(Name)
s.Origpkg = builtinpkg
}
@@ -2566,7 +2579,7 @@
// errors if a conflicting top-level name is
// introduced by a different file.
if !s.Def.Used && nsyntaxerrors == 0 {
- pkgnotused(int(s.Def.Lineno), s.Def.Pkg.Path, s.Name)
+ pkgnotused(int(s.Def.Lineno), s.Def.Name.Pkg.Path, s.Name)
}
s.Def = nil
continue
@@ -2575,9 +2588,9 @@
if s.Def.Sym != s {
// throw away top-level name left over
// from previous import . "x"
- if s.Def.Pack != nil && !s.Def.Pack.Used && nsyntaxerrors == 0 {
- pkgnotused(int(s.Def.Pack.Lineno), s.Def.Pack.Pkg.Path, "")
- s.Def.Pack.Used = true
+ if s.Def.Name != nil && s.Def.Name.Pack != nil && !s.Def.Name.Pack.Used && nsyntaxerrors == 0 {
+ pkgnotused(int(s.Def.Name.Pack.Lineno), s.Def.Name.Pack.Name.Pkg.Path, "")
+ s.Def.Name.Pack.Used = true
}
s.Def = nil
@@ -2599,6 +2612,10 @@
if i := strings.LastIndex(p, "."); i >= 0 {
p = p[:i]
}
- outfile = fmt.Sprintf("%s.o", p)
+ suffix := ".o"
+ if writearchive > 0 {
+ suffix = ".a"
+ }
+ outfile = p + suffix
}
}
diff --git a/src/cmd/compile/internal/gc/mkbuiltin.go b/src/cmd/compile/internal/gc/mkbuiltin.go
index f4569b4..ea3877f 100644
--- a/src/cmd/compile/internal/gc/mkbuiltin.go
+++ b/src/cmd/compile/internal/gc/mkbuiltin.go
@@ -46,7 +46,7 @@
if err := exec.Command("go", "tool", "compile", "-A", "builtin/"+name+".go").Run(); err != nil {
log.Fatal(err)
}
- obj := "name.o"
+ obj := name + ".o"
defer os.Remove(obj)
r, err := os.Open(obj)
diff --git a/src/cmd/compile/internal/gc/mparith3.go b/src/cmd/compile/internal/gc/mparith3.go
index 0e0b626..bda35bc 100644
--- a/src/cmd/compile/internal/gc/mparith3.go
+++ b/src/cmd/compile/internal/gc/mparith3.go
@@ -178,7 +178,7 @@
func Fconv(fvp *Mpflt, flag int) string {
if flag&obj.FmtSharp == 0 {
- return fvp.Val.Format('b', 0)
+ return fvp.Val.Text('b', 0)
}
// use decimal format for error messages
diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go
index 9bb334c..22b10d9 100644
--- a/src/cmd/compile/internal/gc/obj.go
+++ b/src/cmd/compile/internal/gc/obj.go
@@ -286,6 +286,7 @@
p.From.Name = obj.NAME_EXTERN
p.From.Sym = Linksym(s)
p.From.Offset = int64(off)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(Widthptr)
@@ -334,6 +335,7 @@
p.From.Name = obj.NAME_EXTERN
p.From.Sym = Linksym(s)
p.From.Offset = int64(off)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(Widthptr)
datagostring(*lit, &p.To)
@@ -350,6 +352,7 @@
p.From.Name = obj.NAME_EXTERN
p.From.Offset = int64(off)
p.From.Sym = Linksym(s)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(len(t))
@@ -366,6 +369,7 @@
p.From.Name = obj.NAME_EXTERN
p.From.Sym = Linksym(s)
p.From.Offset = int64(off)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(Widthptr)
p.To.Type = obj.TYPE_ADDR
@@ -379,18 +383,19 @@
func gdata(nam *Node, nr *Node, wid int) {
if nr.Op == OLITERAL {
- switch nr.Val.Ctype {
+ switch nr.Val().Ctype() {
case CTCPLX:
- gdatacomplex(nam, nr.Val.U.(*Mpcplx))
+ gdatacomplex(nam, nr.Val().U.(*Mpcplx))
return
case CTSTR:
- gdatastring(nam, nr.Val.U.(string))
+ gdatastring(nam, nr.Val().U.(string))
return
}
}
p := Thearch.Gins(obj.ADATA, nam, nr)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(wid)
}
@@ -400,12 +405,14 @@
w = int(Types[w].Width)
p := Thearch.Gins(obj.ADATA, nam, nil)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(w)
p.To.Type = obj.TYPE_FCONST
p.To.Val = mpgetflt(&cval.Real)
p = Thearch.Gins(obj.ADATA, nam, nil)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(w)
p.From.Offset += int64(w)
@@ -418,15 +425,17 @@
p := Thearch.Gins(obj.ADATA, nam, nil)
Datastring(sval, &p.To)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = Types[Tptr].Width
p.To.Type = obj.TYPE_ADDR
- //print("%P\n", p);
+ //print("%v\n", p);
Nodconst(&nod1, Types[TINT], int64(len(sval)))
p = Thearch.Gins(obj.ADATA, nam, &nod1)
+ p.From3 = new(obj.Addr)
p.From3.Type = obj.TYPE_CONST
p.From3.Offset = int64(Widthint)
p.From.Offset += int64(Widthptr)
diff --git a/src/cmd/compile/internal/gc/order.go b/src/cmd/compile/internal/gc/order.go
index ee0ec52..7d89a82 100644
--- a/src/cmd/compile/internal/gc/order.go
+++ b/src/cmd/compile/internal/gc/order.go
@@ -50,7 +50,7 @@
// described in the comment at the top of the file.
func order(fn *Node) {
if Debug['W'] > 1 {
- s := fmt.Sprintf("\nbefore order %v", fn.Nname.Sym)
+ s := fmt.Sprintf("\nbefore order %v", fn.Func.Nname.Sym)
dumplist(s, fn.Nbody)
}
@@ -490,7 +490,7 @@
case OASOP:
// Special: rewrite l op= r into l = l op r.
- // This simplies quite a few operations;
+ // This simplifies quite a few operations;
// most important is that it lets us separate
// out map read from map write when l is
// a map index expression.
@@ -646,12 +646,12 @@
case OFOR:
t := marktemp(order)
- orderexprinplace(&n.Ntest, order)
+ orderexprinplace(&n.Left, order)
var l *NodeList
cleantempnopop(t, order, &l)
n.Nbody = concat(l, n.Nbody)
orderblock(&n.Nbody)
- orderstmtinplace(&n.Nincr)
+ orderstmtinplace(&n.Right)
order.out = list(order.out, n)
cleantemp(t, order)
@@ -660,16 +660,16 @@
case OIF:
t := marktemp(order)
- orderexprinplace(&n.Ntest, order)
+ orderexprinplace(&n.Left, order)
var l *NodeList
cleantempnopop(t, order, &l)
n.Nbody = concat(l, n.Nbody)
l = nil
cleantempnopop(t, order, &l)
- n.Nelse = concat(l, n.Nelse)
+ n.Rlist = concat(l, n.Rlist)
poptemp(t, order)
orderblock(&n.Nbody)
- orderblock(&n.Nelse)
+ orderblock(&n.Rlist)
order.out = list(order.out, n)
// Special: argument will be converted to interface using convT2E
@@ -736,7 +736,7 @@
n.Right = ordercopyexpr(r, r.Type, order, 0)
// n->alloc is the temp for the iterator.
- n.Alloc = ordertemp(Types[TUINT8], order, true)
+ prealloc[n] = ordertemp(Types[TUINT8], order, true)
}
for l := n.List; l != nil; l = l.Next {
@@ -793,7 +793,7 @@
if t != nil && t.N.Op == ODCL && t.N.Left == r.Left {
t = t.Next
}
- if t != nil && t.N.Op == ODCL && t.N.Left == r.Ntest {
+ if t != nil && t.N.Op == ODCL && r.List != nil && t.N.Left == r.List.N {
t = t.Next
}
if t == nil {
@@ -844,19 +844,19 @@
l.N.Ninit = list(l.N.Ninit, tmp2)
}
- if r.Ntest != nil && isblank(r.Ntest) {
- r.Ntest = nil
+ if r.List != nil && isblank(r.List.N) {
+ r.List = nil
}
- if r.Ntest != nil {
- tmp1 = r.Ntest
+ if r.List != nil {
+ tmp1 = r.List.N
if r.Colas {
tmp2 = Nod(ODCL, tmp1, nil)
typecheck(&tmp2, Etop)
l.N.Ninit = list(l.N.Ninit, tmp2)
}
- r.Ntest = ordertemp(tmp1.Type, order, false)
- tmp2 = Nod(OAS, tmp1, r.Ntest)
+ r.List = list1(ordertemp(tmp1.Type, order, false))
+ tmp2 = Nod(OAS, tmp1, r.List.N)
typecheck(&tmp2, Etop)
l.N.Ninit = list(l.N.Ninit, tmp2)
}
@@ -918,7 +918,7 @@
case OSWITCH:
t := marktemp(order)
- orderexpr(&n.Ntest, order, nil)
+ orderexpr(&n.Left, order, nil)
for l := n.List; l != nil; l = l.Next {
if l.N.Op != OXCASE {
Fatal("order switch case %v", Oconv(int(l.N.Op), 0))
@@ -949,6 +949,9 @@
}
}
+// prealloc[x] records the allocation to use for x.
+var prealloc = map[*Node]*Node{}
+
// Orderexpr orders a single expression, appending side
// effects to order->out as needed.
// If this is part of an assignment lhs = *np, lhs is given.
@@ -980,7 +983,7 @@
t := typ(TARRAY)
t.Bound = int64(count(n.List))
t.Type = Types[TSTRING]
- n.Alloc = ordertemp(t, order, false)
+ prealloc[n] = ordertemp(t, order, false)
}
// Mark string(byteSlice) arguments to reuse byteSlice backing
@@ -995,7 +998,7 @@
haslit := false
for l := n.List; l != nil; l = l.Next {
hasbyte = hasbyte || l.N.Op == OARRAYBYTESTR
- haslit = haslit || l.N.Op == OLITERAL && len(l.N.Val.U.(string)) != 0
+ haslit = haslit || l.N.Op == OLITERAL && len(l.N.Val().U.(string)) != 0
}
if haslit && hasbyte {
@@ -1118,7 +1121,7 @@
case OCLOSURE:
if n.Noescape && n.Func.Cvars != nil {
- n.Alloc = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
+ prealloc[n] = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
}
case OARRAYLIT, OCALLPART:
@@ -1127,7 +1130,7 @@
orderexprlist(n.List, order)
orderexprlist(n.Rlist, order)
if n.Noescape {
- n.Alloc = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
+ prealloc[n] = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
}
case ODDDARG:
@@ -1136,7 +1139,7 @@
// Allocate a temporary that will be cleaned up when this statement
// completes. We could be more aggressive and try to arrange for it
// to be cleaned up when the call completes.
- n.Alloc = ordertemp(n.Type.Type, order, false)
+ prealloc[n] = ordertemp(n.Type.Type, order, false)
}
case ODOTTYPE, ODOTTYPE2:
diff --git a/src/cmd/compile/internal/gc/pgen.go b/src/cmd/compile/internal/gc/pgen.go
index 50cf0d1..e6b670f 100644
--- a/src/cmd/compile/internal/gc/pgen.go
+++ b/src/cmd/compile/internal/gc/pgen.go
@@ -130,7 +130,7 @@
}
func emitptrargsmap() {
- sym := Lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Nname.Sym.Name))
+ sym := Lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Func.Nname.Sym.Name))
nptr := int(Curfn.Type.Argwid / int64(Widthptr))
bv := bvalloc(int32(nptr) * 2)
@@ -217,6 +217,11 @@
return stringsCompare(a.Sym.Name, b.Sym.Name)
}
+// stkdelta records the stack offset delta for a node
+// during the compaction of the stack frame to remove
+// unused stack slots.
+var stkdelta = map[*Node]int64{}
+
// TODO(lvd) find out where the PAUTO/OLITERAL nodes come from.
func allocauto(ptxt *obj.Prog) {
Stksize = 0
@@ -284,7 +289,7 @@
Yyerror("stack frame too large (>2GB)")
}
- n.Stkdelta = -Stksize - n.Xoffset
+ stkdelta[n] = -Stksize - n.Xoffset
}
Stksize = Rnd(Stksize, int64(Widthreg))
@@ -297,8 +302,8 @@
if ll.N.Class != PAUTO || ll.N.Op != ONAME {
continue
}
- ll.N.Xoffset += ll.N.Stkdelta
- ll.N.Stkdelta = 0
+ ll.N.Xoffset += stkdelta[ll.N]
+ delete(stkdelta, ll.N)
}
}
@@ -351,8 +356,8 @@
var gclocals *Sym
var ssafn *ssa.Func
if fn.Nbody == nil {
- if pure_go != 0 || strings.HasPrefix(fn.Nname.Sym.Name, "init.") {
- Yyerror("missing function body for %q", fn.Nname.Sym.Name)
+ if pure_go != 0 || strings.HasPrefix(fn.Func.Nname.Sym.Name, "init.") {
+ Yyerror("missing function body for %q", fn.Func.Nname.Sym.Name)
goto ret
}
@@ -403,7 +408,7 @@
// Build an SSA backend function
{
- name := Curfn.Nname.Sym.Name
+ name := Curfn.Func.Nname.Sym.Name
if len(name) > 4 && name[len(name)-4:] == "_ssa" {
ssafn = buildssa(Curfn)
}
@@ -413,16 +418,17 @@
breakpc = nil
pl = newplist()
- pl.Name = Linksym(Curfn.Nname.Sym)
+ pl.Name = Linksym(Curfn.Func.Nname.Sym)
setlineno(Curfn)
Nodconst(&nod1, Types[TINT32], 0)
- nam = Curfn.Nname
+ nam = Curfn.Func.Nname
if isblank(nam) {
nam = nil
}
ptxt = Thearch.Gins(obj.ATEXT, nam, &nod1)
+ ptxt.From3 = new(obj.Addr)
if fn.Func.Dupok {
ptxt.From3.Offset |= obj.DUPOK
}
@@ -440,20 +446,20 @@
// See test/recover.go for test cases and src/reflect/value.go
// for the actual functions being considered.
if myimportpath != "" && myimportpath == "reflect" {
- if Curfn.Nname.Sym.Name == "callReflect" || Curfn.Nname.Sym.Name == "callMethod" {
+ if Curfn.Func.Nname.Sym.Name == "callReflect" || Curfn.Func.Nname.Sym.Name == "callMethod" {
ptxt.From3.Offset |= obj.WRAPPER
}
}
- Afunclit(&ptxt.From, Curfn.Nname)
+ Afunclit(&ptxt.From, Curfn.Func.Nname)
ginit()
gcargs = makefuncdatasym("gcargs·%d", obj.FUNCDATA_ArgsPointerMaps)
gclocals = makefuncdatasym("gclocals·%d", obj.FUNCDATA_LocalsPointerMaps)
- for t := Curfn.Paramfld; t != nil; t = t.Down {
- gtrack(tracksym(t.Type))
+ for _, t := range Curfn.Func.Fieldtrack {
+ gtrack(tracksym(t))
}
for l := fn.Func.Dcl; l != nil; l = l.Next {
diff --git a/src/cmd/compile/internal/gc/plive.go b/src/cmd/compile/internal/gc/plive.go
index b4d0699..efaf69f 100644
--- a/src/cmd/compile/internal/gc/plive.go
+++ b/src/cmd/compile/internal/gc/plive.go
@@ -233,23 +233,23 @@
// Later, when we want to find the index of a node in the variables list,
// we will check that n->curfn == curfn and n->opt > 0. Then n->opt - 1
// is the index in the variables list.
- ll.N.Opt = nil
+ ll.N.SetOpt(nil)
// The compiler doesn't emit initializations for zero-width parameters or results.
if ll.N.Type.Width == 0 {
continue
}
- ll.N.Curfn = Curfn
+ ll.N.Name.Curfn = Curfn
switch ll.N.Class {
case PAUTO:
if haspointers(ll.N.Type) {
- ll.N.Opt = int32(len(result))
+ ll.N.SetOpt(int32(len(result)))
result = append(result, ll.N)
}
case PPARAM, PPARAMOUT:
- ll.N.Opt = int32(len(result))
+ ll.N.SetOpt(int32(len(result)))
result = append(result, ll.N)
}
}
@@ -585,7 +585,7 @@
// If the result had its address taken, it is being tracked
// by the avarinit code, which does not use uevar.
// If we added it to uevar too, we'd not see any kill
- // and decide that the varible was live entry, which it is not.
+ // and decide that the variable was live entry, which it is not.
// So only use uevar in the non-addrtaken case.
// The p->to.type == thearch.D_NONE limits the bvset to
// non-tail-call return instructions; see note above
@@ -618,10 +618,10 @@
if prog.Info.Flags&(LeftRead|LeftWrite|LeftAddr) != 0 {
from := &prog.From
- if from.Node != nil && from.Sym != nil && ((from.Node).(*Node)).Curfn == Curfn {
+ if from.Node != nil && from.Sym != nil && ((from.Node).(*Node)).Name.Curfn == Curfn {
switch ((from.Node).(*Node)).Class &^ PHEAP {
case PAUTO, PPARAM, PPARAMOUT:
- pos, ok := from.Node.(*Node).Opt.(int32) // index in vars
+ pos, ok := from.Node.(*Node).Opt().(int32) // index in vars
if !ok {
goto Next
}
@@ -647,10 +647,10 @@
Next:
if prog.Info.Flags&(RightRead|RightWrite|RightAddr) != 0 {
to := &prog.To
- if to.Node != nil && to.Sym != nil && ((to.Node).(*Node)).Curfn == Curfn {
+ if to.Node != nil && to.Sym != nil && ((to.Node).(*Node)).Name.Curfn == Curfn {
switch ((to.Node).(*Node)).Class &^ PHEAP {
case PAUTO, PPARAM, PPARAMOUT:
- pos, ok := to.Node.(*Node).Opt.(int32) // index in vars
+ pos, ok := to.Node.(*Node).Opt().(int32) // index in vars
if !ok {
return
}
@@ -1284,7 +1284,7 @@
if !n.Name.Needzero {
n.Name.Needzero = true
if debuglive >= 1 {
- Warnl(int(p.Lineno), "%v: %v is ambiguously live", Curfn.Nname, Nconv(n, obj.FmtLong))
+ Warnl(int(p.Lineno), "%v: %v is ambiguously live", Curfn.Func.Nname, Nconv(n, obj.FmtLong))
}
// Record in 'ambiguous' bitmap.
@@ -1331,7 +1331,7 @@
var numlive int32
var msg []string
for _, bb := range lv.cfg {
- if debuglive >= 1 && Curfn.Nname.Sym.Name != "init" && Curfn.Nname.Sym.Name[0] != '.' {
+ if debuglive >= 1 && Curfn.Func.Nname.Sym.Name != "init" && Curfn.Func.Nname.Sym.Name[0] != '.' {
nmsg = int32(len(lv.livepointers))
startmsg = nmsg
msg = make([]string, nmsg)
@@ -1381,7 +1381,7 @@
}
n = lv.vars[j]
if n.Class != PPARAM {
- yyerrorl(int(p.Lineno), "internal error: %v %v recorded as live on entry", Curfn.Nname, Nconv(n, obj.FmtLong))
+ yyerrorl(int(p.Lineno), "internal error: %v %v recorded as live on entry", Curfn.Func.Nname, Nconv(n, obj.FmtLong))
}
}
}
@@ -1622,7 +1622,7 @@
var locals Bvec
var n *Node
- fmt.Printf("liveness: %s\n", Curfn.Nname.Sym.Name)
+ fmt.Printf("liveness: %s\n", Curfn.Func.Nname.Sym.Name)
uevar := bvalloc(int32(len(lv.vars)))
varkill := bvalloc(int32(len(lv.vars)))
@@ -1770,13 +1770,13 @@
// Change name to dump debugging information only for a specific function.
debugdelta := 0
- if Curfn.Nname.Sym.Name == "!" {
+ if Curfn.Func.Nname.Sym.Name == "!" {
debugdelta = 2
}
debuglive += debugdelta
if debuglive >= 3 {
- fmt.Printf("liveness: %s\n", Curfn.Nname.Sym.Name)
+ fmt.Printf("liveness: %s\n", Curfn.Func.Nname.Sym.Name)
printprog(firstp)
}
@@ -1819,7 +1819,7 @@
// Free everything.
for l := fn.Func.Dcl; l != nil; l = l.Next {
if l.N != nil {
- l.N.Opt = nil
+ l.N.SetOpt(nil)
}
}
freeliveness(lv)
diff --git a/src/cmd/compile/internal/gc/popt.go b/src/cmd/compile/internal/gc/popt.go
index ce904e1..4fc562c 100644
--- a/src/cmd/compile/internal/gc/popt.go
+++ b/src/cmd/compile/internal/gc/popt.go
@@ -263,7 +263,7 @@
if nf >= MaxFlowProg {
if Debug['v'] != 0 {
- Warn("%v is too big (%d instructions)", Curfn.Nname.Sym, nf)
+ Warn("%v is too big (%d instructions)", Curfn.Func.Nname.Sym, nf)
}
return nil
}
@@ -313,7 +313,7 @@
Fatal("fnil %v / %v", p, p.To.Val.(*obj.Prog))
}
if f1 == f {
- //fatal("self loop %P", p);
+ //fatal("self loop %v", p);
continue
}
@@ -593,7 +593,7 @@
if canmerge(n) {
v = &var_[nvar]
nvar++
- n.Opt = v
+ n.SetOpt(v)
v.node = n
}
}
@@ -604,18 +604,18 @@
// single-use (that's why we have so many!).
for f := g.Start; f != nil; f = f.Link {
p := f.Prog
- if p.From.Node != nil && ((p.From.Node).(*Node)).Opt != nil && p.To.Node != nil && ((p.To.Node).(*Node)).Opt != nil {
+ if p.From.Node != nil && ((p.From.Node).(*Node)).Opt() != nil && p.To.Node != nil && ((p.To.Node).(*Node)).Opt() != nil {
Fatal("double node %v", p)
}
v = nil
n, _ = p.From.Node.(*Node)
if n != nil {
- v, _ = n.Opt.(*TempVar)
+ v, _ = n.Opt().(*TempVar)
}
if v == nil {
n, _ = p.To.Node.(*Node)
if n != nil {
- v, _ = n.Opt.(*TempVar)
+ v, _ = n.Opt().(*TempVar)
}
}
if v != nil {
@@ -786,7 +786,7 @@
}
if debugmerge > 0 && Debug['v'] != 0 {
- fmt.Printf("%v [%d - %d]\n", Curfn.Nname.Sym, len(var_), nkill)
+ fmt.Printf("%v [%d - %d]\n", Curfn.Func.Nname.Sym, len(var_), nkill)
var v *TempVar
for i := 0; i < len(var_); i++ {
v = &var_[i]
@@ -816,14 +816,14 @@
p := f.Prog
n, _ = p.From.Node.(*Node)
if n != nil {
- v, _ = n.Opt.(*TempVar)
+ v, _ = n.Opt().(*TempVar)
if v != nil && v.merge != nil {
p.From.Node = v.merge.node
}
}
n, _ = p.To.Node.(*Node)
if n != nil {
- v, _ = n.Opt.(*TempVar)
+ v, _ = n.Opt().(*TempVar)
if v != nil && v.merge != nil {
p.To.Node = v.merge.node
}
@@ -840,7 +840,7 @@
Curfn.Func.Dcl.End = l
n = l.N
- v, _ = n.Opt.(*TempVar)
+ v, _ = n.Opt().(*TempVar)
if v != nil && (v.merge != nil || v.removed != 0) {
*lp = l.Next
continue
@@ -851,7 +851,7 @@
// Clear aux structures.
for i := 0; i < len(var_); i++ {
- var_[i].node.Opt = nil
+ var_[i].node.SetOpt(nil)
}
Flowend(g)
@@ -980,7 +980,7 @@
Flowend(g)
if Debug_checknil > 1 {
- fmt.Printf("%v: removed %d of %d nil checks\n", Curfn.Nname.Sym, nkill, ncheck)
+ fmt.Printf("%v: removed %d of %d nil checks\n", Curfn.Func.Nname.Sym, nkill, ncheck)
}
}
@@ -1026,10 +1026,10 @@
}
if(f1->p1 == nil && f1->p2 == nil) {
- print("lost pred for %P\n", fcheck->prog);
+ print("lost pred for %v\n", fcheck->prog);
for(f1=f0; f1!=nil; f1=f1->p1) {
thearch.proginfo(&info, f1->prog);
- print("\t%P %d %d %D %D\n", r1->prog, info.flags&RightWrite, thearch.sameaddr(&f1->prog->to, &fcheck->prog->from), &f1->prog->to, &fcheck->prog->from);
+ print("\t%v %d %d %D %D\n", r1->prog, info.flags&RightWrite, thearch.sameaddr(&f1->prog->to, &fcheck->prog->from), &f1->prog->to, &fcheck->prog->from);
}
fatal("lost pred trail");
}
diff --git a/src/cmd/compile/internal/gc/racewalk.go b/src/cmd/compile/internal/gc/racewalk.go
index 05a902e..f826097 100644
--- a/src/cmd/compile/internal/gc/racewalk.go
+++ b/src/cmd/compile/internal/gc/racewalk.go
@@ -48,7 +48,7 @@
// they might have been locked at the time of the fork. This means
// no rescheduling, no malloc calls, and no new stack segments.
// Race instrumentation does all of the above.
- return myimportpath != "" && myimportpath == "syscall" && fn.Nname.Sym.Name == "forkAndExecInChild"
+ return myimportpath != "" && myimportpath == "syscall" && fn.Func.Nname.Sym.Name == "forkAndExecInChild"
}
func racewalk(fn *Node) {
@@ -77,11 +77,11 @@
fn.Func.Exit = list(fn.Func.Exit, nd)
if Debug['W'] != 0 {
- s := fmt.Sprintf("after racewalk %v", fn.Nname.Sym)
+ s := fmt.Sprintf("after racewalk %v", fn.Func.Nname.Sym)
dumplist(s, fn.Nbody)
- s = fmt.Sprintf("enter %v", fn.Nname.Sym)
+ s = fmt.Sprintf("enter %v", fn.Func.Nname.Sym)
dumplist(s, fn.Func.Enter)
- s = fmt.Sprintf("exit %v", fn.Nname.Sym)
+ s = fmt.Sprintf("exit %v", fn.Func.Nname.Sym)
dumplist(s, fn.Func.Exit)
}
}
@@ -371,13 +371,25 @@
Yyerror("racewalk: OGETG can happen only in runtime which we don't instrument")
goto ret
+ case OFOR:
+ if n.Left != nil {
+ racewalknode(&n.Left, &n.Left.Ninit, 0, 0)
+ }
+ if n.Right != nil {
+ racewalknode(&n.Right, &n.Right.Ninit, 0, 0)
+ }
+ goto ret
+
+ case OIF, OSWITCH:
+ if n.Left != nil {
+ racewalknode(&n.Left, &n.Left.Ninit, 0, 0)
+ }
+ goto ret
+
// just do generic traversal
- case OFOR,
- OIF,
- OCALLMETH,
+ case OCALLMETH,
ORETURN,
ORETJMP,
- OSWITCH,
OSELECT,
OEMPTY,
OBREAK,
@@ -410,14 +422,7 @@
if n.Op != OBLOCK { // OBLOCK is handled above in a special way.
racewalklist(n.List, init)
}
- if n.Ntest != nil {
- racewalknode(&n.Ntest, &n.Ntest.Ninit, 0, 0)
- }
- if n.Nincr != nil {
- racewalknode(&n.Nincr, &n.Nincr.Ninit, 0, 0)
- }
racewalklist(n.Nbody, nil)
- racewalklist(n.Nelse, nil)
racewalklist(n.Rlist, nil)
*np = n
}
@@ -576,10 +581,7 @@
foreachnode(n.Left, f, c)
foreachnode(n.Right, f, c)
foreachlist(n.List, f, c)
- foreachnode(n.Ntest, f, c)
- foreachnode(n.Nincr, f, c)
foreachlist(n.Nbody, f, c)
- foreachlist(n.Nelse, f, c)
foreachlist(n.Rlist, f, c)
}
diff --git a/src/cmd/compile/internal/gc/range.go b/src/cmd/compile/internal/gc/range.go
index 03beb1c..26f05d9 100644
--- a/src/cmd/compile/internal/gc/range.go
+++ b/src/cmd/compile/internal/gc/range.go
@@ -36,7 +36,7 @@
// delicate little dance. see typecheckas2
for ll := n.List; ll != nil; ll = ll.Next {
- if ll.N.Defn != n {
+ if ll.N.Name == nil || ll.N.Name.Defn != n {
typecheck(&ll.N, Erv|Easgn)
}
}
@@ -102,7 +102,7 @@
}
if v1 != nil {
- if v1.Defn == n {
+ if v1.Name != nil && v1.Name.Defn == n {
v1.Type = t1
} else if v1.Type != nil && assignop(t1, v1.Type, &why) == 0 {
Yyerror("cannot assign type %v to %v in range%s", t1, Nconv(v1, obj.FmtLong), why)
@@ -111,7 +111,7 @@
}
if v2 != nil {
- if v2.Defn == n {
+ if v2.Name != nil && v2.Name.Defn == n {
v2.Type = t2
} else if v2.Type != nil && assignop(t2, v2.Type, &why) == 0 {
Yyerror("cannot assign type %v to %v in range%s", t2, Nconv(v2, obj.FmtLong), why)
@@ -146,6 +146,7 @@
a := n.Right
lno := int(setlineno(a))
+ n.Right = nil
var v1 *Node
if n.List != nil {
@@ -200,8 +201,7 @@
n.Op = OIF
n.Nbody = nil
- n.Ntest = Nod(ONE, Nod(OLEN, a, nil), Nodintconst(0))
- n.Nincr = nil
+ n.Left = Nod(ONE, Nod(OLEN, a, nil), Nodintconst(0))
// hp = &a[0]
hp := temp(Ptrto(Types[TUINT8]))
@@ -231,7 +231,7 @@
n.Nbody = list(n.Nbody, v1)
- typecheck(&n.Ntest, Erv)
+ typecheck(&n.Left, Erv)
typechecklist(n.Nbody, Etop)
walkstmt(&n)
lineno = int32(lno)
@@ -266,8 +266,8 @@
init = list(init, Nod(OAS, hp, Nod(OADDR, tmp, nil)))
}
- n.Ntest = Nod(OLT, hv1, hn)
- n.Nincr = Nod(OAS, hv1, Nod(OADD, hv1, Nodintconst(1)))
+ n.Left = Nod(OLT, hv1, hn)
+ n.Right = Nod(OAS, hv1, Nod(OADD, hv1, Nodintconst(1)))
if v1 == nil {
body = nil
} else if v2 == nil {
@@ -294,7 +294,7 @@
tmp.Right.Typecheck = 1
a = Nod(OAS, hp, tmp)
typecheck(&a, Etop)
- n.Nincr.Ninit = list1(a)
+ n.Right.Ninit = list1(a)
}
// orderstmt allocated the iterator for us.
@@ -303,7 +303,7 @@
ha := a
th := hiter(t)
- hit := n.Alloc
+ hit := prealloc[n]
hit.Type = th
n.Left = nil
keyname := newname(th.Type.Sym) // depends on layout of iterator struct. See reflect.go:hiter
@@ -313,11 +313,11 @@
substArgTypes(fn, t.Down, t.Type, th)
init = list(init, mkcall1(fn, nil, nil, typename(t), ha, Nod(OADDR, hit, nil)))
- n.Ntest = Nod(ONE, Nod(ODOT, hit, keyname), nodnil())
+ n.Left = Nod(ONE, Nod(ODOT, hit, keyname), nodnil())
fn = syslook("mapiternext", 1)
substArgTypes(fn, th)
- n.Nincr = mkcall1(fn, nil, nil, Nod(OADDR, hit, nil))
+ n.Right = mkcall1(fn, nil, nil, Nod(OADDR, hit, nil))
key := Nod(ODOT, hit, keyname)
key = Nod(OIND, key, nil)
@@ -338,7 +338,7 @@
case TCHAN:
ha := a
- n.Ntest = nil
+ n.Left = nil
hv1 := temp(t.Type)
hv1.Typecheck = 1
@@ -347,12 +347,12 @@
}
hb := temp(Types[TBOOL])
- n.Ntest = Nod(ONE, hb, Nodbool(false))
+ n.Left = Nod(ONE, hb, Nodbool(false))
a := Nod(OAS2RECV, nil, nil)
a.Typecheck = 1
a.List = list(list1(hv1), hb)
a.Rlist = list1(Nod(ORECV, ha, nil))
- n.Ntest.Ninit = list1(a)
+ n.Left.Ninit = list1(a)
if v1 == nil {
body = nil
} else {
@@ -380,8 +380,8 @@
a.Rlist = list1(mkcall1(fn, getoutargx(fn.Type), nil, ha, hv1))
}
- n.Ntest = Nod(ONE, hv1, Nodintconst(0))
- n.Ntest.Ninit = list(list1(Nod(OAS, ohv1, hv1)), a)
+ n.Left = Nod(ONE, hv1, Nodintconst(0))
+ n.Left.Ninit = list(list1(Nod(OAS, ohv1, hv1)), a)
body = nil
if v1 != nil {
@@ -395,9 +395,9 @@
n.Op = OFOR
typechecklist(init, Etop)
n.Ninit = concat(n.Ninit, init)
- typechecklist(n.Ntest.Ninit, Etop)
- typecheck(&n.Ntest, Erv)
- typecheck(&n.Nincr, Etop)
+ typechecklist(n.Left.Ninit, Etop)
+ typecheck(&n.Left, Erv)
+ typecheck(&n.Right, Etop)
typechecklist(body, Etop)
n.Nbody = concat(body, n.Nbody)
walkstmt(&n)
diff --git a/src/cmd/compile/internal/gc/reflect.go b/src/cmd/compile/internal/gc/reflect.go
index 6c0962f..8ef2380 100644
--- a/src/cmd/compile/internal/gc/reflect.go
+++ b/src/cmd/compile/internal/gc/reflect.go
@@ -105,7 +105,7 @@
return l
}
-// Builds a type respresenting a Bucket structure for
+// Builds a type representing a Bucket structure for
// the given map type. This type is not visible to users -
// we include only enough information to generate a correct GC
// program for it.
@@ -1234,7 +1234,7 @@
// a package that imports the first one and does use *T pointers.
// The second module will end up defining type data for *T and a
// type.*T symbol pointing at it. It's important that calling
- // .PtrTo() on the refect.Type for T returns this type data and
+ // .PtrTo() on the reflect.Type for T returns this type data and
// not some synthesized object, so we need reflect to be able to
// find it!
if !Ctxt.Flag_dynlink {
diff --git a/src/cmd/compile/internal/gc/reg.go b/src/cmd/compile/internal/gc/reg.go
index afe9523..0fa0535 100644
--- a/src/cmd/compile/internal/gc/reg.go
+++ b/src/cmd/compile/internal/gc/reg.go
@@ -201,7 +201,7 @@
if f1.Prog.As == obj.AVARKILL && f1.Prog.To.Node == n {
break
}
- for v, _ = n.Opt.(*Var); v != nil; v = v.nextinnode {
+ for v, _ = n.Opt().(*Var); v != nil; v = v.nextinnode {
bn = v.id
biset(&(f1.Data.(*Reg)).act, uint(bn))
}
@@ -432,9 +432,9 @@
// of Vars within the given Node, so that
// we can start at a Var and find all the other
// Vars in the same Go variable.
- v.nextinnode, _ = node.Opt.(*Var)
+ v.nextinnode, _ = node.Opt().(*Var)
- node.Opt = v
+ node.SetOpt(v)
bit := blsh(uint(i))
if n == obj.NAME_EXTERN || n == obj.NAME_STATIC {
@@ -563,7 +563,7 @@
continue
}
v = &vars[z*64+i]
- if v.node.Opt == nil { // v represents fixed register, not Go variable
+ if v.node.Opt() == nil { // v represents fixed register, not Go variable
continue
}
@@ -577,7 +577,7 @@
// To avoid the quadratic behavior, we only turn on the bits if
// v is the head of the list or if the head's bit is not yet turned on.
// This will set the bits at most twice, keeping the overall loop linear.
- v1, _ = v.node.Opt.(*Var)
+ v1, _ = v.node.Opt().(*Var)
if v == v1 || !btest(&cal, uint(v1.id)) {
for ; v1 != nil; v1 = v1.nextinnode {
@@ -1072,7 +1072,7 @@
g := Flowstart(firstp, func() interface{} { return new(Reg) })
if g == nil {
for i := 0; i < nvar; i++ {
- vars[i].node.Opt = nil
+ vars[i].node.SetOpt(nil)
}
return
}
@@ -1119,7 +1119,7 @@
// Currently we never generate three register forms.
// If we do, this will need to change.
- if p.From3.Type != obj.TYPE_NONE {
+ if p.From3Type() != obj.TYPE_NONE {
Fatal("regopt not implemented for from3")
}
@@ -1186,7 +1186,7 @@
for f := firstf; f != nil; f = f.Link {
p := f.Prog
- if p.As == obj.AVARDEF && Isfat(((p.To.Node).(*Node)).Type) && ((p.To.Node).(*Node)).Opt != nil {
+ if p.As == obj.AVARDEF && Isfat(((p.To.Node).(*Node)).Type) && ((p.To.Node).(*Node)).Opt() != nil {
active++
walkvardef(p.To.Node.(*Node), f, active)
}
@@ -1342,7 +1342,7 @@
}
}
- if false && Debug['v'] != 0 && strings.Contains(Curfn.Nname.Sym.Name, "Parse") {
+ if false && Debug['v'] != 0 && strings.Contains(Curfn.Func.Nname.Sym.Name, "Parse") {
Warn("regions: %d\n", nregion)
}
if nregion >= MaxRgn {
@@ -1390,7 +1390,7 @@
* free aux structures. peep allocates new ones.
*/
for i := 0; i < nvar; i++ {
- vars[i].node.Opt = nil
+ vars[i].node.SetOpt(nil)
}
Flowend(g)
firstf = nil
diff --git a/src/cmd/compile/internal/gc/select.go b/src/cmd/compile/internal/gc/select.go
index 3a28ea3..db20778 100644
--- a/src/cmd/compile/internal/gc/select.go
+++ b/src/cmd/compile/internal/gc/select.go
@@ -65,8 +65,7 @@
n.Op = OSELRECV2
n.Left = n.List.N
- n.Ntest = n.List.Next.N
- n.List = nil
+ n.List = list1(n.List.Next.N)
n.Right = n.Rlist.N
n.Rlist = nil
@@ -131,7 +130,7 @@
case OSELRECV, OSELRECV2:
ch = n.Right.Left
- if n.Op == OSELRECV || n.Ntest == nil {
+ if n.Op == OSELRECV || n.List == nil {
if n.Left == nil {
n = n.Right
} else {
@@ -146,11 +145,10 @@
}
n.Op = OAS2
- n.List = list(list1(n.Left), n.Ntest)
+ n.List = concat(list1(n.Left), n.List)
n.Rlist = list1(n.Right)
n.Right = nil
n.Left = nil
- n.Ntest = nil
n.Typecheck = 0
typecheck(&n, Etop)
}
@@ -158,7 +156,7 @@
// if ch == nil { block() }; n;
a := Nod(OIF, nil, nil)
- a.Ntest = Nod(OEQ, ch, nodnil())
+ a.Left = Nod(OEQ, ch, nodnil())
a.Nbody = list1(mkcall("block", nil, &l))
typecheck(&a, Etop)
l = list(l, a)
@@ -185,12 +183,12 @@
typecheck(&n.Right, Erv)
case OSELRECV, OSELRECV2:
- if n.Op == OSELRECV2 && n.Ntest == nil {
+ if n.Op == OSELRECV2 && n.List == nil {
n.Op = OSELRECV
}
if n.Op == OSELRECV2 {
- n.Ntest = Nod(OADDR, n.Ntest, nil)
- typecheck(&n.Ntest, Erv)
+ n.List.N = Nod(OADDR, n.List.N, nil)
+ typecheck(&n.List.N, Erv)
}
if n.Left == nil {
@@ -226,7 +224,7 @@
case OSEND:
ch := n.Left
- r.Ntest = mkcall1(chanfn("selectnbsend", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), ch, n.Right)
+ r.Left = mkcall1(chanfn("selectnbsend", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), ch, n.Right)
// if c != nil && selectnbrecv(&v, c) { body } else { default body }
case OSELRECV:
@@ -234,7 +232,7 @@
r.Ninit = cas.Ninit
ch := n.Right.Left
- r.Ntest = mkcall1(chanfn("selectnbrecv", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, ch)
+ r.Left = mkcall1(chanfn("selectnbrecv", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, ch)
// if c != nil && selectnbrecv2(&v, c) { body } else { default body }
case OSELRECV2:
@@ -242,12 +240,12 @@
r.Ninit = cas.Ninit
ch := n.Right.Left
- r.Ntest = mkcall1(chanfn("selectnbrecv2", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, n.Ntest, ch)
+ r.Left = mkcall1(chanfn("selectnbrecv2", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, n.List.N, ch)
}
- typecheck(&r.Ntest, Erv)
+ typecheck(&r.Left, Erv)
r.Nbody = cas.Nbody
- r.Nelse = concat(dflt.Ninit, dflt.Nbody)
+ r.Rlist = concat(dflt.Ninit, dflt.Nbody)
sel.Nbody = list1(r)
goto out
}
@@ -282,7 +280,7 @@
if n == nil {
// selectdefault(sel *byte);
- r.Ntest = mkcall("selectdefault", Types[TBOOL], &r.Ninit, var_)
+ r.Left = mkcall("selectdefault", Types[TBOOL], &r.Ninit, var_)
} else {
switch n.Op {
default:
@@ -290,15 +288,15 @@
// selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
case OSEND:
- r.Ntest = mkcall1(chanfn("selectsend", 2, n.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Left, n.Right)
+ r.Left = mkcall1(chanfn("selectsend", 2, n.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Left, n.Right)
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
case OSELRECV:
- r.Ntest = mkcall1(chanfn("selectrecv", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left)
+ r.Left = mkcall1(chanfn("selectrecv", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left)
// selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
case OSELRECV2:
- r.Ntest = mkcall1(chanfn("selectrecv2", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left, n.Ntest)
+ r.Left = mkcall1(chanfn("selectrecv2", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left, n.List.N)
}
}
diff --git a/src/cmd/compile/internal/gc/sinit.go b/src/cmd/compile/internal/gc/sinit.go
index b5427a3..7875d16 100644
--- a/src/cmd/compile/internal/gc/sinit.go
+++ b/src/cmd/compile/internal/gc/sinit.go
@@ -18,7 +18,11 @@
InitPending = 2
)
-var initlist *NodeList
+var (
+ initlist *NodeList
+ initplans map[*Node]*InitPlan
+ inittemps = make(map[*Node]*Node)
+)
// init1 walks the AST starting at n, and accumulates in out
// the list of definitions needing init code in dependency order.
@@ -46,7 +50,7 @@
break
default:
- if isblank(n) && n.Curfn == nil && n.Defn != nil && n.Defn.Initorder == InitNotStarted {
+ if isblank(n) && n.Name.Curfn == nil && n.Name.Defn != nil && n.Name.Defn.Initorder == InitNotStarted {
// blank names initialization is part of init() but not
// when they are inside a function.
break
@@ -141,48 +145,48 @@
// make sure that everything n depends on is initialized.
// n->defn is an assignment to n
- if n.Defn != nil {
- switch n.Defn.Op {
+ if defn := n.Name.Defn; defn != nil {
+ switch defn.Op {
default:
goto bad
case ODCLFUNC:
- init2list(n.Defn.Nbody, out)
+ init2list(defn.Nbody, out)
case OAS:
- if n.Defn.Left != n {
+ if defn.Left != n {
goto bad
}
- if isblank(n.Defn.Left) && candiscard(n.Defn.Right) {
- n.Defn.Op = OEMPTY
- n.Defn.Left = nil
- n.Defn.Right = nil
+ if isblank(defn.Left) && candiscard(defn.Right) {
+ defn.Op = OEMPTY
+ defn.Left = nil
+ defn.Right = nil
break
}
- init2(n.Defn.Right, out)
+ init2(defn.Right, out)
if Debug['j'] != 0 {
fmt.Printf("%v\n", n.Sym)
}
if isblank(n) || !staticinit(n, out) {
if Debug['%'] != 0 {
- Dump("nonstatic", n.Defn)
+ Dump("nonstatic", defn)
}
- *out = list(*out, n.Defn)
+ *out = list(*out, defn)
}
case OAS2FUNC, OAS2MAPR, OAS2DOTTYPE, OAS2RECV:
- if n.Defn.Initorder != InitNotStarted {
+ if defn.Initorder != InitNotStarted {
break
}
- n.Defn.Initorder = InitDone
- for l := n.Defn.Rlist; l != nil; l = l.Next {
+ defn.Initorder = InitDone
+ for l := defn.Rlist; l != nil; l = l.Next {
init1(l.N, out)
}
if Debug['%'] != 0 {
- Dump("nonstatic", n.Defn)
+ Dump("nonstatic", defn)
}
- *out = list(*out, n.Defn)
+ *out = list(*out, defn)
}
}
@@ -196,7 +200,7 @@
return
bad:
- Dump("defn", n.Defn)
+ Dump("defn", n.Name.Defn)
Fatal("init1: bad defn")
}
@@ -213,15 +217,13 @@
init1(n, out)
init2(n.Left, out)
init2(n.Right, out)
- init2(n.Ntest, out)
init2list(n.Ninit, out)
init2list(n.List, out)
init2list(n.Rlist, out)
init2list(n.Nbody, out)
- init2list(n.Nelse, out)
if n.Op == OCLOSURE {
- init2list(n.Param.Closure.Nbody, out)
+ init2list(n.Func.Closure.Nbody, out)
}
if n.Op == ODOTMETH || n.Op == OCALLPART {
init2(n.Type.Nname, out)
@@ -255,9 +257,11 @@
// to include in the init() function body.
func initfix(l *NodeList) *NodeList {
var lout *NodeList
+ initplans = make(map[*Node]*InitPlan)
lno := int(lineno)
initreorder(l, &lout)
lineno = int32(lno)
+ initplans = nil
return lout
}
@@ -266,13 +270,13 @@
* into DATA statements if at all possible.
*/
func staticinit(n *Node, out **NodeList) bool {
- if n.Op != ONAME || n.Class != PEXTERN || n.Defn == nil || n.Defn.Op != OAS {
+ if n.Op != ONAME || n.Class != PEXTERN || n.Name.Defn == nil || n.Name.Defn.Op != OAS {
Fatal("staticinit")
}
lineno = n.Lineno
- l := n.Defn.Left
- r := n.Defn.Right
+ l := n.Name.Defn.Left
+ r := n.Name.Defn.Right
return staticassign(l, r, out)
}
@@ -289,14 +293,14 @@
if r.Class != PEXTERN || r.Sym.Pkg != localpkg {
return false
}
- if r.Defn == nil { // probably zeroed but perhaps supplied externally and of unknown value
+ if r.Name.Defn == nil { // probably zeroed but perhaps supplied externally and of unknown value
return false
}
- if r.Defn.Op != OAS {
+ if r.Name.Defn.Op != OAS {
return false
}
orig := r
- r = r.Defn.Right
+ r = r.Name.Defn.Right
switch r.Op {
case ONAME:
@@ -328,7 +332,7 @@
// copy pointer
case OARRAYLIT, OSTRUCTLIT, OMAPLIT:
- gdata(l, Nod(OADDR, r.Nname, nil), int(l.Type.Width))
+ gdata(l, Nod(OADDR, inittemps[r], nil), int(l.Type.Width))
return true
}
@@ -336,7 +340,7 @@
case OARRAYLIT:
if Isslice(r.Type) {
// copy slice
- a := r.Nname
+ a := inittemps[r]
n1 := *l
n1.Xoffset = l.Xoffset + int64(Array_array)
@@ -351,7 +355,7 @@
// fall through
case OSTRUCTLIT:
- p := r.Initplan
+ p := initplans[r]
n1 := *l
var e *InitEntry
@@ -425,7 +429,7 @@
case OARRAYLIT, OMAPLIT, OSTRUCTLIT:
a := staticname(r.Left.Type, 1)
- r.Nname = a
+ inittemps[r] = a
gdata(l, Nod(OADDR, a, nil), int(l.Type.Width))
// Init underlying literal.
@@ -437,7 +441,7 @@
case OSTRARRAYBYTE:
if l.Class == PEXTERN && r.Left.Op == OLITERAL {
- sval := r.Left.Val.U.(string)
+ sval := r.Left.Val().U.(string)
slicebytes(l, sval, len(sval))
return true
}
@@ -449,9 +453,9 @@
ta := typ(TARRAY)
ta.Type = r.Type.Type
- ta.Bound = Mpgetfix(r.Right.Val.U.(*Mpint))
+ ta.Bound = Mpgetfix(r.Right.Val().U.(*Mpint))
a := staticname(ta, 1)
- r.Nname = a
+ inittemps[r] = a
n1 = *l
n1.Xoffset = l.Xoffset + int64(Array_array)
gdata(&n1, Nod(OADDR, a, nil), Widthptr)
@@ -469,7 +473,7 @@
case OSTRUCTLIT:
initplan(r)
- p := r.Initplan
+ p := initplans[r]
n1 = *l
var e *InitEntry
var a *Node
@@ -518,7 +522,7 @@
func isliteral(n *Node) bool {
if n.Op == OLITERAL {
- if n.Val.Ctype != CTNIL {
+ if n.Val().Ctype() != CTNIL {
return true
}
}
@@ -722,7 +726,7 @@
// make an array type
t := shallow(n.Type)
- t.Bound = Mpgetfix(n.Right.Val.U.(*Mpint))
+ t.Bound = Mpgetfix(n.Right.Val().U.(*Mpint))
t.Width = 0
t.Sym = nil
t.Haspointers = 0
@@ -779,17 +783,17 @@
// set auto to point at new temp or heap (3 assign)
var a *Node
- if n.Alloc != nil {
+ if x := prealloc[n]; x != nil {
// temp allocated during order.c for dddarg
- n.Alloc.Type = t
+ x.Type = t
if vstat == nil {
- a = Nod(OAS, n.Alloc, nil)
+ a = Nod(OAS, x, nil)
typecheck(&a, Etop)
*init = list(*init, a) // zero new temp
}
- a = Nod(OADDR, n.Alloc, nil)
+ a = Nod(OADDR, x, nil)
} else if n.Esc == EscNone {
a = temp(t)
if vstat == nil {
@@ -996,8 +1000,8 @@
a.Nbody = list1(r)
a.Ninit = list1(Nod(OAS, index, Nodintconst(0)))
- a.Ntest = Nod(OLT, index, Nodintconst(t.Bound))
- a.Nincr = Nod(OAS, index, Nod(OADD, index, Nodintconst(1)))
+ a.Left = Nod(OLT, index, Nodintconst(t.Bound))
+ a.Right = Nod(OAS, index, Nod(OADD, index, Nodintconst(1)))
typecheck(&a, Etop)
walkstmt(&a)
@@ -1221,12 +1225,13 @@
}
n.Op = OEMPTY
+ n.Right = nil
return true
}
func getlit(lit *Node) int {
if Smallintconst(lit) {
- return int(Mpgetfix(lit.Val.U.(*Mpint)))
+ return int(Mpgetfix(lit.Val().U.(*Mpint)))
}
return -1
}
@@ -1274,11 +1279,11 @@
}
func initplan(n *Node) {
- if n.Initplan != nil {
+ if initplans[n] != nil {
return
}
p := new(InitPlan)
- n.Initplan = p
+ initplans[n] = p
switch n.Op {
default:
Fatal("initplan")
@@ -1290,7 +1295,7 @@
if a.Op != OKEY || !Smallintconst(a.Left) {
Fatal("initplan arraylit")
}
- addvalue(p, n.Type.Type.Width*Mpgetfix(a.Left.Val.U.(*Mpint)), nil, a.Right)
+ addvalue(p, n.Type.Type.Width*Mpgetfix(a.Left.Val().U.(*Mpint)), nil, a.Right)
}
case OSTRUCTLIT:
@@ -1325,7 +1330,7 @@
// special case: inline struct and array (not slice) literals
if isvaluelit(n) {
initplan(n)
- q := n.Initplan
+ q := initplans[n]
var e *InitEntry
for i := 0; i < len(q.E); i++ {
e = entry(p)
@@ -1351,7 +1356,7 @@
func iszero(n *Node) bool {
switch n.Op {
case OLITERAL:
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
default:
Dump("unexpected literal", n)
Fatal("iszero")
@@ -1360,19 +1365,19 @@
return true
case CTSTR:
- return n.Val.U.(string) == ""
+ return n.Val().U.(string) == ""
case CTBOOL:
- return !n.Val.U.(bool)
+ return !n.Val().U.(bool)
case CTINT, CTRUNE:
- return mpcmpfixc(n.Val.U.(*Mpint), 0) == 0
+ return mpcmpfixc(n.Val().U.(*Mpint), 0) == 0
case CTFLT:
- return mpcmpfltc(n.Val.U.(*Mpflt), 0) == 0
+ return mpcmpfltc(n.Val().U.(*Mpflt), 0) == 0
case CTCPLX:
- return mpcmpfltc(&n.Val.U.(*Mpcplx).Real, 0) == 0 && mpcmpfltc(&n.Val.U.(*Mpcplx).Imag, 0) == 0
+ return mpcmpfltc(&n.Val().U.(*Mpcplx).Real, 0) == 0 && mpcmpfltc(&n.Val().U.(*Mpcplx).Imag, 0) == 0
}
case OARRAYLIT:
@@ -1510,10 +1515,10 @@
gdata(&nam, nr, int(nr.Type.Width))
case TCOMPLEX64, TCOMPLEX128:
- gdatacomplex(&nam, nr.Val.U.(*Mpcplx))
+ gdatacomplex(&nam, nr.Val().U.(*Mpcplx))
case TSTRING:
- gdatastring(&nam, nr.Val.U.(string))
+ gdatastring(&nam, nr.Val().U.(string))
}
return true
diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go
index fcef7d3..b97764e 100644
--- a/src/cmd/compile/internal/gc/ssa.go
+++ b/src/cmd/compile/internal/gc/ssa.go
@@ -24,7 +24,7 @@
// TODO(khr): build config just once at the start of the compiler binary
s.config = ssa.NewConfig(Thearch.Thestring, ssaExport{})
s.f = s.config.NewFunc()
- s.f.Name = fn.Nname.Sym.Name
+ s.f.Name = fn.Func.Nname.Sym.Name
// We construct SSA using an algorithm similar to
// Brau, Buchwald, Hack, Leißa, Mallon, and Zwinkau
@@ -253,7 +253,7 @@
addr := s.addr(n.Left)
s.vars[".mem"] = s.newValue3(ssa.OpStore, ssa.TypeMem, nil, addr, val, s.mem())
case OIF:
- cond := s.expr(n.Ntest)
+ cond := s.expr(n.Left)
b := s.endBlock()
b.Kind = ssa.BlockIf
b.Control = cond
@@ -263,7 +263,7 @@
bEnd := s.f.NewBlock(ssa.BlockPlain)
var bElse *ssa.Block
- if n.Nelse == nil {
+ if n.Rlist == nil {
addEdge(b, bThen)
addEdge(b, bEnd)
} else {
@@ -279,9 +279,9 @@
addEdge(b, bEnd)
}
- if n.Nelse != nil {
+ if n.Rlist != nil {
s.startBlock(bElse)
- s.stmtList(n.Nelse)
+ s.stmtList(n.Rlist)
b = s.endBlock()
if b != nil {
addEdge(b, bEnd)
@@ -304,9 +304,9 @@
addEdge(b, bCond)
// generate code to test condition
- // TODO(khr): Ntest == nil exception
+ // TODO(khr): Left == nil exception
s.startBlock(bCond)
- cond := s.expr(n.Ntest)
+ cond := s.expr(n.Left)
b = s.endBlock()
b.Kind = ssa.BlockIf
b.Control = cond
@@ -317,7 +317,7 @@
// generate body
s.startBlock(bBody)
s.stmtList(n.Nbody)
- s.stmt(n.Nincr)
+ s.stmt(n.Right)
b = s.endBlock()
addEdge(b, bCond)
@@ -349,13 +349,13 @@
addr := s.addr(n)
return s.newValue2(ssa.OpLoad, n.Type, nil, addr, s.mem())
case OLITERAL:
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
case CTINT:
- return s.constInt(n.Type, Mpgetfix(n.Val.U.(*Mpint)))
+ return s.constInt(n.Type, Mpgetfix(n.Val().U.(*Mpint)))
case CTSTR:
- return s.entryNewValue(ssa.OpConst, n.Type, n.Val.U)
+ return s.entryNewValue(ssa.OpConst, n.Type, n.Val().U)
default:
- log.Fatalf("unhandled OLITERAL %v", n.Val.Ctype)
+ log.Fatalf("unhandled OLITERAL %v", n.Val().Ctype())
return nil
}
diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go
index ed5001a..a759f39 100644
--- a/src/cmd/compile/internal/gc/subr.go
+++ b/src/cmd/compile/internal/gc/subr.go
@@ -331,7 +331,11 @@
s1.Def = s.Def
s1.Block = s.Block
- s1.Def.Pack = pack
+ if s1.Def.Name == nil {
+ Dump("s1def", s1.Def)
+ Fatal("missing Name")
+ }
+ s1.Def.Name.Pack = pack
s1.Origpkg = opkg
n++
}
@@ -367,16 +371,25 @@
n.Lineno = int32(parserline())
n.Xoffset = BADWIDTH
n.Orig = n
- n.Curfn = Curfn
switch op {
case OCLOSURE, ODCLFUNC:
n.Func = new(Func)
- n.Param = new(Param)
+ n.Func.FCurfn = Curfn
case ONAME:
n.Name = new(Name)
- n.Param = new(Param)
+ n.Name.Param = new(Param)
+ case OLABEL, OPACK:
+ n.Name = new(Name)
case ODCLFIELD:
- n.Param = new(Param)
+ if nleft != nil {
+ n.Name = nleft.Name
+ } else {
+ n.Name = new(Name)
+ n.Name.Param = new(Param)
+ }
+ }
+ if n.Name != nil {
+ n.Name.Curfn = Curfn
}
return n
}
@@ -663,9 +676,8 @@
func Nodintconst(v int64) *Node {
c := Nod(OLITERAL, nil, nil)
c.Addable = true
- c.Val.U = new(Mpint)
- Mpmovecfix(c.Val.U.(*Mpint), v)
- c.Val.Ctype = CTINT
+ c.SetVal(Val{new(Mpint)})
+ Mpmovecfix(c.Val().U.(*Mpint), v)
c.Type = Types[TIDEAL]
ullmancalc(c)
return c
@@ -674,9 +686,8 @@
func nodfltconst(v *Mpflt) *Node {
c := Nod(OLITERAL, nil, nil)
c.Addable = true
- c.Val.U = newMpflt()
- mpmovefltflt(c.Val.U.(*Mpflt), v)
- c.Val.Ctype = CTFLT
+ c.SetVal(Val{newMpflt()})
+ mpmovefltflt(c.Val().U.(*Mpflt), v)
c.Type = Types[TIDEAL]
ullmancalc(c)
return c
@@ -687,9 +698,8 @@
n.Op = OLITERAL
n.Addable = true
ullmancalc(n)
- n.Val.U = new(Mpint)
- Mpmovecfix(n.Val.U.(*Mpint), v)
- n.Val.Ctype = CTINT
+ n.SetVal(Val{new(Mpint)})
+ Mpmovecfix(n.Val().U.(*Mpint), v)
n.Type = t
if Isfloat[t.Etype] {
@@ -699,15 +709,14 @@
func nodnil() *Node {
c := Nodintconst(0)
- c.Val.Ctype = CTNIL
+ c.SetVal(Val{new(NilVal)})
c.Type = Types[TNIL]
return c
}
func Nodbool(b bool) *Node {
c := Nodintconst(0)
- c.Val.Ctype = CTBOOL
- c.Val.U = b
+ c.SetVal(Val{b})
c.Type = idealbool
return c
}
@@ -721,7 +730,7 @@
Yyerror("array bound must be an integer expression")
case CTINT, CTRUNE:
- bound = Mpgetfix(b.Val.U.(*Mpint))
+ bound = Mpgetfix(b.Val().U.(*Mpint))
if bound < 0 {
Yyerror("array bound must be non negative")
}
@@ -758,8 +767,9 @@
if lineno != -1 {
m.Lineno = lineno
}
- if m.Defn != nil {
- panic("abort")
+ if m.Name != nil && n.Op != ODCLFIELD {
+ Dump("treecopy", n)
+ Fatal("treecopy Name")
}
case ONONAME:
@@ -769,12 +779,13 @@
// so that all the copies of this const definition
// don't have the same iota value.
m = Nod(OXXX, nil, nil)
-
*m = *n
- m.Iota = iota_
if lineno != 0 {
m.Lineno = lineno
}
+ m.Name = new(Name)
+ *m.Name = *n.Name
+ m.Name.Iota = iota_
break
}
fallthrough
@@ -793,7 +804,7 @@
if n.Op != OLITERAL {
return false
}
- if n.Val.Ctype != CTNIL {
+ if n.Val().Ctype() != CTNIL {
return false
}
return true
@@ -1612,7 +1623,7 @@
fmt.Printf("--- external frame ---\n")
l = externdcl
} else if Curfn != nil {
- fmt.Printf("--- %v frame ---\n", Curfn.Nname.Sym)
+ fmt.Printf("--- %v frame ---\n", Curfn.Func.Nname.Sym)
l = Curfn.Func.Dcl
} else {
return
@@ -1628,7 +1639,7 @@
}
switch n.Op {
case ONAME:
- fmt.Printf("%v %v G%d %v width=%d\n", Oconv(int(n.Op), 0), n.Sym, n.Vargen, n.Type, w)
+ fmt.Printf("%v %v G%d %v width=%d\n", Oconv(int(n.Op), 0), n.Sym, n.Name.Vargen, n.Type, w)
case OTYPE:
fmt.Printf("%v %v width=%d\n", Oconv(int(n.Op), 0), n.Type, w)
@@ -2375,7 +2386,7 @@
markdcl()
this := Nod(ODCLFIELD, newname(Lookup(".this")), typenod(rcvr))
- this.Left.Param.Ntype = this.Right
+ this.Left.Name.Param.Ntype = this.Right
in := structargs(getinarg(method.Type), 1)
out := structargs(Getoutarg(method.Type), 0)
@@ -2399,10 +2410,10 @@
t.Rlist = out
fn := Nod(ODCLFUNC, nil, nil)
- fn.Nname = newname(newnam)
- fn.Nname.Defn = fn
- fn.Nname.Param.Ntype = t
- declare(fn.Nname, PFUNC)
+ fn.Func.Nname = newname(newnam)
+ fn.Func.Nname.Name.Defn = fn
+ fn.Func.Nname.Name.Param.Ntype = t
+ declare(fn.Func.Nname, PFUNC)
funchdr(fn)
// arg list
@@ -2421,14 +2432,13 @@
// generating wrapper from *T to T.
n := Nod(OIF, nil, nil)
- n.Ntest = Nod(OEQ, this.Left, nodnil())
+ n.Left = Nod(OEQ, this.Left, nodnil())
// these strings are already in the reflect tables,
// so no space cost to use them here.
var l *NodeList
var v Val
- v.Ctype = CTSTR
v.U = rcvr.Type.Sym.Pkg.Name // package name
l = list(l, nodlit(v))
v.U = rcvr.Type.Sym.Name // type name
@@ -2572,10 +2582,10 @@
// func sym(p *T, h uintptr) uintptr
fn := Nod(ODCLFUNC, nil, nil)
- fn.Nname = newname(sym)
- fn.Nname.Class = PFUNC
+ fn.Func.Nname = newname(sym)
+ fn.Func.Nname.Class = PFUNC
tfn := Nod(OTFUNC, nil, nil)
- fn.Nname.Param.Ntype = tfn
+ fn.Func.Nname.Name.Param.Ntype = tfn
n := Nod(ODCLFIELD, newname(Lookup("p")), typenod(Ptrto(t)))
tfn.List = list(tfn.List, n)
@@ -2587,7 +2597,7 @@
tfn.Rlist = list(tfn.Rlist, n)
funchdr(fn)
- typecheck(&fn.Nname.Param.Ntype, Etype)
+ typecheck(&fn.Func.Nname.Name.Param.Ntype, Etype)
// genhash is only called for types that have equality but
// cannot be handled by the standard algorithms,
@@ -2757,7 +2767,7 @@
nx := Nod(OXDOT, p, field)
ny := Nod(OXDOT, q, field)
nif := Nod(OIF, nil, nil)
- nif.Ntest = Nod(ONE, nx, ny)
+ nif.Left = Nod(ONE, nx, ny)
r := Nod(ORETURN, nil, nil)
r.List = list(r.List, Nodbool(false))
nif.Nbody = list(nif.Nbody, r)
@@ -2802,7 +2812,7 @@
}
nif := Nod(OIF, nil, nil)
- nif.Ntest = Nod(ONOT, call, nil)
+ nif.Left = Nod(ONOT, call, nil)
r := Nod(ORETURN, nil, nil)
r.List = list(r.List, Nodbool(false))
nif.Nbody = list(nif.Nbody, r)
@@ -2824,10 +2834,10 @@
// func sym(p, q *T) bool
fn := Nod(ODCLFUNC, nil, nil)
- fn.Nname = newname(sym)
- fn.Nname.Class = PFUNC
+ fn.Func.Nname = newname(sym)
+ fn.Func.Nname.Class = PFUNC
tfn := Nod(OTFUNC, nil, nil)
- fn.Nname.Param.Ntype = tfn
+ fn.Func.Nname.Name.Param.Ntype = tfn
n := Nod(ODCLFIELD, newname(Lookup("p")), typenod(Ptrto(t)))
tfn.List = list(tfn.List, n)
@@ -2874,7 +2884,7 @@
ny.Bounded = true
nif := Nod(OIF, nil, nil)
- nif.Ntest = Nod(ONE, nx, ny)
+ nif.Left = Nod(ONE, nx, ny)
r := Nod(ORETURN, nil, nil)
r.List = list(r.List, Nodbool(false))
nif.Nbody = list(nif.Nbody, r)
@@ -3146,7 +3156,7 @@
return -1
}
- v := uint64(Mpgetfix(n.Val.U.(*Mpint)))
+ v := uint64(Mpgetfix(n.Val().U.(*Mpint)))
b := uint64(1)
for i := 0; i < 64; i++ {
if b == v {
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
index 221b1f4..a736208 100644
--- a/src/cmd/compile/internal/gc/swt.go
+++ b/src/cmd/compile/internal/gc/swt.go
@@ -66,21 +66,21 @@
var top int
var t *Type
- if n.Ntest != nil && n.Ntest.Op == OTYPESW {
+ if n.Left != nil && n.Left.Op == OTYPESW {
// type switch
top = Etype
- typecheck(&n.Ntest.Right, Erv)
- t = n.Ntest.Right.Type
+ typecheck(&n.Left.Right, Erv)
+ t = n.Left.Right.Type
if t != nil && t.Etype != TINTER {
- Yyerror("cannot type switch on non-interface value %v", Nconv(n.Ntest.Right, obj.FmtLong))
+ Yyerror("cannot type switch on non-interface value %v", Nconv(n.Left.Right, obj.FmtLong))
}
} else {
// expression switch
top = Erv
- if n.Ntest != nil {
- typecheck(&n.Ntest, Erv)
- defaultlit(&n.Ntest, nil)
- t = n.Ntest.Type
+ if n.Left != nil {
+ typecheck(&n.Left, Erv)
+ defaultlit(&n.Left, nil)
+ t = n.Left.Type
} else {
t = Types[TBOOL]
}
@@ -88,13 +88,13 @@
var badtype *Type
switch {
case !okforeq[t.Etype]:
- Yyerror("cannot switch on %v", Nconv(n.Ntest, obj.FmtLong))
+ Yyerror("cannot switch on %v", Nconv(n.Left, obj.FmtLong))
case t.Etype == TARRAY && !Isfixedarray(t):
nilonly = "slice"
case t.Etype == TARRAY && Isfixedarray(t) && algtype1(t, nil) == ANOEQ:
- Yyerror("cannot switch on %v", Nconv(n.Ntest, obj.FmtLong))
+ Yyerror("cannot switch on %v", Nconv(n.Left, obj.FmtLong))
case t.Etype == TSTRUCT && algtype1(t, &badtype) == ANOEQ:
- Yyerror("cannot switch on %v (struct containing %v cannot be compared)", Nconv(n.Ntest, obj.FmtLong), badtype)
+ Yyerror("cannot switch on %v (struct containing %v cannot be compared)", Nconv(n.Left, obj.FmtLong), badtype)
case t.Etype == TFUNC:
nilonly = "func"
case t.Etype == TMAP:
@@ -133,13 +133,13 @@
case ll.N.Op == OTYPE:
Yyerror("type %v is not an expression", ll.N.Type)
case ll.N.Type != nil && assignop(ll.N.Type, t, nil) == 0 && assignop(t, ll.N.Type, nil) == 0:
- if n.Ntest != nil {
- Yyerror("invalid case %v in switch on %v (mismatched types %v and %v)", ll.N, n.Ntest, ll.N.Type, t)
+ if n.Left != nil {
+ Yyerror("invalid case %v in switch on %v (mismatched types %v and %v)", ll.N, n.Left, ll.N.Type, t)
} else {
Yyerror("invalid case %v in switch (mismatched types %v and bool)", ll.N, ll.N.Type)
}
case nilonly != "" && !Isconst(ll.N, CTNIL):
- Yyerror("invalid case %v in switch (can only compare %s %v to nil)", ll.N, nilonly, n.Ntest)
+ Yyerror("invalid case %v in switch (can only compare %s %v to nil)", ll.N, nilonly, n.Left)
}
// type switch
@@ -151,12 +151,12 @@
case ll.N.Op != OTYPE && ll.N.Type != nil: // should this be ||?
Yyerror("%v is not a type", Nconv(ll.N, obj.FmtLong))
// reset to original type
- ll.N = n.Ntest.Right
+ ll.N = n.Left.Right
case ll.N.Type.Etype != TINTER && t.Etype == TINTER && !implements(ll.N.Type, t, &missing, &have, &ptr):
if have != nil && missing.Broke == 0 && have.Broke == 0 {
- Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (wrong type for %v method)\n\thave %v%v\n\twant %v%v", Nconv(n.Ntest.Right, obj.FmtLong), ll.N.Type, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort), missing.Sym, Tconv(missing.Type, obj.FmtShort))
+ Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (wrong type for %v method)\n\thave %v%v\n\twant %v%v", Nconv(n.Left.Right, obj.FmtLong), ll.N.Type, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort), missing.Sym, Tconv(missing.Type, obj.FmtShort))
} else if missing.Broke == 0 {
- Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (missing %v method)", Nconv(n.Ntest.Right, obj.FmtLong), ll.N.Type, missing.Sym)
+ Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (missing %v method)", Nconv(n.Left.Right, obj.FmtLong), ll.N.Type, missing.Sym)
}
}
}
@@ -165,18 +165,18 @@
if top == Etype && n.Type != nil {
ll = ncase.List
- nvar := ncase.Nname
- if nvar != nil {
+ if ncase.Rlist != nil {
+ nvar := ncase.Rlist.N
if ll != nil && ll.Next == nil && ll.N.Type != nil && !Istype(ll.N.Type, TNIL) {
// single entry type switch
- nvar.Param.Ntype = typenod(ll.N.Type)
+ nvar.Name.Param.Ntype = typenod(ll.N.Type)
} else {
// multiple entry type switch or default
- nvar.Param.Ntype = typenod(n.Type)
+ nvar.Name.Param.Ntype = typenod(n.Type)
}
typecheck(&nvar, Erv|Easgn)
- ncase.Nname = nvar
+ ncase.Rlist.N = nvar
}
}
@@ -189,22 +189,18 @@
// walkswitch walks a switch statement.
func walkswitch(sw *Node) {
// convert switch {...} to switch true {...}
- if sw.Ntest == nil {
- sw.Ntest = Nodbool(true)
- typecheck(&sw.Ntest, Erv)
+ if sw.Left == nil {
+ sw.Left = Nodbool(true)
+ typecheck(&sw.Left, Erv)
}
- if sw.Ntest.Op == OTYPESW {
+ if sw.Left.Op == OTYPESW {
var s typeSwitch
s.walk(sw)
} else {
var s exprSwitch
s.walk(sw)
}
-
- // Discard old AST elements. They can confuse racewalk.
- sw.Ntest = nil
- sw.List = nil
}
// walk generates an AST implementing sw.
@@ -215,15 +211,18 @@
func (s *exprSwitch) walk(sw *Node) {
casebody(sw, nil)
+ cond := sw.Left
+ sw.Left = nil
+
s.kind = switchKindExpr
- if Isconst(sw.Ntest, CTBOOL) {
+ if Isconst(cond, CTBOOL) {
s.kind = switchKindTrue
- if !sw.Ntest.Val.U.(bool) {
+ if !cond.Val().U.(bool) {
s.kind = switchKindFalse
}
}
- walkexpr(&sw.Ntest, &sw.Ninit)
+ walkexpr(&cond, &sw.Ninit)
t := sw.Type
if t == nil {
return
@@ -233,17 +232,18 @@
var cas *NodeList
if s.kind == switchKindTrue || s.kind == switchKindFalse {
s.exprname = Nodbool(s.kind == switchKindTrue)
- } else if consttype(sw.Ntest) >= 0 {
+ } else if consttype(cond) >= 0 {
// leave constants to enable dead code elimination (issue 9608)
- s.exprname = sw.Ntest
+ s.exprname = cond
} else {
- s.exprname = temp(sw.Ntest.Type)
- cas = list1(Nod(OAS, s.exprname, sw.Ntest))
+ s.exprname = temp(cond.Type)
+ cas = list1(Nod(OAS, s.exprname, cond))
typechecklist(cas, Etop)
}
// enumerate the cases, and lop off the default case
cc := caseClauses(sw, s.kind)
+ sw.List = nil
var def *Node
if len(cc) > 0 && cc[0].typ == caseKindDefault {
def = cc[0].node.Right
@@ -278,7 +278,6 @@
if nerrors == 0 {
cas = list(cas, def)
sw.Nbody = concat(cas, sw.Nbody)
- sw.List = nil
walkstmtlist(sw.Nbody)
}
}
@@ -294,14 +293,14 @@
a := Nod(OIF, nil, nil)
if (s.kind != switchKindTrue && s.kind != switchKindFalse) || assignop(n.Left.Type, s.exprname.Type, nil) == OCONVIFACE || assignop(s.exprname.Type, n.Left.Type, nil) == OCONVIFACE {
- a.Ntest = Nod(OEQ, s.exprname, n.Left) // if name == val
- typecheck(&a.Ntest, Erv)
+ a.Left = Nod(OEQ, s.exprname, n.Left) // if name == val
+ typecheck(&a.Left, Erv)
} else if s.kind == switchKindTrue {
- a.Ntest = n.Left // if val
+ a.Left = n.Left // if val
} else {
// s.kind == switchKindFalse
- a.Ntest = Nod(ONOT, n.Left, nil) // if !val
- typecheck(&a.Ntest, Erv)
+ a.Left = Nod(ONOT, n.Left, nil) // if !val
+ typecheck(&a.Left, Erv)
}
a.Nbody = list1(n.Right) // goto l
@@ -320,13 +319,13 @@
// Search by length and then by value; see exprcmp.
lenlt := Nod(OLT, Nod(OLEN, s.exprname, nil), Nod(OLEN, mid, nil))
leneq := Nod(OEQ, Nod(OLEN, s.exprname, nil), Nod(OLEN, mid, nil))
- a.Ntest = Nod(OOROR, lenlt, Nod(OANDAND, leneq, le))
+ a.Left = Nod(OOROR, lenlt, Nod(OANDAND, leneq, le))
} else {
- a.Ntest = le
+ a.Left = le
}
- typecheck(&a.Ntest, Erv)
+ typecheck(&a.Left, Erv)
a.Nbody = list1(s.walkCases(cc[:half]))
- a.Nelse = list1(s.walkCases(cc[half:]))
+ a.Rlist = list1(s.walkCases(cc[half:]))
return a
}
@@ -378,9 +377,9 @@
}
stat = list(stat, Nod(OLABEL, jmp.Left, nil))
- if typeswvar != nil && needvar && n.Nname != nil {
- l := list1(Nod(ODCL, n.Nname, nil))
- l = list(l, Nod(OAS, n.Nname, typeswvar))
+ if typeswvar != nil && needvar && n.Rlist != nil {
+ l := list1(Nod(ODCL, n.Rlist.N, nil))
+ l = list(l, Nod(OAS, n.Rlist.N, typeswvar))
typechecklist(l, Etop)
stat = concat(stat, l)
}
@@ -512,17 +511,21 @@
// search using if..goto, although binary search
// is used with long runs of concrete types.
func (s *typeSwitch) walk(sw *Node) {
- if sw.Ntest == nil {
+ cond := sw.Left
+ sw.Left = nil
+
+ if cond == nil {
+ sw.List = nil
return
}
- if sw.Ntest.Right == nil {
+ if cond.Right == nil {
setlineno(sw)
Yyerror("type switch must have an assignment")
return
}
- walkexpr(&sw.Ntest.Right, &sw.Ninit)
- if !Istype(sw.Ntest.Right.Type, TINTER) {
+ walkexpr(&cond.Right, &sw.Ninit)
+ if !Istype(cond.Right.Type, TINTER) {
Yyerror("type switch must be on an interface")
return
}
@@ -530,9 +533,9 @@
var cas *NodeList
// predeclare temporary variables and the boolean var
- s.facename = temp(sw.Ntest.Right.Type)
+ s.facename = temp(cond.Right.Type)
- a := Nod(OAS, s.facename, sw.Ntest.Right)
+ a := Nod(OAS, s.facename, cond.Right)
typecheck(&a, Etop)
cas = list(cas, a)
@@ -546,7 +549,7 @@
casebody(sw, s.facename)
// calculate type hash
- t := sw.Ntest.Right.Type
+ t := cond.Right.Type
if isnilinter(t) {
a = syslook("efacethash", 1)
} else {
@@ -560,6 +563,7 @@
cas = list(cas, a)
cc := caseClauses(sw, switchKindType)
+ sw.List = nil
var def *Node
if len(cc) > 0 && cc[0].typ == caseKindDefault {
def = cc[0].node.Right
@@ -574,10 +578,10 @@
switch c.typ {
case caseKindTypeNil:
var v Val
- v.Ctype = CTNIL
+ v.U = new(NilVal)
a = Nod(OIF, nil, nil)
- a.Ntest = Nod(OEQ, s.facename, nodlit(v))
- typecheck(&a.Ntest, Erv)
+ a.Left = Nod(OEQ, s.facename, nodlit(v))
+ typecheck(&a.Left, Erv)
a.Nbody = list1(n.Right) // if i==nil { goto l }
n.Right = a
@@ -640,12 +644,13 @@
// typeone generates an AST that jumps to the
// case body if the variable is of type t.
func (s *typeSwitch) typeone(t *Node) *Node {
- name := t.Nname
+ var name *Node
var init *NodeList
- if name == nil {
- typecheck(&nblank, Erv|Easgn)
+ if t.Rlist == nil {
name = nblank
+ typecheck(&nblank, Erv|Easgn)
} else {
+ name = t.Rlist.N
init = list1(Nod(ODCL, name, nil))
}
@@ -658,7 +663,7 @@
init = list(init, a)
c := Nod(OIF, nil, nil)
- c.Ntest = s.okname
+ c.Left = s.okname
c.Nbody = list1(t.Right) // if ok { goto l }
return liststmt(list(init, c))
@@ -674,8 +679,8 @@
Fatal("typeSwitch walkCases")
}
a := Nod(OIF, nil, nil)
- a.Ntest = Nod(OEQ, s.hashname, Nodintconst(int64(c.hash)))
- typecheck(&a.Ntest, Erv)
+ a.Left = Nod(OEQ, s.hashname, Nodintconst(int64(c.hash)))
+ typecheck(&a.Left, Erv)
a.Nbody = list1(n.Right)
cas = list(cas, a)
}
@@ -685,10 +690,10 @@
// find the middle and recur
half := len(cc) / 2
a := Nod(OIF, nil, nil)
- a.Ntest = Nod(OLE, s.hashname, Nodintconst(int64(cc[half-1].hash)))
- typecheck(&a.Ntest, Erv)
+ a.Left = Nod(OLE, s.hashname, Nodintconst(int64(cc[half-1].hash)))
+ typecheck(&a.Left, Erv)
a.Nbody = list1(s.walkCases(cc[:half]))
- a.Nelse = list1(s.walkCases(cc[half:]))
+ a.Rlist = list1(s.walkCases(cc[half:]))
return a
}
@@ -737,11 +742,11 @@
n2 := c2.node.Left
// sort by type (for switches on interface)
- ct := int(n1.Val.Ctype)
- if ct > int(n2.Val.Ctype) {
+ ct := int(n1.Val().Ctype())
+ if ct > int(n2.Val().Ctype()) {
return +1
}
- if ct < int(n2.Val.Ctype) {
+ if ct < int(n2.Val().Ctype()) {
return -1
}
if !Eqtype(n1.Type, n2.Type) {
@@ -755,16 +760,16 @@
// sort by constant value to enable binary search
switch ct {
case CTFLT:
- return mpcmpfltflt(n1.Val.U.(*Mpflt), n2.Val.U.(*Mpflt))
+ return mpcmpfltflt(n1.Val().U.(*Mpflt), n2.Val().U.(*Mpflt))
case CTINT, CTRUNE:
- return Mpcmpfixfix(n1.Val.U.(*Mpint), n2.Val.U.(*Mpint))
+ return Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint))
case CTSTR:
// Sort strings by length and then by value.
// It is much cheaper to compare lengths than values,
// and all we need here is consistency.
// We respect this sorting in exprSwitch.walkCases.
- a := n1.Val.U.(string)
- b := n2.Val.U.(string)
+ a := n1.Val().U.(string)
+ b := n2.Val().U.(string)
if len(a) < len(b) {
return -1
}
diff --git a/src/cmd/compile/internal/gc/syntax.go b/src/cmd/compile/internal/gc/syntax.go
index be43076..b05027b 100644
--- a/src/cmd/compile/internal/gc/syntax.go
+++ b/src/cmd/compile/internal/gc/syntax.go
@@ -15,67 +15,32 @@
// Generic recursive walks should follow these fields.
Left *Node
Right *Node
- Ntest *Node
- Nincr *Node
Ninit *NodeList
Nbody *NodeList
- Nelse *NodeList
List *NodeList
Rlist *NodeList
// most nodes
- Type *Type
- Orig *Node // original form, for printing, and tracking copies of ONAMEs
- Nname *Node
+ Type *Type
+ Orig *Node // original form, for printing, and tracking copies of ONAMEs
// func
Func *Func
// ONAME
- Name *Name
- Defn *Node // ONAME: initializing assignment; OLABEL: labeled statement
- Pack *Node // real package for import . names
- Curfn *Node // function for local variables
- Paramfld *Type // TFIELD for this PPARAM; also for ODOT, curfn
- Alloc *Node // allocation call
- Param *Param
+ Name *Name
- // OPACK
- Pkg *Pkg
+ Sym *Sym // various
+ E interface{} // Opt or Val, see methods below
- // OARRAYLIT, OMAPLIT, OSTRUCTLIT.
- Initplan *InitPlan
+ Xoffset int64
- // Escape analysis.
- Escflowsrc *NodeList // flow(this, src)
- Escretval *NodeList // on OCALLxxx, list of dummy return values
-
- Sym *Sym // various
-
- Opt interface{} // for optimization passes
-
- // OLITERAL
- Val Val
-
- Xoffset int64
- Stkdelta int64 // offset added by stack frame compaction phase.
-
- // Escape analysis.
- Escloopdepth int32 // -1: global, 0: return variables, 1:function top level, increased inside function for every loop or label to mark scopes
-
- Vargen int32 // unique name for OTYPE/ONAME within a function. Function outputs are numbered starting at one.
- Lineno int32
- Iota int32
- Walkgen uint32
-
- Funcdepth int32
+ Lineno int32
// OREGISTER, OINDREG
Reg int16
- // most nodes - smaller fields
- Esclevel Level
- Esc uint16 // EscXXX
+ Esc uint16 // EscXXX
Op uint8
Nointerface bool
@@ -100,14 +65,65 @@
Assigned bool // is the variable ever assigned to
Likely int8 // likeliness of if statement
Hasbreak bool // has break statement
+ hasVal int8 // +1 for Val, -1 for Opt, 0 for not yet set
}
-// Name holds Node fields used only by ONAME nodes.
+// Val returns the Val for the node.
+func (n *Node) Val() Val {
+ if n.hasVal != +1 {
+ return Val{}
+ }
+ return Val{n.E}
+}
+
+// SetVal sets the Val for the node, which must not have been used with SetOpt.
+func (n *Node) SetVal(v Val) {
+ if n.hasVal == -1 {
+ Debug['h'] = 1
+ Dump("have Opt", n)
+ Fatal("have Opt")
+ }
+ n.hasVal = +1
+ n.E = v.U
+}
+
+// Opt returns the optimizer data for the node.
+func (n *Node) Opt() interface{} {
+ if n.hasVal != -1 {
+ return nil
+ }
+ return n.E
+}
+
+// SetOpt sets the optimizer data for the node, which must not have been used with SetVal.
+// SetOpt(nil) is ignored for Vals to simplify call sites that are clearing Opts.
+func (n *Node) SetOpt(x interface{}) {
+ if x == nil && n.hasVal >= 0 {
+ return
+ }
+ if n.hasVal == +1 {
+ Debug['h'] = 1
+ Dump("have Val", n)
+ Fatal("have Val")
+ }
+ n.hasVal = -1
+ n.E = x
+}
+
+// Name holds Node fields used only by named nodes (ONAME, OPACK, some OLITERAL).
type Name struct {
+ Pack *Node // real package for import . names
+ Pkg *Pkg // pkg for OPACK nodes
Heapaddr *Node // temp holding heap address of param
Inlvar *Node // ONAME substitute while inlining
+ Defn *Node // initializing assignment
+ Curfn *Node // function for local variables
+ Param *Param
Decldepth int32 // declaration loop depth, increased for every loop or label
- Method bool // OCALLMETH name
+ Vargen int32 // unique name for ONAME within a function. Function outputs are numbered starting at one.
+ Iota int32 // value if this name is iota
+ Funcdepth int32
+ Method bool // OCALLMETH name
Readonly bool
Captured bool // is the variable captured by a closure
Byval bool // is the variable captured by value or by reference
@@ -121,25 +137,35 @@
Outerexpr *Node // expression copied into closure for variable
Stackparam *Node // OPARAM node referring to stack copy of param
+ // ONAME PPARAM
+ Field *Type // TFIELD in arg struct
+
// ONAME closure param with PPARAMREF
Outer *Node // outer PPARAMREF in nested closure
Closure *Node // ONAME/PHEAP <-> ONAME/PPARAMREF
- Top int // top context (Ecall, Eproc, etc)
}
// Func holds Node fields used only with function-like nodes.
type Func struct {
- Shortname *Node
- Enter *NodeList
- Exit *NodeList
- Cvars *NodeList // closure params
- Dcl *NodeList // autodcl for this func/closure
- Inldcl *NodeList // copy of dcl for use in inlining
- Closgen int
- Outerfunc *Node
+ Shortname *Node
+ Enter *NodeList
+ Exit *NodeList
+ Cvars *NodeList // closure params
+ Dcl *NodeList // autodcl for this func/closure
+ Inldcl *NodeList // copy of dcl for use in inlining
+ Closgen int
+ Outerfunc *Node
+ Fieldtrack []*Type
+ Outer *Node // outer func for closure
+ Ntype *Node // signature
+ Top int // top context (Ecall, Eproc, etc)
+ Closure *Node // OCLOSURE <-> ODCLFUNC
+ FCurfn *Node
+ Nname *Node
Inl *NodeList // copy of the body for use in inlining
InlCost int32
+ Depth int32
Endlineno int32
@@ -162,129 +188,132 @@
OLITERAL // literal
// expressions
- OADD // x + y
- OSUB // x - y
- OOR // x | y
- OXOR // x ^ y
- OADDSTR // s + "foo"
- OADDR // &x
- OANDAND // b0 && b1
- OAPPEND // append
- OARRAYBYTESTR // string(bytes)
- OARRAYBYTESTRTMP // string(bytes) ephemeral
- OARRAYRUNESTR // string(runes)
- OSTRARRAYBYTE // []byte(s)
- OSTRARRAYBYTETMP // []byte(s) ephemeral
- OSTRARRAYRUNE // []rune(s)
- OAS // x = y or x := y
- OAS2 // x, y, z = xx, yy, zz
- OAS2FUNC // x, y = f()
- OAS2RECV // x, ok = <-c
- OAS2MAPR // x, ok = m["foo"]
- OAS2DOTTYPE // x, ok = I.(int)
- OASOP // x += y
- OASWB // OAS but with write barrier
- OCALL // function call, method call or type conversion, possibly preceded by defer or go.
- OCALLFUNC // f()
- OCALLMETH // t.Method()
- OCALLINTER // err.Error()
- OCALLPART // t.Method (without ())
- OCAP // cap
- OCLOSE // close
- OCLOSURE // f = func() { etc }
- OCMPIFACE // err1 == err2
- OCMPSTR // s1 == s2
- OCOMPLIT // composite literal, typechecking may convert to a more specific OXXXLIT.
- OMAPLIT // M{"foo":3, "bar":4}
- OSTRUCTLIT // T{x:3, y:4}
- OARRAYLIT // [2]int{3, 4}
- OPTRLIT // &T{x:3, y:4}
- OCONV // var i int; var u uint; i = int(u)
- OCONVIFACE // I(t)
- OCONVNOP // type Int int; var i int; var j Int; i = int(j)
- OCOPY // copy
- ODCL // var x int
- ODCLFUNC // func f() or func (r) f()
- ODCLFIELD // struct field, interface field, or func/method argument/return value.
- ODCLCONST // const pi = 3.14
- ODCLTYPE // type Int int
- ODELETE // delete
- ODOT // t.x
- ODOTPTR // p.x that is implicitly (*p).x
- ODOTMETH // t.Method
- ODOTINTER // err.Error
- OXDOT // t.x, typechecking may convert to a more specific ODOTXXX.
- ODOTTYPE // e = err.(MyErr)
- ODOTTYPE2 // e, ok = err.(MyErr)
- OEQ // x == y
- ONE // x != y
- OLT // x < y
- OLE // x <= y
- OGE // x >= y
- OGT // x > y
- OIND // *p
- OINDEX // a[i]
- OINDEXMAP // m[s]
- OKEY // The x:3 in t{x:3, y:4}, the 1:2 in a[1:2], the 2:20 in [3]int{2:20}, etc.
- OPARAM // The on-stack copy of a parameter or return value that escapes.
- OLEN // len
- OMAKE // make, typechecking may convert to a more specific OMAKEXXX.
- OMAKECHAN // make(chan int)
- OMAKEMAP // make(map[string]int)
- OMAKESLICE // make([]int, 0)
- OMUL // *
- ODIV // x / y
- OMOD // x % y
- OLSH // x << u
- ORSH // x >> u
- OAND // x & y
- OANDNOT // x &^ y
- ONEW // new
- ONOT // !b
- OCOM // ^x
- OPLUS // +x
- OMINUS // -y
- OOROR // b1 || b2
- OPANIC // panic
- OPRINT // print
- OPRINTN // println
- OPAREN // (x)
- OSEND // c <- x
- OSLICE // v[1:2], typechecking may convert to a more specific OSLICEXXX.
- OSLICEARR // a[1:2]
- OSLICESTR // s[1:2]
- OSLICE3 // v[1:2:3], typechecking may convert to OSLICE3ARR.
- OSLICE3ARR // a[1:2:3]
- ORECOVER // recover
- ORECV // <-c
- ORUNESTR // string(i)
- OSELRECV // case x = <-c:
- OSELRECV2 // case x, ok = <-c:
- OIOTA // iota
- OREAL // real
- OIMAG // imag
- OCOMPLEX // complex
+ OADD // Left + Right
+ OSUB // Left - Right
+ OOR // Left | Right
+ OXOR // Left ^ Right
+ OADDSTR // Left + Right (string addition)
+ OADDR // &Left
+ OANDAND // Left && Right
+ OAPPEND // append(List)
+ OARRAYBYTESTR // Type(Left) (Type is string, Left is a []byte)
+ OARRAYBYTESTRTMP // Type(Left) (Type is string, Left is a []byte, ephemeral)
+ OARRAYRUNESTR // Type(Left) (Type is string, Left is a []rune)
+ OSTRARRAYBYTE // Type(Left) (Type is []byte, Left is a string)
+ OSTRARRAYBYTETMP // Type(Left) (Type is []byte, Left is a string, ephemeral)
+ OSTRARRAYRUNE // Type(Left) (Type is []rune, Left is a string)
+ OAS // Left = Right or (if Colas=true) Left := Right
+ OAS2 // List = Rlist (x, y, z = a, b, c)
+ OAS2FUNC // List = Rlist (x, y = f())
+ OAS2RECV // List = Rlist (x, ok = <-c)
+ OAS2MAPR // List = Rlist (x, ok = m["foo"])
+ OAS2DOTTYPE // List = Rlist (x, ok = I.(int))
+ OASOP // Left Etype= Right (x += y)
+ OASWB // Left = Right (with write barrier)
+ OCALL // Left(List) (function call, method call or type conversion)
+ OCALLFUNC // Left(List) (function call f(args))
+ OCALLMETH // Left(List) (direct method call x.Method(args))
+ OCALLINTER // Left(List) (interface method call x.Method(args))
+ OCALLPART // Left.Right (method expression x.Method, not called)
+ OCAP // cap(Left)
+ OCLOSE // close(Left)
+ OCLOSURE // func Type { Body } (func literal)
+ OCMPIFACE // Left Etype Right (interface comparison, x == y or x != y)
+ OCMPSTR // Left Etype Right (string comparison, x == y, x < y, etc)
+ OCOMPLIT // Right{List} (composite literal, not yet lowered to specific form)
+ OMAPLIT // Type{List} (composite literal, Type is map)
+ OSTRUCTLIT // Type{List} (composite literal, Type is struct)
+ OARRAYLIT // Type{List} (composite literal, Type is array or slice)
+ OPTRLIT // &Left (left is composite literal)
+ OCONV // Type(Left) (type conversion)
+ OCONVIFACE // Type(Left) (type conversion, to interface)
+ OCONVNOP // Type(Left) (type conversion, no effect)
+ OCOPY // copy(Left, Right)
+ ODCL // var Left (declares Left of type Left.Type)
+
+ // Used during parsing but don't last.
+ ODCLFUNC // func f() or func (r) f()
+ ODCLFIELD // struct field, interface field, or func/method argument/return value.
+ ODCLCONST // const pi = 3.14
+ ODCLTYPE // type Int int
+
+ ODELETE // delete(Left, Right)
+ ODOT // Left.Right (Left is of struct type)
+ ODOTPTR // Left.Right (Left is of pointer to struct type)
+ ODOTMETH // Left.Right (Left is non-interface, Right is method name)
+ ODOTINTER // Left.Right (Left is interface, Right is method name)
+ OXDOT // Left.Right (before rewrite to one of the preceding)
+ ODOTTYPE // Left.Right or Left.Type (.Right during parsing, .Type once resolved)
+ ODOTTYPE2 // Left.Right or Left.Type (.Right during parsing, .Type once resolved; on rhs of OAS2DOTTYPE)
+ OEQ // Left == Right
+ ONE // Left != Right
+ OLT // Left < Right
+ OLE // Left <= Right
+ OGE // Left >= Right
+ OGT // Left > Right
+ OIND // *Left
+ OINDEX // Left[Right] (index of array or slice)
+ OINDEXMAP // Left[Right] (index of map)
+ OKEY // Left:Right (key:value in struct/array/map literal, or slice index pair)
+ OPARAM // variant of ONAME for on-stack copy of a parameter or return value that escapes.
+ OLEN // len(Left)
+ OMAKE // make(List) (before type checking converts to one of the following)
+ OMAKECHAN // make(Type, Left) (type is chan)
+ OMAKEMAP // make(Type, Left) (type is map)
+ OMAKESLICE // make(Type, Left, Right) (type is slice)
+ OMUL // Left * Right
+ ODIV // Left / Right
+ OMOD // Left % Right
+ OLSH // Left << Right
+ ORSH // Left >> Right
+ OAND // Left & Right
+ OANDNOT // Left &^ Right
+ ONEW // new(Left)
+ ONOT // !Left
+ OCOM // ^Left
+ OPLUS // +Left
+ OMINUS // -Left
+ OOROR // Left || Right
+ OPANIC // panic(Left)
+ OPRINT // print(List)
+ OPRINTN // println(List)
+ OPAREN // (Left)
+ OSEND // Left <- Right
+ OSLICE // Left[Right.Left : Right.Right] (Left is untypechecked or slice; Right.Op==OKEY)
+ OSLICEARR // Left[Right.Left : Right.Right] (Left is array)
+ OSLICESTR // Left[Right.Left : Right.Right] (Left is string)
+ OSLICE3 // Left[R.Left : R.R.Left : R.R.R] (R=Right; Left is untypedchecked or slice; R.Op and R.R.Op==OKEY)
+ OSLICE3ARR // Left[R.Left : R.R.Left : R.R.R] (R=Right; Left is array; R.Op and R.R.Op==OKEY)
+ ORECOVER // recover()
+ ORECV // <-Left
+ ORUNESTR // Type(Left) (Type is string, Left is rune)
+ OSELRECV // Left = <-Right.Left: (appears as .Left of OCASE; Right.Op == ORECV)
+ OSELRECV2 // List = <-Right.Left: (apperas as .Left of OCASE; count(List) == 2, Right.Op == ORECV)
+ OIOTA // iota
+ OREAL // real(Left)
+ OIMAG // imag(Left)
+ OCOMPLEX // complex(Left, Right)
// statements
- OBLOCK // block of code
+ OBLOCK // { List } (block of code)
OBREAK // break
- OCASE // case, after being verified by swt.c's casebody.
- OXCASE // case, before verification.
+ OCASE // case List: Nbody (select case after processing; List==nil means default)
+ OXCASE // case List: Nbody (select case before processing; List==nil means default)
OCONTINUE // continue
- ODEFER // defer
- OEMPTY // no-op
- OFALL // fallthrough, after being verified by swt.c's casebody.
- OXFALL // fallthrough, before verification.
- OFOR // for
- OGOTO // goto
- OIF // if
- OLABEL // label:
- OPROC // go
- ORANGE // range
- ORETURN // return
- OSELECT // select
- OSWITCH // switch x
- OTYPESW // switch err.(type)
+ ODEFER // defer Left (Left must be call)
+ OEMPTY // no-op (empty statement)
+ OFALL // fallthrough (after processing)
+ OXFALL // fallthrough (before processing)
+ OFOR // for Ninit; Left; Right { Nbody }
+ OGOTO // goto Left
+ OIF // if Ninit; Left { Nbody } else { Rlist }
+ OLABEL // Left:
+ OPROC // go Left (Left must be call)
+ ORANGE // for List = range Right { Nbody }
+ ORETURN // return List
+ OSELECT // select { List } (List is list of OXCASE or OCASE)
+ OSWITCH // switch Ninit; Left { List } (List is a list of OXCASE or OCASE)
+ OTYPESW // List = Left.(type) (appears as .Left of OSWITCH)
// types
OTCHAN // chan int
@@ -327,22 +356,6 @@
OEND
)
-/*
- * Every node has a walkgen field.
- * If you want to do a traversal of a node graph that
- * might contain duplicates and want to avoid
- * visiting the same nodes twice, increment walkgen
- * before starting. Then before processing a node, do
- *
- * if(n->walkgen == walkgen)
- * return;
- * n->walkgen = walkgen;
- *
- * Such a walk cannot call another such walk recursively,
- * because of the use of the global walkgen.
- */
-var walkgen uint32
-
// A NodeList is a linked list of nodes.
// TODO(rsc): Some uses of NodeList should be made into slices.
// The remaining ones probably just need a simple linked list,
diff --git a/src/cmd/compile/internal/gc/typecheck.go b/src/cmd/compile/internal/gc/typecheck.go
index 2900da8..9f4db27 100644
--- a/src/cmd/compile/internal/gc/typecheck.go
+++ b/src/cmd/compile/internal/gc/typecheck.go
@@ -29,8 +29,8 @@
if r != nil {
if r.Op != OIOTA {
n = r
- } else if n.Iota >= 0 {
- n = Nodintconst(int64(n.Iota))
+ } else if n.Name.Iota >= 0 {
+ n = Nodintconst(int64(n.Name.Iota))
}
}
}
@@ -237,7 +237,7 @@
return true
}
- return callrecv(n.Left) || callrecv(n.Right) || callrecv(n.Ntest) || callrecv(n.Nincr) || callrecvlist(n.Ninit) || callrecvlist(n.Nbody) || callrecvlist(n.Nelse) || callrecvlist(n.List) || callrecvlist(n.Rlist)
+ return callrecv(n.Left) || callrecv(n.Right) || callrecvlist(n.Ninit) || callrecvlist(n.Nbody) || callrecvlist(n.List) || callrecvlist(n.Rlist)
}
func callrecvlist(l *NodeList) bool {
@@ -301,7 +301,7 @@
case OLITERAL:
ok |= Erv
- if n.Type == nil && n.Val.Ctype == CTSTR {
+ if n.Type == nil && n.Val().Ctype() == CTSTR {
n.Type = idealstring
}
break OpSwitch
@@ -377,10 +377,10 @@
var v Val
switch consttype(l) {
case CTINT, CTRUNE:
- v = l.Val
+ v = l.Val()
case CTFLT:
- v = toint(l.Val)
+ v = toint(l.Val())
default:
if l.Type != nil && Isint[l.Type.Etype] && l.Op != OLITERAL {
@@ -756,12 +756,12 @@
}
if et == TINTER {
- if l.Op == OLITERAL && l.Val.Ctype == CTNIL {
+ if l.Op == OLITERAL && l.Val().Ctype() == CTNIL {
// swap for back end
n.Left = r
n.Right = l
- } else if r.Op == OLITERAL && r.Val.Ctype == CTNIL {
+ } else if r.Op == OLITERAL && r.Val().Ctype() == CTNIL {
} else // leave alone for back end
if Isinter(r.Type) == Isinter(l.Type) {
n.Etype = n.Op
@@ -770,7 +770,7 @@
}
if (op == ODIV || op == OMOD) && Isconst(r, CTINT) {
- if mpcmpfixc(r.Val.U.(*Mpint), 0) == 0 {
+ if mpcmpfixc(r.Val().U.(*Mpint), 0) == 0 {
Yyerror("division by zero")
n.Type = nil
return
@@ -813,8 +813,8 @@
var l *Node
for l = n.Left; l != r; l = l.Left {
l.Addrtaken = true
- if l.Param != nil && l.Param.Closure != nil {
- l.Param.Closure.Addrtaken = true
+ if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
+ l.Name.Param.Closure.Addrtaken = true
}
}
@@ -822,8 +822,8 @@
Fatal("found non-orig name node %v", l)
}
l.Addrtaken = true
- if l.Param != nil && l.Param.Closure != nil {
- l.Param.Closure.Addrtaken = true
+ if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
+ l.Name.Param.Closure.Addrtaken = true
}
defaultlit(&n.Left, nil)
l = n.Left
@@ -1046,14 +1046,14 @@
}
if Isconst(n.Right, CTINT) {
- x := Mpgetfix(n.Right.Val.U.(*Mpint))
+ x := Mpgetfix(n.Right.Val().U.(*Mpint))
if x < 0 {
Yyerror("invalid %s index %v (index must be non-negative)", why, n.Right)
} else if Isfixedarray(t) && t.Bound > 0 && x >= t.Bound {
Yyerror("invalid array index %v (out of bounds for %d-element array)", n.Right, t.Bound)
- } else if Isconst(n.Left, CTSTR) && x >= int64(len(n.Left.Val.U.(string))) {
- Yyerror("invalid string index %v (out of bounds for %d-byte string)", n.Right, len(n.Left.Val.U.(string)))
- } else if Mpcmpfixfix(n.Right.Val.U.(*Mpint), Maxintval[TINT]) > 0 {
+ } else if Isconst(n.Left, CTSTR) && x >= int64(len(n.Left.Val().U.(string))) {
+ Yyerror("invalid string index %v (out of bounds for %d-byte string)", n.Right, len(n.Left.Val().U.(string)))
+ } else if Mpcmpfixfix(n.Right.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
Yyerror("invalid %s index %v (index too large)", why, n.Right)
}
}
@@ -1438,9 +1438,9 @@
if Isconst(l, CTCPLX) {
r := n
if n.Op == OREAL {
- n = nodfltconst(&l.Val.U.(*Mpcplx).Real)
+ n = nodfltconst(&l.Val().U.(*Mpcplx).Real)
} else {
- n = nodfltconst(&l.Val.U.(*Mpcplx).Imag)
+ n = nodfltconst(&l.Val().U.(*Mpcplx).Imag)
}
n.Orig = r
}
@@ -1454,7 +1454,7 @@
case TSTRING:
if Isconst(l, CTSTR) {
r := Nod(OXXX, nil, nil)
- Nodconst(r, Types[TINT], int64(len(l.Val.U.(string))))
+ Nodconst(r, Types[TINT], int64(len(l.Val().U.(string))))
r.Orig = n
n = r
}
@@ -1547,7 +1547,7 @@
if l.Op == OLITERAL && r.Op == OLITERAL {
// make it a complex literal
- r = nodcplxlit(l.Val, r.Val)
+ r = nodcplxlit(l.Val(), r.Val())
r.Orig = n
n = r
@@ -1788,7 +1788,7 @@
n.Orig = r
*r = *n
n.Op = OLITERAL
- n.Val = n.Left.Val
+ n.SetVal(n.Left.Val())
}
// do not use stringtoarraylit.
@@ -1862,7 +1862,7 @@
n.Type = nil
return
}
- if Isconst(l, CTINT) && r != nil && Isconst(r, CTINT) && Mpcmpfixfix(l.Val.U.(*Mpint), r.Val.U.(*Mpint)) > 0 {
+ if Isconst(l, CTINT) && r != nil && Isconst(r, CTINT) && Mpcmpfixfix(l.Val().U.(*Mpint), r.Val().U.(*Mpint)) > 0 {
Yyerror("len larger than cap in make(%v)", t)
n.Type = nil
return
@@ -2055,7 +2055,7 @@
// Code that creates temps does not bother to set defn, so do it here.
if n.Left.Op == ONAME && strings.HasPrefix(n.Left.Sym.Name, "autotmp_") {
- n.Left.Defn = n
+ n.Left.Name.Defn = n
}
break OpSwitch
@@ -2097,14 +2097,14 @@
ok |= Etop
typechecklist(n.Ninit, Etop)
decldepth++
- typecheck(&n.Ntest, Erv)
- if n.Ntest != nil {
- t := n.Ntest.Type
+ typecheck(&n.Left, Erv)
+ if n.Left != nil {
+ t := n.Left.Type
if t != nil && t.Etype != TBOOL {
- Yyerror("non-bool %v used as for condition", Nconv(n.Ntest, obj.FmtLong))
+ Yyerror("non-bool %v used as for condition", Nconv(n.Left, obj.FmtLong))
}
}
- typecheck(&n.Nincr, Etop)
+ typecheck(&n.Right, Etop)
typechecklist(n.Nbody, Etop)
decldepth--
break OpSwitch
@@ -2112,15 +2112,15 @@
case OIF:
ok |= Etop
typechecklist(n.Ninit, Etop)
- typecheck(&n.Ntest, Erv)
- if n.Ntest != nil {
- t := n.Ntest.Type
+ typecheck(&n.Left, Erv)
+ if n.Left != nil {
+ t := n.Left.Type
if t != nil && t.Etype != TBOOL {
- Yyerror("non-bool %v used as if condition", Nconv(n.Ntest, obj.FmtLong))
+ Yyerror("non-bool %v used as if condition", Nconv(n.Left, obj.FmtLong))
}
}
typechecklist(n.Nbody, Etop)
- typechecklist(n.Nelse, Etop)
+ typechecklist(n.Rlist, Etop)
break OpSwitch
case ORETURN:
@@ -2258,16 +2258,16 @@
}
if r.Op == OLITERAL {
- if Mpgetfix(r.Val.U.(*Mpint)) < 0 {
+ if Mpgetfix(r.Val().U.(*Mpint)) < 0 {
Yyerror("invalid slice index %v (index must be non-negative)", r)
return -1
- } else if tp != nil && tp.Bound > 0 && Mpgetfix(r.Val.U.(*Mpint)) > tp.Bound {
+ } else if tp != nil && tp.Bound > 0 && Mpgetfix(r.Val().U.(*Mpint)) > tp.Bound {
Yyerror("invalid slice index %v (out of bounds for %d-element array)", r, tp.Bound)
return -1
- } else if Isconst(l, CTSTR) && Mpgetfix(r.Val.U.(*Mpint)) > int64(len(l.Val.U.(string))) {
- Yyerror("invalid slice index %v (out of bounds for %d-byte string)", r, len(l.Val.U.(string)))
+ } else if Isconst(l, CTSTR) && Mpgetfix(r.Val().U.(*Mpint)) > int64(len(l.Val().U.(string))) {
+ Yyerror("invalid slice index %v (out of bounds for %d-byte string)", r, len(l.Val().U.(string)))
return -1
- } else if Mpcmpfixfix(r.Val.U.(*Mpint), Maxintval[TINT]) > 0 {
+ } else if Mpcmpfixfix(r.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
Yyerror("invalid slice index %v (index too large)", r)
return -1
}
@@ -2277,7 +2277,7 @@
}
func checksliceconst(lo *Node, hi *Node) int {
- if lo != nil && hi != nil && lo.Op == OLITERAL && hi.Op == OLITERAL && Mpcmpfixfix(lo.Val.U.(*Mpint), hi.Val.U.(*Mpint)) > 0 {
+ if lo != nil && hi != nil && lo.Op == OLITERAL && hi.Op == OLITERAL && Mpcmpfixfix(lo.Val().U.(*Mpint), hi.Val().U.(*Mpint)) > 0 {
Yyerror("invalid slice index: %v > %v", lo, hi)
return -1
}
@@ -2489,6 +2489,15 @@
return t
}
+type typeSym struct {
+ t *Type
+ s *Sym
+}
+
+// dotField maps (*Type, *Sym) pairs to the corresponding struct field (*Type with Etype==TFIELD).
+// It is a cache for use during usefield in walk.go, only enabled when field tracking.
+var dotField = map[typeSym]*Type{}
+
func lookdot(n *Node, t *Type, dostrcmp int) *Type {
s := n.Right.Sym
@@ -2521,7 +2530,9 @@
}
n.Xoffset = f1.Width
n.Type = f1.Type
- n.Paramfld = f1
+ if obj.Fieldtrack_enabled > 0 {
+ dotField[typeSym{t, s}] = f1
+ }
if t.Etype == TINTER {
if Isptr[n.Left.Type.Etype] {
n.Left = Nod(OIND, n.Left, nil) // implicitstar
@@ -2811,57 +2822,56 @@
hash[name] = true
}
-func keydup(n *Node, hash []*Node) {
+func keydup(n *Node, hash map[uint32][]*Node) {
orign := n
if n.Op == OCONVIFACE {
n = n.Left
}
evconst(n)
if n.Op != OLITERAL {
- return // we dont check variables
+ return // we don't check variables
}
- var b uint32
- switch n.Val.Ctype {
+ var h uint32
+ switch n.Val().Ctype() {
default: // unknown, bool, nil
- b = 23
+ h = 23
case CTINT, CTRUNE:
- b = uint32(Mpgetfix(n.Val.U.(*Mpint)))
+ h = uint32(Mpgetfix(n.Val().U.(*Mpint)))
case CTFLT:
- d := mpgetflt(n.Val.U.(*Mpflt))
+ d := mpgetflt(n.Val().U.(*Mpflt))
x := math.Float64bits(d)
for i := 0; i < 8; i++ {
- b = b*PRIME1 + uint32(x&0xFF)
+ h = h*PRIME1 + uint32(x&0xFF)
x >>= 8
}
case CTSTR:
- b = 0
- s := n.Val.U.(string)
- for i := len(n.Val.U.(string)); i > 0; i-- {
- b = b*PRIME1 + uint32(s[0])
+ h = 0
+ s := n.Val().U.(string)
+ for i := len(n.Val().U.(string)); i > 0; i-- {
+ h = h*PRIME1 + uint32(s[0])
s = s[1:]
}
}
- h := uint(b % uint32(len(hash)))
var cmp Node
- for a := hash[h]; a != nil; a = a.Ntest {
+ for _, a := range hash[h] {
cmp.Op = OEQ
cmp.Left = n
- b = 0
+ b := uint32(0)
if a.Op == OCONVIFACE && orign.Op == OCONVIFACE {
if Eqtype(a.Left.Type, n.Type) {
cmp.Right = a.Left
evconst(&cmp)
- b = uint32(obj.Bool2int(cmp.Val.U.(bool)))
+ b = uint32(obj.Bool2int(cmp.Val().U.(bool)))
}
} else if Eqtype(a.Type, n.Type) {
cmp.Right = a
evconst(&cmp)
- b = uint32(obj.Bool2int(cmp.Val.U.(bool)))
+ b = uint32(obj.Bool2int(cmp.Val().U.(bool)))
}
if b != 0 {
@@ -2870,75 +2880,20 @@
}
}
- orign.Ntest = hash[h]
- hash[h] = orign
+ hash[h] = append(hash[h], orign)
}
-func indexdup(n *Node, hash []*Node) {
+func indexdup(n *Node, hash map[int64]*Node) {
if n.Op != OLITERAL {
Fatal("indexdup: not OLITERAL")
}
- b := uint32(Mpgetfix(n.Val.U.(*Mpint)))
- h := uint(b % uint32(len(hash)))
- var c uint32
- for a := hash[h]; a != nil; a = a.Ntest {
- c = uint32(Mpgetfix(a.Val.U.(*Mpint)))
- if b == c {
- Yyerror("duplicate index in array literal: %d", b)
- return
- }
+ v := Mpgetfix(n.Val().U.(*Mpint))
+ if hash[v] != nil {
+ Yyerror("duplicate index in array literal: %d", v)
+ return
}
-
- n.Ntest = hash[h]
- hash[h] = n
-}
-
-func prime(h uint32, sr uint32) bool {
- for n := uint32(3); n <= sr; n += 2 {
- if h%n == 0 {
- return false
- }
- }
- return true
-}
-
-func inithash(n *Node, autohash []*Node) []*Node {
- // count the number of entries
- h := uint32(0)
-
- for ll := n.List; ll != nil; ll = ll.Next {
- h++
- }
-
- // if the auto hash table is
- // large enough use it.
- if h <= uint32(len(autohash)) {
- for i := range autohash {
- autohash[i] = nil
- }
- return autohash
- }
-
- // make hash size odd and 12% larger than entries
- h += h / 8
-
- h |= 1
-
- // calculate sqrt of h
- sr := h / 2
-
- for i := 0; i < 5; i++ {
- sr = (sr + h/sr) / 2
- }
-
- // check for primeality
- for !prime(h, sr) {
- h += 2
- }
-
- // build and return a throw-away hash table
- return make([]*Node, h)
+ hash[v] = n
}
func iscomptype(t *Type) bool {
@@ -3031,9 +2986,14 @@
n.Type = nil
case TARRAY:
- var autohash [101]*Node
- hash := inithash(n, autohash[:])
-
+ // Only allocate hash if there are some key/value pairs.
+ var hash map[int64]*Node
+ for ll := n.List; ll != nil; ll = ll.Next {
+ if ll.N.Op == OKEY {
+ hash = make(map[int64]*Node)
+ break
+ }
+ }
length := int64(0)
i := 0
var l *Node
@@ -3056,7 +3016,7 @@
i = -(1 << 30) // stay negative for a while
}
- if i >= 0 {
+ if i >= 0 && hash != nil {
indexdup(l.Left, hash)
}
i++
@@ -3085,9 +3045,7 @@
n.Op = OARRAYLIT
case TMAP:
- var autohash [101]*Node
- hash := inithash(n, autohash[:])
-
+ hash := make(map[uint32][]*Node)
var l *Node
for ll := n.List; ll != nil; ll = ll.Next {
l = ll.N
@@ -3098,9 +3056,11 @@
continue
}
- typecheck(&l.Left, Erv)
- defaultlit(&l.Left, t.Down)
- l.Left = assignconv(l.Left, t.Down, "map key")
+ r = l.Left
+ pushtype(r, t.Down)
+ typecheck(&r, Erv)
+ defaultlit(&r, t.Down)
+ l.Left = assignconv(r, t.Down, "map key")
if l.Left.Op != OCONV {
keydup(l.Left, hash)
}
@@ -3268,19 +3228,19 @@
func checkassign(stmt *Node, n *Node) {
// Variables declared in ORANGE are assigned on every iteration.
- if n.Defn != stmt || stmt.Op == ORANGE {
+ if n.Name == nil || n.Name.Defn != stmt || stmt.Op == ORANGE {
r := outervalue(n)
var l *Node
for l = n; l != r; l = l.Left {
l.Assigned = true
- if l.Param != nil && l.Param.Closure != nil {
- l.Param.Closure.Assigned = true
+ if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
+ l.Name.Param.Closure.Assigned = true
}
}
l.Assigned = true
- if l.Param != nil && l.Param.Closure != nil {
- l.Param.Closure.Assigned = true
+ if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
+ l.Name.Param.Closure.Assigned = true
}
}
@@ -3345,7 +3305,7 @@
// so that the conversion below happens).
n.Left = resolve(n.Left)
- if n.Left.Defn != n || n.Left.Param.Ntype != nil {
+ if n.Left.Name == nil || n.Left.Name.Defn != n || n.Left.Name.Param.Ntype != nil {
typecheck(&n.Left, Erv|Easgn)
}
@@ -3357,7 +3317,7 @@
}
}
- if n.Left.Defn == n && n.Left.Param.Ntype == nil {
+ if n.Left.Name != nil && n.Left.Name.Defn == n && n.Left.Name.Param.Ntype == nil {
defaultlit(&n.Right, nil)
n.Left.Type = n.Right.Type
}
@@ -3386,7 +3346,7 @@
// delicate little dance.
ll.N = resolve(ll.N)
- if ll.N.Defn != n || ll.N.Param.Ntype != nil {
+ if ll.N.Name == nil || ll.N.Name.Defn != n || ll.N.Name.Param.Ntype != nil {
typecheck(&ll.N, Erv|Easgn)
}
}
@@ -3410,7 +3370,7 @@
if ll.N.Type != nil && lr.N.Type != nil {
lr.N = assignconv(lr.N, ll.N.Type, "assignment")
}
- if ll.N.Defn == n && ll.N.Param.Ntype == nil {
+ if ll.N.Name != nil && ll.N.Name.Defn == n && ll.N.Name.Param.Ntype == nil {
defaultlit(&lr.N, nil)
ll.N.Type = lr.N.Type
}
@@ -3443,7 +3403,7 @@
if t.Type != nil && ll.N.Type != nil {
checkassignto(t.Type, ll.N)
}
- if ll.N.Defn == n && ll.N.Param.Ntype == nil {
+ if ll.N.Name != nil && ll.N.Name.Defn == n && ll.N.Name.Param.Ntype == nil {
ll.N.Type = t.Type
}
t = structnext(&s)
@@ -3475,14 +3435,14 @@
if l.Type != nil {
checkassignto(r.Type, l)
}
- if l.Defn == n {
+ if l.Name != nil && l.Name.Defn == n {
l.Type = r.Type
}
l := n.List.Next.N
if l.Type != nil && l.Type.Etype != TBOOL {
checkassignto(Types[TBOOL], l)
}
- if l.Defn == n && l.Param.Ntype == nil {
+ if l.Name != nil && l.Name.Defn == n && l.Name.Param.Ntype == nil {
l.Type = Types[TBOOL]
}
goto out
@@ -3507,16 +3467,16 @@
* type check function definition
*/
func typecheckfunc(n *Node) {
- typecheck(&n.Nname, Erv|Easgn)
- t := n.Nname.Type
+ typecheck(&n.Func.Nname, Erv|Easgn)
+ t := n.Func.Nname.Type
if t == nil {
return
}
n.Type = t
- t.Nname = n.Nname
+ t.Nname = n.Func.Nname
rcvr := getthisx(t).Type
if rcvr != nil && n.Func.Shortname != nil && !isblank(n.Func.Shortname) {
- addmethod(n.Func.Shortname.Sym, t, true, n.Nname.Nointerface)
+ addmethod(n.Func.Shortname.Sym, t, true, n.Func.Nname.Nointerface)
}
for l := n.Func.Dcl; l != nil; l = l.Next {
@@ -3528,11 +3488,11 @@
func stringtoarraylit(np **Node) {
n := *np
- if n.Left.Op != OLITERAL || n.Left.Val.Ctype != CTSTR {
+ if n.Left.Op != OLITERAL || n.Left.Val().Ctype() != CTSTR {
Fatal("stringtoarraylit %v", n)
}
- s := n.Left.Val.U.(string)
+ s := n.Left.Val().U.(string)
var l *NodeList
if n.Type.Type.Etype == TUINT8 {
// []byte
@@ -3607,7 +3567,9 @@
t = n.Type
t.Sym = n.Sym
t.Local = n.Local
- t.Vargen = n.Vargen
+ if n.Name != nil {
+ t.Vargen = n.Name.Vargen
+ }
t.Siggen = 0
t.Method = nil
t.Xmethod = nil
@@ -3646,8 +3608,8 @@
setlineno(n)
n.Type.Sym = n.Sym
n.Typecheck = 1
- typecheck(&n.Param.Ntype, Etype)
- t := n.Param.Ntype.Type
+ typecheck(&n.Name.Param.Ntype, Etype)
+ t := n.Name.Param.Ntype.Type
if t == nil {
n.Diag = 1
n.Type = nil
@@ -3757,18 +3719,18 @@
break
case OLITERAL:
- if n.Param.Ntype != nil {
- typecheck(&n.Param.Ntype, Etype)
- n.Type = n.Param.Ntype.Type
- n.Param.Ntype = nil
+ if n.Name.Param.Ntype != nil {
+ typecheck(&n.Name.Param.Ntype, Etype)
+ n.Type = n.Name.Param.Ntype.Type
+ n.Name.Param.Ntype = nil
if n.Type == nil {
n.Diag = 1
goto ret
}
}
- e := n.Defn
- n.Defn = nil
+ e := n.Name.Defn
+ n.Name.Defn = nil
if e == nil {
lineno = n.Lineno
Dump("typecheckdef nil defn", n)
@@ -3805,14 +3767,13 @@
Convlit(&e, t)
}
- n.Val = e.Val
+ n.SetVal(e.Val())
n.Type = e.Type
case ONAME:
- if n.Param.Ntype != nil {
- typecheck(&n.Param.Ntype, Etype)
- n.Type = n.Param.Ntype.Type
-
+ if n.Name.Param.Ntype != nil {
+ typecheck(&n.Name.Param.Ntype, Etype)
+ n.Type = n.Name.Param.Ntype.Type
if n.Type == nil {
n.Diag = 1
goto ret
@@ -3822,7 +3783,7 @@
if n.Type != nil {
break
}
- if n.Defn == nil {
+ if n.Name.Defn == nil {
if n.Etype != 0 { // like OPRINTN
break
}
@@ -3837,13 +3798,13 @@
Fatal("var without type, init: %v", n.Sym)
}
- if n.Defn.Op == ONAME {
- typecheck(&n.Defn, Erv)
- n.Type = n.Defn.Type
+ if n.Name.Defn.Op == ONAME {
+ typecheck(&n.Name.Defn, Erv)
+ n.Type = n.Name.Defn.Type
break
}
- typecheck(&n.Defn, Etop) // fills in n->type
+ typecheck(&n.Name.Defn, Etop) // fills in n->type
case OTYPE:
if Curfn != nil {
@@ -3886,15 +3847,15 @@
func checkmake(t *Type, arg string, n *Node) int {
if n.Op == OLITERAL {
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
case CTINT, CTRUNE, CTFLT, CTCPLX:
- n.Val = toint(n.Val)
- if mpcmpfixc(n.Val.U.(*Mpint), 0) < 0 {
+ n.SetVal(toint(n.Val()))
+ if mpcmpfixc(n.Val().U.(*Mpint), 0) < 0 {
Yyerror("negative %s argument in make(%v)", arg, t)
return -1
}
- if Mpcmpfixfix(n.Val.U.(*Mpint), Maxintval[TINT]) > 0 {
+ if Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
Yyerror("%s argument too large in make(%v)", arg, t)
return -1
}
@@ -3952,11 +3913,8 @@
markbreak(n.Left, implicit)
markbreak(n.Right, implicit)
- markbreak(n.Ntest, implicit)
- markbreak(n.Nincr, implicit)
markbreaklist(n.Ninit, implicit)
markbreaklist(n.Nbody, implicit)
- markbreaklist(n.Nelse, implicit)
markbreaklist(n.List, implicit)
markbreaklist(n.Rlist, implicit)
}
@@ -3968,17 +3926,17 @@
for ; l != nil; l = l.Next {
n = l.N
- if n.Op == OLABEL && l.Next != nil && n.Defn == l.Next.N {
- switch n.Defn.Op {
+ if n.Op == OLABEL && l.Next != nil && n.Name.Defn == l.Next.N {
+ switch n.Name.Defn.Op {
case OFOR,
OSWITCH,
OTYPESW,
OSELECT,
ORANGE:
lab = new(Label)
- lab.Def = n.Defn
+ lab.Def = n.Name.Defn
n.Left.Sym.Label = lab
- markbreak(n.Defn, n.Defn)
+ markbreak(n.Name.Defn, n.Name.Defn)
n.Left.Sym.Label = nil
l = l.Next
continue
@@ -4026,7 +3984,7 @@
return true
case OFOR:
- if n.Ntest != nil {
+ if n.Left != nil {
return false
}
if n.Hasbreak {
@@ -4035,7 +3993,7 @@
return true
case OIF:
- return isterminating(n.Nbody, 0) && isterminating(n.Nelse, 0)
+ return isterminating(n.Nbody, 0) && isterminating(n.Rlist, 0)
case OSWITCH, OTYPESW, OSELECT:
if n.Hasbreak {
diff --git a/src/cmd/compile/internal/gc/unsafe.go b/src/cmd/compile/internal/gc/unsafe.go
index 824ecd0..a01765b 100644
--- a/src/cmd/compile/internal/gc/unsafe.go
+++ b/src/cmd/compile/internal/gc/unsafe.go
@@ -138,13 +138,11 @@
// any side effects disappear; ignore init
ret:
var val Val
- val.Ctype = CTINT
-
val.U = new(Mpint)
Mpmovecfix(val.U.(*Mpint), v)
n := Nod(OLITERAL, nil, nil)
n.Orig = nn
- n.Val = val
+ n.SetVal(val)
n.Type = Types[TUINTPTR]
nn.Type = Types[TUINTPTR]
return n
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index d5eb44c..c0fbc75 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -21,7 +21,7 @@
Curfn = fn
if Debug['W'] != 0 {
- s := fmt.Sprintf("\nbefore %v", Curfn.Nname.Sym)
+ s := fmt.Sprintf("\nbefore %v", Curfn.Func.Nname.Sym)
dumplist(s, Curfn.Nbody)
}
@@ -37,8 +37,8 @@
// Propagate the used flag for typeswitch variables up to the NONAME in it's definition.
for l := fn.Func.Dcl; l != nil; l = l.Next {
- if l.N.Op == ONAME && l.N.Class&^PHEAP == PAUTO && l.N.Defn != nil && l.N.Defn.Op == OTYPESW && l.N.Used {
- l.N.Defn.Left.Used = true
+ if l.N.Op == ONAME && l.N.Class&^PHEAP == PAUTO && l.N.Name.Defn != nil && l.N.Name.Defn.Op == OTYPESW && l.N.Used {
+ l.N.Name.Defn.Left.Used = true
}
}
@@ -46,13 +46,13 @@
if l.N.Op != ONAME || l.N.Class&^PHEAP != PAUTO || l.N.Sym.Name[0] == '&' || l.N.Used {
continue
}
- if l.N.Defn != nil && l.N.Defn.Op == OTYPESW {
- if l.N.Defn.Left.Used {
+ if defn := l.N.Name.Defn; defn != nil && defn.Op == OTYPESW {
+ if defn.Left.Used {
continue
}
- lineno = l.N.Defn.Left.Lineno
+ lineno = defn.Left.Lineno
Yyerror("%v declared and not used", l.N.Sym)
- l.N.Defn.Left.Used = true // suppress repeats
+ defn.Left.Used = true // suppress repeats
} else {
lineno = l.N.Lineno
Yyerror("%v declared and not used", l.N.Sym)
@@ -65,13 +65,13 @@
}
walkstmtlist(Curfn.Nbody)
if Debug['W'] != 0 {
- s := fmt.Sprintf("after walk %v", Curfn.Nname.Sym)
+ s := fmt.Sprintf("after walk %v", Curfn.Func.Nname.Sym)
dumplist(s, Curfn.Nbody)
}
heapmoves()
if Debug['W'] != 0 && Curfn.Func.Enter != nil {
- s := fmt.Sprintf("enter %v", Curfn.Nname.Sym)
+ s := fmt.Sprintf("enter %v", Curfn.Func.Nname.Sym)
dumplist(s, Curfn.Func.Enter)
}
}
@@ -247,21 +247,21 @@
adjustargs(n, 2*Widthptr)
case OFOR:
- if n.Ntest != nil {
- walkstmtlist(n.Ntest.Ninit)
- init := n.Ntest.Ninit
- n.Ntest.Ninit = nil
- walkexpr(&n.Ntest, &init)
- addinit(&n.Ntest, init)
+ if n.Left != nil {
+ walkstmtlist(n.Left.Ninit)
+ init := n.Left.Ninit
+ n.Left.Ninit = nil
+ walkexpr(&n.Left, &init)
+ addinit(&n.Left, init)
}
- walkstmt(&n.Nincr)
+ walkstmt(&n.Right)
walkstmtlist(n.Nbody)
case OIF:
- walkexpr(&n.Ntest, &n.Ninit)
+ walkexpr(&n.Left, &n.Ninit)
walkstmtlist(n.Nbody)
- walkstmtlist(n.Nelse)
+ walkstmtlist(n.Rlist)
case OPROC:
switch n.Left.Op {
@@ -363,7 +363,7 @@
}
t := n.Type
- return Smallintconst(l) && Smallintconst(r) && (t.Type.Width == 0 || Mpgetfix(r.Val.U.(*Mpint)) < (1<<16)/t.Type.Width)
+ return Smallintconst(l) && Smallintconst(r) && (t.Type.Width == 0 || Mpgetfix(r.Val().U.(*Mpint)) < (1<<16)/t.Type.Width)
}
/*
@@ -615,7 +615,7 @@
n.Left.Func.Enter = nil
// Replace OCLOSURE with ONAME/PFUNC.
- n.Left = n.Left.Param.Closure.Nname
+ n.Left = n.Left.Func.Closure.Func.Nname
// Update type of OCALLFUNC node.
// Output arguments had not changed, but their offsets could.
@@ -1043,7 +1043,7 @@
walkexpr(&n1, init)
n2 := Nod(OIF, nil, nil)
- n2.Ntest = Nod(OEQ, l, nodnil())
+ n2.Left = Nod(OEQ, l, nodnil())
n2.Nbody = list1(Nod(OAS, l, n1))
n2.Likely = -1
typecheck(&n2, Etop)
@@ -1220,7 +1220,7 @@
Yyerror("index out of bounds")
}
} else if Isconst(n.Left, CTSTR) {
- n.Bounded = bounded(r, int64(len(n.Left.Val.U.(string))))
+ n.Bounded = bounded(r, int64(len(n.Left.Val().U.(string))))
if Debug['m'] != 0 && n.Bounded && !Isconst(n.Right, CTINT) {
Warn("index bounds check elided")
}
@@ -1231,16 +1231,16 @@
// replace "abc"[1] with 'b'.
// delayed until now because "abc"[1] is not
// an ideal constant.
- v := Mpgetfix(n.Right.Val.U.(*Mpint))
+ v := Mpgetfix(n.Right.Val().U.(*Mpint))
- Nodconst(n, n.Type, int64(n.Left.Val.U.(string)[v]))
+ Nodconst(n, n.Type, int64(n.Left.Val().U.(string)[v]))
n.Typecheck = 1
}
}
}
if Isconst(n.Right, CTINT) {
- if Mpcmpfixfix(n.Right.Val.U.(*Mpint), &mpzero) < 0 || Mpcmpfixfix(n.Right.Val.U.(*Mpint), Maxintval[TINT]) > 0 {
+ if Mpcmpfixfix(n.Right.Val().U.(*Mpint), &mpzero) < 0 || Mpcmpfixfix(n.Right.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
Yyerror("index out of bounds")
}
}
@@ -1336,7 +1336,7 @@
case ONEW:
if n.Esc == EscNone {
if n.Type.Type.Width >= 1<<16 {
- Fatal("Large ONEW with EscNone, %v", n)
+ Fatal("large ONEW with EscNone: %v", n)
}
r := temp(n.Type.Type)
r = Nod(OAS, r, nil) // zero temp
@@ -1355,7 +1355,7 @@
// comparing the lengths instead will yield the same result
// without the function call.
case OCMPSTR:
- if (Isconst(n.Left, CTSTR) && len(n.Left.Val.U.(string)) == 0) || (Isconst(n.Right, CTSTR) && len(n.Right.Val.U.(string)) == 0) {
+ if (Isconst(n.Left, CTSTR) && len(n.Left.Val().U.(string)) == 0) || (Isconst(n.Right, CTSTR) && len(n.Right.Val().U.(string)) == 0) {
r := Nod(int(n.Etype), Nod(OLEN, n.Left, nil), Nod(OLEN, n.Right, nil))
typecheck(&r, Erv)
walkexpr(&r, init)
@@ -1477,7 +1477,7 @@
t := n.Type
if n.Esc == EscNone {
if !isSmallMakeSlice(n) {
- Fatal("Non-small OMAKESLICE with EscNone, %v", n)
+ Fatal("non-small OMAKESLICE with EscNone: %v", n)
}
// var arr [r]T
// n = arr[:l]
@@ -1719,7 +1719,7 @@
// cannot happen: caller checked that lists had same length
if ll != nil || lr != nil {
- Yyerror("error in shape across %v %v %v / %d %d [%s]", Hconv(nl, obj.FmtSign), Oconv(int(op), 0), Hconv(nr, obj.FmtSign), count(nl), count(nr), Curfn.Nname.Sym.Name)
+ Yyerror("error in shape across %v %v %v / %d %d [%s]", Hconv(nl, obj.FmtSign), Oconv(int(op), 0), Hconv(nr, obj.FmtSign), count(nl), count(nr), Curfn.Func.Nname.Sym.Name)
}
return nn
}
@@ -1824,8 +1824,8 @@
n.Type = tslice
} else {
n = Nod(OCOMPLIT, nil, typenod(tslice))
- if ddd != nil {
- n.Alloc = ddd.Alloc // temporary to use
+ if ddd != nil && prealloc[ddd] != nil {
+ prealloc[n] = prealloc[ddd] // temporary to use
}
n.List = lr0
n.Esc = esc
@@ -2027,7 +2027,7 @@
n = l.N
if n.Op == OLITERAL {
- switch n.Val.Ctype {
+ switch n.Val().Ctype() {
case CTRUNE:
defaultlit(&n, runetype)
@@ -2133,7 +2133,7 @@
// If n is *autotmp and autotmp = &foo, replace n with foo.
// We introduce such temps when initializing struct literals.
if n.Op == OIND && n.Left.Op == ONAME && strings.HasPrefix(n.Left.Sym.Name, "autotmp_") {
- defn := n.Left.Defn
+ defn := n.Left.Name.Defn
if defn != nil && defn.Op == OAS && defn.Right.Op == OADDR {
n = defn.Right.Left
}
@@ -2682,13 +2682,13 @@
if compiling_runtime != 0 {
Yyerror("%v escapes to heap, not allowed in runtime.", v)
}
- if v.Alloc == nil {
- v.Alloc = callnew(v.Type)
+ if prealloc[v] == nil {
+ prealloc[v] = callnew(v.Type)
}
- nn = list(nn, Nod(OAS, v.Name.Heapaddr, v.Alloc))
+ nn = list(nn, Nod(OAS, v.Name.Heapaddr, prealloc[v]))
if v.Class&^PHEAP != PPARAMOUT {
- as = Nod(OAS, v, v.Param.Stackparam)
- v.Param.Stackparam.Typecheck = 1
+ as = Nod(OAS, v, v.Name.Param.Stackparam)
+ v.Name.Param.Stackparam.Typecheck = 1
typecheck(&as, Etop)
as = applywritebarrier(as, &nn)
nn = list(nn, as)
@@ -2711,7 +2711,7 @@
if v == nil || v.Class != PHEAP|PPARAMOUT {
continue
}
- nn = list(nn, Nod(OAS, v.Param.Stackparam, v))
+ nn = list(nn, Nod(OAS, v.Name.Param.Stackparam, v))
}
return nn
@@ -2828,7 +2828,7 @@
sz := int64(0)
for l := n.List; l != nil; l = l.Next {
if n.Op == OLITERAL {
- sz += int64(len(n.Val.U.(string)))
+ sz += int64(len(n.Val().U.(string)))
}
}
@@ -2861,7 +2861,9 @@
t.Type = Types[TSTRING]
t.Bound = -1
slice := Nod(OCOMPLIT, nil, typenod(t))
- slice.Alloc = n.Alloc
+ if prealloc[n] != nil {
+ prealloc[slice] = prealloc[n]
+ }
slice.List = args.Next // skip buf arg
args = list1(buf)
args = list(args, slice)
@@ -2914,7 +2916,7 @@
// n := len(s) + len(l2) - cap(s)
nif.Ninit = list1(Nod(OAS, nt, Nod(OSUB, Nod(OADD, Nod(OLEN, s, nil), Nod(OLEN, l2, nil)), Nod(OCAP, s, nil))))
- nif.Ntest = Nod(OGT, nt, Nodintconst(0))
+ nif.Left = Nod(OGT, nt, Nodintconst(0))
// instantiate growslice(Type*, []any, int) []any
fn := syslook("growslice", 1) // growslice(<type>, old []T, n int64) (ret []T)
@@ -3046,7 +3048,7 @@
na := Nodintconst(int64(argc)) // const argc
nx := Nod(OIF, nil, nil) // if cap(s) - len(s) < argc
- nx.Ntest = Nod(OLT, Nod(OSUB, Nod(OCAP, ns, nil), Nod(OLEN, ns, nil)), na)
+ nx.Left = Nod(OLT, Nod(OSUB, Nod(OCAP, ns, nil), Nod(OLEN, ns, nil)), na)
fn := syslook("growslice", 1) // growslice(<type>, old []T, n int) (ret []T)
substArgTypes(fn, ns.Type.Type, ns.Type.Type)
@@ -3124,7 +3126,7 @@
// if n > len(frm) { n = len(frm) }
nif := Nod(OIF, nil, nil)
- nif.Ntest = Nod(OGT, nlen, Nod(OLEN, nr, nil))
+ nif.Left = Nod(OGT, nlen, Nod(OLEN, nr, nil))
nif.Nbody = list(nif.Nbody, Nod(OAS, nlen, Nod(OLEN, nr, nil)))
l = list(l, nif)
@@ -3381,7 +3383,7 @@
case OINDEX:
ar = a.Right
br = b.Right
- if !Isconst(ar, CTINT) || !Isconst(br, CTINT) || Mpcmpfixfix(ar.Val.U.(*Mpint), br.Val.U.(*Mpint)) != 0 {
+ if !Isconst(ar, CTINT) || !Isconst(br, CTINT) || Mpcmpfixfix(ar.Val().U.(*Mpint), br.Val().U.(*Mpint)) != 0 {
return false
}
}
@@ -3417,9 +3419,9 @@
w := int(l.Type.Width * 8)
if Smallintconst(l.Right) && Smallintconst(r.Right) {
- sl := int(Mpgetfix(l.Right.Val.U.(*Mpint)))
+ sl := int(Mpgetfix(l.Right.Val().U.(*Mpint)))
if sl >= 0 {
- sr := int(Mpgetfix(r.Right.Val.U.(*Mpint)))
+ sr := int(Mpgetfix(r.Right.Val().U.(*Mpint)))
if sr >= 0 && sl+sr == w {
// Rewrite left shift half to left rotate.
if l.Op == OLSH {
@@ -3430,7 +3432,7 @@
n.Op = OLROT
// Remove rotate 0 and rotate w.
- s := int(Mpgetfix(n.Right.Val.U.(*Mpint)))
+ s := int(Mpgetfix(n.Right.Val().U.(*Mpint)))
if s == 0 || s == w {
n = n.Left
@@ -3473,7 +3475,7 @@
// x*0 is 0 (and side effects of x).
var pow int
var w int
- if Mpgetfix(nr.Val.U.(*Mpint)) == 0 {
+ if Mpgetfix(nr.Val().U.(*Mpint)) == 0 {
cheapexpr(nl, init)
Nodconst(n, n.Type, 0)
goto ret
@@ -3566,10 +3568,10 @@
m.W = w
if Issigned[nl.Type.Etype] {
- m.Sd = Mpgetfix(nr.Val.U.(*Mpint))
+ m.Sd = Mpgetfix(nr.Val().U.(*Mpint))
Smagic(&m)
} else {
- m.Ud = uint64(Mpgetfix(nr.Val.U.(*Mpint)))
+ m.Ud = uint64(Mpgetfix(nr.Val().U.(*Mpint)))
Umagic(&m)
}
@@ -3763,7 +3765,7 @@
// n = nl & (nr-1)
n.Op = OAND
- Nodconst(nc, nl.Type, Mpgetfix(nr.Val.U.(*Mpint))-1)
+ Nodconst(nc, nl.Type, Mpgetfix(nr.Val().U.(*Mpint))-1)
} else {
// n = nl >> pow
n.Op = ORSH
@@ -3793,7 +3795,7 @@
bits := int32(8 * n.Type.Width)
if Smallintconst(n) {
- v := Mpgetfix(n.Val.U.(*Mpint))
+ v := Mpgetfix(n.Val().U.(*Mpint))
return 0 <= v && v < max
}
@@ -3801,9 +3803,9 @@
case OAND:
v := int64(-1)
if Smallintconst(n.Left) {
- v = Mpgetfix(n.Left.Val.U.(*Mpint))
+ v = Mpgetfix(n.Left.Val().U.(*Mpint))
} else if Smallintconst(n.Right) {
- v = Mpgetfix(n.Right.Val.U.(*Mpint))
+ v = Mpgetfix(n.Right.Val().U.(*Mpint))
}
if 0 <= v && v < max {
@@ -3812,7 +3814,7 @@
case OMOD:
if !sign && Smallintconst(n.Right) {
- v := Mpgetfix(n.Right.Val.U.(*Mpint))
+ v := Mpgetfix(n.Right.Val().U.(*Mpint))
if 0 <= v && v <= max {
return true
}
@@ -3820,7 +3822,7 @@
case ODIV:
if !sign && Smallintconst(n.Right) {
- v := Mpgetfix(n.Right.Val.U.(*Mpint))
+ v := Mpgetfix(n.Right.Val().U.(*Mpint))
for bits > 0 && v >= 2 {
bits--
v >>= 1
@@ -3829,7 +3831,7 @@
case ORSH:
if !sign && Smallintconst(n.Right) {
- v := Mpgetfix(n.Right.Val.U.(*Mpint))
+ v := Mpgetfix(n.Right.Val().U.(*Mpint))
if v > int64(bits) {
return true
}
@@ -3857,7 +3859,11 @@
break
}
- field := n.Paramfld
+ t := n.Left.Type
+ if Isptr[t.Etype] {
+ t = t.Type
+ }
+ field := dotField[typeSym{t, n.Right.Sym}]
if field == nil {
Fatal("usefield %v %v without paramfld", n.Left.Type, n.Right.Sym)
}
@@ -3881,10 +3887,7 @@
Yyerror("tracked field must be exported (upper case)")
}
- l := typ(0)
- l.Type = field
- l.Down = Curfn.Paramfld
- Curfn.Paramfld = l
+ Curfn.Func.Fieldtrack = append(Curfn.Func.Fieldtrack, field)
}
func candiscardlist(l *NodeList) bool {
@@ -3962,17 +3965,17 @@
// Discardable as long as we know it's not division by zero.
case ODIV, OMOD:
- if Isconst(n.Right, CTINT) && mpcmpfixc(n.Right.Val.U.(*Mpint), 0) != 0 {
+ if Isconst(n.Right, CTINT) && mpcmpfixc(n.Right.Val().U.(*Mpint), 0) != 0 {
break
}
- if Isconst(n.Right, CTFLT) && mpcmpfltc(n.Right.Val.U.(*Mpflt), 0) != 0 {
+ if Isconst(n.Right, CTFLT) && mpcmpfltc(n.Right.Val().U.(*Mpflt), 0) != 0 {
break
}
return false
// Discardable as long as we know it won't fail because of a bad size.
case OMAKECHAN, OMAKEMAP:
- if Isconst(n.Left, CTINT) && mpcmpfixc(n.Left.Val.U.(*Mpint), 0) == 0 {
+ if Isconst(n.Left, CTINT) && mpcmpfixc(n.Left.Val().U.(*Mpint), 0) == 0 {
break
}
return false
@@ -3982,7 +3985,7 @@
return false
}
- if !candiscard(n.Left) || !candiscard(n.Right) || !candiscard(n.Ntest) || !candiscard(n.Nincr) || !candiscardlist(n.Ninit) || !candiscardlist(n.Nbody) || !candiscardlist(n.Nelse) || !candiscardlist(n.List) || !candiscardlist(n.Rlist) {
+ if !candiscard(n.Left) || !candiscard(n.Right) || !candiscardlist(n.Ninit) || !candiscardlist(n.Nbody) || !candiscardlist(n.List) || !candiscardlist(n.Rlist) {
return false
}
@@ -4024,10 +4027,10 @@
fn := Nod(ODCLFUNC, nil, nil)
walkprintfunc_prgen++
buf = fmt.Sprintf("print·%d", walkprintfunc_prgen)
- fn.Nname = newname(Lookup(buf))
- fn.Nname.Defn = fn
- fn.Nname.Param.Ntype = t
- declare(fn.Nname, PFUNC)
+ fn.Func.Nname = newname(Lookup(buf))
+ fn.Func.Nname.Name.Defn = fn
+ fn.Func.Nname.Name.Param.Ntype = t
+ declare(fn.Func.Nname, PFUNC)
oldfn := Curfn
Curfn = nil
@@ -4048,7 +4051,7 @@
Curfn = oldfn
a = Nod(OCALL, nil, nil)
- a.Left = fn.Nname
+ a.Left = fn.Func.Nname
a.List = n.List
typecheck(&a, Etop)
walkexpr(&a, init)
diff --git a/src/cmd/compile/internal/gc/y.go b/src/cmd/compile/internal/gc/y.go
index 56b9d04..7201074 100644
--- a/src/cmd/compile/internal/gc/y.go
+++ b/src/cmd/compile/internal/gc/y.go
@@ -229,57 +229,63 @@
63, 236,
69, 236,
-2, 157,
- -1, 407,
+ -1, 403,
+ 67, 144,
+ -2, 142,
+ -1, 408,
36, 176,
60, 176,
68, 176,
-2, 167,
- -1, 408,
+ -1, 409,
36, 177,
60, 177,
68, 177,
-2, 168,
- -1, 409,
+ -1, 410,
36, 178,
60, 178,
68, 178,
-2, 169,
- -1, 410,
+ -1, 411,
36, 179,
60, 179,
68, 179,
-2, 170,
- -1, 416,
+ -1, 417,
8, 251,
13, 251,
63, 251,
69, 251,
-2, 0,
- -1, 417,
+ -1, 418,
63, 251,
69, 251,
-2, 0,
- -1, 497,
+ -1, 498,
63, 251,
69, 251,
-2, 0,
- -1, 552,
+ -1, 553,
60, 157,
-2, 318,
- -1, 553,
+ -1, 554,
60, 158,
-2, 317,
- -1, 578,
+ -1, 579,
8, 251,
13, 251,
63, 251,
69, 251,
-2, 0,
- -1, 592,
+ -1, 593,
36, 180,
60, 180,
68, 180,
-2, 171,
+ -1, 632,
+ 67, 145,
+ -2, 143,
}
const yyNprod = 352
@@ -288,327 +294,331 @@
var yyTokenNames []string
var yyStates []string
-const yyLast = 2282
+const yyLast = 2321
var yyAct = [...]int{
- 74, 381, 304, 285, 291, 486, 610, 398, 545, 478,
- 549, 296, 186, 75, 400, 229, 302, 401, 103, 389,
- 458, 356, 290, 318, 457, 34, 303, 338, 230, 245,
- 466, 109, 339, 101, 337, 332, 85, 104, 374, 248,
- 246, 174, 467, 286, 14, 324, 479, 328, 241, 212,
- 108, 6, 325, 155, 243, 469, 226, 181, 468, 516,
- 413, 320, 373, 392, 325, 219, 13, 208, 176, 10,
- 11, 584, 172, 469, 651, 385, 599, 583, 106, 191,
- 13, 177, 460, 541, 422, 160, 310, 331, 613, 161,
- 309, 446, 192, 322, 193, 626, 327, 162, 198, 321,
- 88, 12, 13, 10, 227, 238, 662, 194, 317, 227,
- 632, 448, 227, 12, 13, 227, 209, 228, 12, 13,
- 447, 10, 228, 203, 175, 228, 108, 393, 228, 461,
- 54, 660, 205, 445, 184, 384, 222, 460, 459, 204,
- 199, 200, 239, 88, 506, 155, 214, 216, 218, 507,
- 427, 631, 12, 13, 233, 625, 624, 202, 10, 88,
- 90, 176, 55, 288, 10, 627, 213, 213, 213, 213,
- 12, 13, 118, 118, 177, 295, 126, 154, 308, 176,
- 10, 416, 282, 282, 461, 282, 603, 620, 416, 10,
- 600, 227, 177, 301, 593, 416, 227, 227, 404, 227,
- 280, 484, 444, 90, 228, 622, 536, 12, 13, 228,
- 228, 506, 228, 12, 13, 86, 507, 175, 527, 90,
- 298, 163, 164, 165, 166, 167, 168, 169, 170, 12,
- 13, 523, 227, 580, 515, 175, 182, 153, 12, 13,
- 242, 171, 325, 397, 416, 228, 330, 155, 227, 334,
- 415, 227, 227, 116, 227, 185, 358, 367, 463, 371,
- 360, 228, 355, 362, 228, 228, 353, 228, 183, 365,
- 210, 322, 504, 369, 434, 314, 68, 321, 91, 379,
- 614, 78, 416, 340, 609, 340, 340, 376, 375, 182,
- 124, 12, 13, 604, 176, 83, 79, 10, 394, 325,
- 407, 336, 82, 351, 352, 10, 378, 177, 380, 414,
- 227, 227, 601, 408, 574, 409, 608, 10, 568, 558,
- 227, 183, 48, 228, 228, 465, 10, 464, 410, 391,
- 323, 329, 67, 228, 331, 348, 443, 656, 442, 412,
- 293, 163, 170, 605, 77, 436, 12, 13, 12, 13,
- 175, 424, 423, 234, 12, 13, 388, 383, 370, 366,
- 359, 114, 435, 333, 655, 227, 12, 13, 100, 129,
- 441, 99, 10, 490, 227, 12, 13, 439, 228, 84,
- 454, 20, 453, 429, 432, 480, 491, 228, 492, 654,
- 173, 10, 508, 473, 176, 10, 653, 645, 511, 619,
- 188, 493, 483, 494, 616, 607, 227, 177, 221, 282,
- 514, 606, 227, 597, 282, 519, 520, 340, 340, 228,
- 596, 12, 13, 227, 595, 228, 110, 498, 340, 489,
- 107, 510, 502, 592, 525, 449, 228, 582, 517, 227,
- 12, 13, 562, 524, 12, 13, 470, 539, 528, 531,
- 175, 522, 228, 254, 513, 512, 255, 256, 257, 258,
- 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 129, 129, 277, 554,
- 559, 227, 330, 173, 537, 294, 509, 557, 561, 227,
- 69, 564, 532, 538, 228, 534, 490, 490, 496, 495,
- 482, 572, 228, 300, 476, 475, 472, 176, 440, 491,
- 491, 492, 492, 567, 573, 340, 10, 340, 420, 553,
- 177, 577, 372, 340, 493, 493, 340, 590, 591, 579,
- 297, 585, 570, 540, 586, 542, 456, 551, 431, 438,
- 249, 555, 340, 571, 556, 354, 253, 129, 251, 180,
- 431, 102, 489, 489, 382, 323, 501, 530, 287, 129,
- 566, 117, 7, 175, 70, 12, 13, 329, 5, 197,
- 431, 227, 211, 433, 24, 16, 529, 19, 617, 430,
- 650, 455, 364, 533, 228, 428, 560, 480, 305, 335,
- 207, 206, 21, 93, 197, 623, 252, 629, 490, 197,
- 282, 630, 197, 635, 120, 197, 26, 386, 121, 125,
- 637, 491, 340, 492, 641, 639, 173, 340, 621, 402,
- 57, 565, 306, 76, 402, 618, 493, 158, 176, 642,
- 598, 387, 511, 340, 157, 602, 640, 665, 652, 581,
- 28, 177, 390, 643, 223, 644, 490, 159, 156, 235,
- 96, 657, 240, 661, 489, 497, 578, 417, 98, 491,
- 663, 492, 94, 664, 122, 122, 31, 22, 667, 666,
- 340, 15, 97, 95, 493, 553, 23, 201, 340, 49,
- 18, 197, 594, 129, 175, 3, 197, 197, 636, 197,
- 129, 282, 8, 551, 4, 2, 1, 450, 215, 543,
- 544, 547, 489, 548, 611, 92, 487, 129, 129, 189,
- 80, 81, 437, 72, 71, 237, 173, 615, 477, 316,
- 188, 220, 197, 326, 340, 244, 128, 340, 648, 628,
- 649, 311, 127, 17, 399, 319, 312, 313, 197, 315,
- 25, 197, 197, 27, 197, 36, 633, 634, 78, 37,
- 281, 66, 111, 638, 39, 38, 35, 124, 279, 278,
- 73, 217, 83, 79, 10, 113, 587, 149, 503, 82,
- 505, 87, 363, 0, 123, 0, 232, 150, 0, 0,
- 9, 151, 141, 142, 143, 144, 145, 146, 147, 148,
- 197, 377, 56, 196, 89, 0, 0, 0, 0, 231,
- 197, 197, 0, 0, 0, 105, 105, 112, 115, 0,
- 197, 77, 0, 12, 13, 426, 119, 119, 0, 0,
- 119, 0, 575, 576, 0, 0, 0, 0, 0, 173,
- 0, 0, 0, 275, 276, 0, 283, 0, 0, 402,
- 406, 588, 402, 402, 0, 0, 0, 0, 0, 0,
- 418, 419, 0, 0, 0, 197, 0, 0, 78, 0,
- 425, 89, 0, 197, 197, 0, 0, 124, 0, 0,
- 0, 0, 83, 79, 10, 0, 0, 105, 149, 82,
- 0, 0, 105, 0, 0, 112, 232, 0, 150, 247,
- 0, 0, 151, 0, 0, 0, 197, 145, 146, 147,
- 148, 0, 197, 196, 361, 406, 0, 188, 0, 231,
- 0, 0, 0, 197, 0, 236, 368, 78, 0, 0,
- 250, 77, 0, 12, 13, 225, 124, 0, 0, 197,
- 0, 83, 79, 10, 0, 0, 292, 0, 82, 0,
- 0, 0, 0, 0, 0, 232, 311, 0, 646, 647,
- 173, 0, 521, 402, 0, 0, 0, 0, 0, 56,
- 0, 0, 196, 526, 0, 0, 0, 0, 231, 0,
- 0, 197, 0, 0, 119, 119, 0, 0, 0, 197,
- 77, 0, 12, 13, 0, 0, 197, 197, 0, 0,
- 0, 0, 134, 149, 357, 152, 0, 135, 139, 140,
- 105, 0, 138, 150, 137, 136, 133, 151, 141, 142,
- 143, 144, 145, 146, 147, 148, 0, 56, 0, 0,
- 0, 569, 0, 0, 0, 0, 247, 56, 247, 0,
- 68, 0, 0, 0, 413, 78, 0, 0, 0, 78,
- 474, 0, 0, 0, 124, 0, 0, 481, 124, 83,
- 79, 10, 0, 83, 79, 10, 82, 0, 0, 0,
- 82, 197, 0, 65, 275, 276, 0, 232, 0, 0,
- 0, 0, 0, 0, 0, 0, 60, 61, 0, 64,
- 58, 0, 0, 59, 196, 0, 67, 0, 197, 421,
- 488, 0, 0, 0, 403, 0, 62, 63, 77, 0,
- 12, 13, 77, 0, 12, 13, 0, 68, 89, 0,
- 0, 0, 78, 0, 0, 0, 0, 0, 0, 0,
- 0, 124, 0, 347, 0, 462, 83, 79, 10, 357,
- 0, 0, 349, 82, 105, 0, 197, 345, 343, 341,
- 65, 105, 0, 0, 344, 112, 0, 485, 247, 0,
- 0, 348, 0, 60, 61, 0, 64, 58, 0, 0,
- 59, 0, 0, 67, 0, 0, 0, 78, 346, 0,
- 0, 589, 0, 62, 63, 77, 124, 12, 13, 0,
- 350, 83, 79, 10, 0, 0, 342, 0, 82, 13,
- 0, 56, 56, 0, 0, 232, 0, 0, 0, 119,
- 0, 119, 0, 0, 0, 0, 0, 0, 0, 535,
- 0, 119, 196, 247, 0, 0, 0, 0, 231, 0,
- 0, 0, 546, 550, 0, 0, 0, 0, 0, 0,
- 77, 357, 12, 13, 462, 0, 0, 0, 462, 0,
- 0, 0, 0, 563, 357, 0, 0, 0, 0, 0,
- 0, 0, 307, 0, 68, 0, 0, 41, 0, 78,
- 47, 42, 0, 247, 44, 0, 40, 50, 124, 43,
- 45, 53, 56, 83, 79, 10, 0, 0, 46, 52,
- 82, 51, 32, 30, 0, 0, 0, 65, 0, 0,
+ 74, 304, 381, 291, 487, 611, 459, 285, 546, 229,
+ 398, 467, 34, 296, 75, 302, 402, 550, 290, 186,
+ 286, 479, 458, 356, 400, 401, 389, 338, 103, 318,
+ 328, 245, 303, 339, 324, 243, 337, 468, 101, 374,
+ 109, 104, 248, 85, 14, 246, 241, 174, 480, 212,
+ 6, 181, 325, 155, 470, 469, 325, 385, 332, 517,
+ 108, 627, 414, 373, 13, 208, 585, 11, 176, 461,
+ 470, 172, 584, 461, 652, 600, 230, 219, 392, 191,
+ 106, 322, 177, 542, 226, 322, 423, 321, 193, 88,
+ 10, 321, 13, 192, 10, 310, 317, 309, 154, 160,
+ 447, 12, 13, 161, 227, 12, 13, 446, 198, 227,
+ 10, 162, 227, 320, 209, 227, 462, 384, 228, 663,
+ 462, 626, 625, 228, 55, 460, 228, 155, 184, 228,
+ 203, 628, 205, 633, 199, 200, 108, 632, 204, 12,
+ 13, 222, 393, 12, 13, 86, 214, 216, 218, 90,
+ 604, 239, 175, 10, 449, 194, 233, 88, 153, 12,
+ 13, 176, 661, 213, 213, 213, 213, 288, 155, 282,
+ 282, 601, 282, 537, 417, 177, 445, 280, 10, 176,
+ 621, 528, 295, 163, 164, 165, 166, 167, 168, 169,
+ 170, 227, 417, 177, 417, 301, 227, 227, 594, 227,
+ 485, 88, 12, 13, 185, 228, 417, 524, 48, 308,
+ 228, 228, 416, 228, 202, 347, 516, 90, 472, 448,
+ 405, 428, 10, 242, 349, 171, 298, 12, 13, 345,
+ 343, 341, 227, 581, 507, 330, 344, 507, 182, 508,
+ 519, 397, 508, 348, 116, 175, 228, 367, 227, 334,
+ 464, 227, 227, 360, 227, 129, 325, 355, 371, 210,
+ 346, 90, 228, 175, 353, 228, 228, 362, 228, 182,
+ 183, 12, 13, 54, 435, 314, 173, 10, 342, 358,
+ 340, 13, 340, 340, 91, 379, 188, 378, 325, 380,
+ 376, 331, 365, 375, 176, 623, 369, 394, 505, 417,
+ 408, 183, 610, 163, 170, 12, 13, 605, 177, 410,
+ 227, 227, 415, 238, 409, 118, 118, 602, 575, 126,
+ 227, 569, 559, 331, 228, 228, 12, 13, 466, 465,
+ 391, 444, 327, 443, 228, 437, 425, 12, 13, 254,
+ 413, 388, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 129, 129, 277, 227, 440, 383, 370, 173,
+ 366, 294, 359, 491, 227, 424, 411, 442, 175, 228,
+ 10, 455, 493, 333, 454, 436, 100, 492, 228, 300,
+ 99, 84, 10, 509, 176, 481, 282, 512, 474, 20,
+ 657, 282, 656, 655, 499, 495, 614, 227, 177, 503,
+ 654, 484, 10, 227, 340, 340, 234, 515, 520, 521,
+ 646, 228, 620, 617, 227, 340, 608, 228, 221, 12,
+ 13, 607, 511, 129, 526, 430, 433, 69, 228, 518,
+ 227, 12, 13, 598, 597, 129, 596, 293, 96, 494,
+ 525, 593, 583, 563, 228, 529, 98, 490, 540, 532,
+ 94, 12, 13, 523, 514, 513, 510, 560, 538, 558,
+ 97, 95, 330, 323, 329, 539, 497, 496, 175, 483,
+ 555, 477, 227, 476, 10, 473, 441, 562, 432, 421,
+ 227, 372, 297, 386, 565, 615, 228, 491, 491, 606,
+ 571, 573, 173, 92, 228, 403, 493, 493, 176, 10,
+ 403, 492, 492, 340, 574, 340, 197, 554, 10, 114,
+ 457, 340, 177, 434, 340, 572, 580, 439, 10, 578,
+ 354, 591, 592, 12, 13, 253, 588, 568, 251, 180,
+ 340, 197, 586, 587, 110, 533, 197, 609, 535, 197,
+ 432, 348, 197, 107, 117, 382, 70, 502, 12, 13,
+ 287, 7, 5, 102, 432, 211, 24, 12, 13, 129,
+ 16, 19, 227, 494, 494, 651, 129, 12, 13, 431,
+ 456, 490, 490, 364, 429, 561, 228, 335, 282, 207,
+ 206, 618, 175, 129, 129, 624, 622, 120, 481, 491,
+ 121, 125, 173, 636, 631, 630, 188, 619, 493, 21,
+ 340, 638, 305, 492, 642, 340, 643, 306, 641, 336,
+ 57, 351, 352, 640, 93, 644, 252, 645, 197, 176,
+ 26, 340, 512, 197, 197, 28, 197, 76, 158, 387,
+ 157, 666, 653, 177, 582, 390, 159, 491, 530, 156,
+ 498, 658, 579, 662, 418, 534, 493, 31, 22, 15,
+ 664, 492, 23, 665, 122, 122, 201, 18, 340, 197,
+ 668, 3, 123, 554, 667, 494, 340, 8, 9, 282,
+ 4, 2, 1, 490, 451, 197, 215, 544, 197, 197,
+ 56, 197, 89, 566, 545, 548, 549, 612, 488, 323,
+ 249, 531, 189, 105, 105, 112, 115, 80, 81, 576,
+ 577, 329, 438, 175, 119, 119, 173, 72, 119, 71,
+ 237, 478, 340, 494, 149, 340, 403, 316, 589, 403,
+ 403, 490, 220, 326, 150, 244, 649, 197, 151, 141,
+ 142, 143, 144, 145, 146, 147, 148, 197, 197, 629,
+ 650, 127, 17, 450, 595, 399, 319, 197, 25, 89,
+ 27, 36, 37, 78, 471, 281, 49, 66, 111, 39,
+ 38, 35, 124, 279, 278, 105, 149, 83, 79, 10,
+ 105, 73, 217, 112, 82, 113, 150, 247, 504, 616,
+ 151, 232, 506, 87, 188, 145, 146, 147, 148, 0,
+ 0, 0, 197, 0, 223, 0, 0, 0, 196, 235,
+ 197, 197, 240, 128, 231, 0, 0, 0, 634, 635,
+ 236, 0, 0, 0, 0, 639, 77, 0, 12, 13,
+ 225, 0, 0, 0, 292, 647, 648, 173, 0, 0,
+ 403, 0, 0, 0, 197, 0, 0, 0, 0, 0,
+ 197, 0, 541, 0, 543, 0, 552, 56, 0, 0,
+ 556, 197, 0, 557, 0, 0, 0, 347, 0, 0,
+ 0, 0, 119, 119, 0, 0, 349, 197, 0, 567,
+ 0, 345, 343, 341, 0, 0, 0, 0, 344, 0,
+ 0, 311, 357, 0, 0, 348, 312, 313, 105, 315,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 60, 61, 0, 64, 58, 0, 0, 59, 0, 0,
- 67, 0, 0, 0, 0, 0, 0, 0, 308, 0,
- 62, 63, 77, 0, 12, 13, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 29, 105, 68, 247, 0, 41, 0, 78,
- 47, 42, 0, 56, 44, 0, 40, 50, 33, 43,
- 45, 53, 0, 83, 79, 10, 0, 0, 46, 52,
- 82, 51, 32, 30, 0, 0, 546, 65, 0, 550,
- 357, 0, 0, 462, 0, 0, 0, 357, 0, 357,
- 60, 61, 0, 64, 58, 0, 0, 59, 0, 68,
- 67, 0, 0, 0, 78, 0, 0, 0, 0, 0,
- 62, 63, 77, 124, 12, 13, 0, 0, 83, 79,
- 10, 0, 500, 0, 0, 82, 0, 0, 0, 0,
- 0, 0, 65, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 60, 61, 0, 64, 58,
- 0, 0, 59, 0, 68, 67, 0, 0, 0, 78,
- 0, 0, 0, 0, 0, 62, 63, 77, 124, 12,
- 13, 0, 0, 83, 79, 10, 0, 499, 0, 0,
- 82, 0, 0, 0, 0, 0, 0, 65, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 60, 61, 0, 64, 58, 0, 0, 59, 0, 68,
- 67, 0, 0, 0, 78, 0, 0, 0, 299, 0,
- 62, 63, 77, 124, 12, 13, 0, 124, 83, 79,
- 10, 0, 83, 79, 10, 82, 0, 395, 0, 82,
- 0, 0, 179, 0, 0, 0, 232, 0, 0, 0,
- 0, 0, 68, 0, 0, 60, 61, 78, 64, 178,
- 0, 0, 59, 196, 0, 67, 124, 0, 0, 231,
- 0, 83, 79, 10, 0, 62, 63, 77, 82, 12,
- 13, 77, 0, 12, 13, 179, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 60, 61,
- 0, 64, 178, 0, 0, 59, 0, 68, 67, 289,
- 0, 0, 78, 0, 0, 0, 0, 0, 62, 63,
- 77, 124, 12, 13, 0, 0, 83, 79, 10, 0,
- 284, 0, 0, 82, 0, 0, 0, 0, 0, 0,
- 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68, 0, 0, 60, 61, 78, 64, 58, 187, 0,
- 59, 0, 0, 67, 124, 0, 0, 0, 0, 83,
- 79, 10, 0, 62, 63, 77, 82, 12, 13, 0,
+ 0, 0, 346, 0, 0, 56, 0, 0, 613, 197,
+ 275, 276, 0, 283, 247, 56, 247, 197, 0, 0,
+ 342, 0, 363, 13, 197, 197, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 599,
+ 0, 377, 134, 149, 603, 152, 0, 135, 139, 140,
+ 0, 0, 138, 150, 137, 136, 133, 151, 141, 142,
+ 143, 144, 145, 146, 147, 148, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 422, 0, 0,
+ 0, 361, 0, 0, 414, 0, 0, 0, 0, 0,
+ 407, 0, 0, 368, 0, 0, 89, 637, 0, 197,
+ 419, 420, 552, 0, 0, 0, 0, 0, 0, 347,
+ 426, 0, 0, 463, 0, 0, 0, 357, 349, 0,
+ 0, 0, 105, 345, 343, 341, 197, 0, 0, 105,
+ 344, 0, 0, 112, 0, 486, 247, 348, 0, 0,
+ 0, 0, 0, 0, 0, 0, 134, 149, 0, 152,
+ 0, 135, 139, 140, 346, 407, 138, 150, 137, 136,
+ 133, 151, 141, 142, 143, 144, 145, 146, 147, 148,
+ 0, 0, 342, 0, 197, 13, 0, 0, 0, 0,
+ 56, 56, 0, 0, 0, 396, 0, 0, 119, 0,
+ 119, 0, 0, 0, 0, 0, 0, 311, 536, 0,
+ 119, 0, 247, 522, 0, 0, 0, 0, 0, 0,
+ 0, 547, 551, 0, 527, 0, 0, 475, 0, 0,
+ 357, 0, 0, 463, 482, 0, 0, 463, 0, 0,
+ 0, 0, 564, 357, 0, 0, 0, 0, 0, 0,
+ 0, 275, 276, 0, 0, 0, 0, 0, 307, 0,
+ 68, 0, 247, 41, 0, 78, 47, 42, 0, 0,
+ 44, 56, 40, 50, 124, 43, 45, 53, 0, 83,
+ 79, 10, 570, 0, 46, 52, 82, 51, 32, 30,
0, 0, 0, 65, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 68, 0, 0, 60, 61, 78, 64,
- 58, 0, 0, 59, 0, 0, 67, 124, 0, 0,
- 0, 0, 83, 79, 10, 0, 62, 63, 77, 82,
- 12, 13, 0, 0, 0, 0, 65, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 68, 0, 0, 60,
- 61, 78, 64, 58, 0, 0, 59, 0, 0, 67,
- 124, 0, 0, 0, 0, 83, 79, 10, 0, 62,
- 63, 77, 82, 12, 13, 0, 0, 0, 0, 179,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 60, 61, 0, 64, 178, 0, 0, 59,
- 0, 0, 67, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 62, 63, 77, 0, 12, 13, 134, 149,
- 0, 152, 0, 135, 139, 140, 0, 0, 138, 150,
- 137, 136, 133, 151, 141, 142, 143, 144, 145, 146,
- 147, 148, 68, 0, 0, 0, 0, 299, 0, 0,
- 0, 0, 0, 0, 0, 0, 124, 396, 347, 0,
- 0, 83, 79, 10, 0, 0, 0, 349, 82, 78,
- 0, 0, 345, 343, 552, 65, 0, 0, 124, 344,
- 0, 0, 0, 83, 79, 10, 348, 0, 60, 61,
- 82, 64, 58, 0, 0, 59, 0, 232, 67, 0,
- 0, 0, 0, 346, 0, 0, 0, 0, 62, 63,
- 77, 0, 12, 13, 196, 0, 0, 0, 0, 0,
- 231, 342, 0, 12, 13, 0, 224, 0, 0, 0,
- 0, 0, 77, 0, 12, 13, 225, 134, 149, 0,
- 152, 0, 135, 139, 140, 0, 0, 138, 150, 137,
- 136, 133, 151, 141, 142, 143, 144, 145, 146, 147,
- 148, 134, 149, 0, 152, 0, 135, 139, 140, 0,
- 659, 138, 150, 137, 136, 133, 151, 141, 142, 143,
- 144, 145, 146, 147, 148, 134, 149, 0, 152, 0,
- 135, 139, 140, 0, 658, 138, 150, 137, 136, 133,
- 151, 141, 142, 143, 144, 145, 146, 147, 148, 0,
- 78, 0, 0, 0, 78, 0, 0, 0, 518, 124,
- 0, 0, 0, 124, 83, 79, 10, 0, 83, 79,
- 10, 82, 0, 0, 0, 82, 347, 0, 405, 0,
- 0, 0, 190, 0, 0, 349, 0, 0, 0, 0,
- 345, 343, 341, 0, 0, 196, 0, 344, 0, 196,
- 0, 411, 0, 0, 348, 195, 0, 0, 0, 347,
- 0, 0, 471, 77, 0, 12, 13, 77, 349, 12,
- 13, 346, 0, 345, 343, 341, 0, 612, 0, 347,
- 344, 0, 0, 0, 0, 0, 0, 348, 349, 342,
- 0, 0, 13, 345, 343, 341, 0, 0, 0, 347,
- 344, 0, 0, 0, 346, 0, 0, 452, 349, 0,
- 0, 0, 0, 345, 343, 341, 0, 0, 0, 0,
- 344, 0, 342, 0, 346, 13, 0, 348, 0, 0,
- 451, 0, 0, 0, 130, 0, 0, 0, 0, 0,
- 0, 0, 342, 0, 346, 13, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 342, 134, 149, 13, 152, 132, 135, 139,
- 140, 0, 131, 138, 150, 137, 136, 133, 151, 141,
- 142, 143, 144, 145, 146, 147, 148, 134, 149, 0,
- 152, 0, 135, 139, 140, 0, 0, 138, 150, 137,
- 136, 133, 151, 141, 142, 143, 144, 145, 146, 147,
- 148, 134, 149, 0, 0, 0, 135, 139, 140, 0,
- 0, 138, 150, 137, 136, 133, 151, 141, 142, 143,
- 144, 145, 146, 147, 148, 134, 149, 0, 0, 0,
- 135, 139, 140, 0, 0, 138, 150, 137, 136, 0,
- 151, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 0, 0, 0, 135, 139, 140, 0, 0, 138, 150,
- 137, 136, 0, 151, 141, 142, 143, 144, 145, 146,
- 147, 148,
+ 0, 0, 0, 0, 0, 0, 60, 61, 0, 64,
+ 58, 0, 0, 59, 0, 0, 67, 0, 0, 0,
+ 0, 0, 0, 0, 308, 0, 62, 63, 77, 0,
+ 12, 13, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 29, 105, 68, 247, 0, 41, 0, 78, 47,
+ 42, 0, 56, 44, 0, 40, 50, 33, 43, 45,
+ 53, 0, 83, 79, 10, 0, 0, 46, 52, 82,
+ 51, 32, 30, 0, 0, 547, 65, 0, 551, 357,
+ 0, 0, 463, 0, 0, 0, 357, 0, 357, 60,
+ 61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
+ 0, 0, 0, 78, 0, 0, 0, 0, 0, 62,
+ 63, 77, 124, 12, 13, 0, 0, 83, 79, 10,
+ 68, 0, 0, 0, 82, 78, 0, 0, 0, 0,
+ 0, 65, 0, 0, 124, 0, 0, 0, 0, 83,
+ 79, 10, 0, 0, 60, 61, 82, 64, 58, 0,
+ 0, 59, 0, 68, 67, 0, 0, 0, 78, 0,
+ 0, 0, 404, 0, 62, 63, 77, 124, 12, 13,
+ 0, 0, 83, 79, 10, 0, 67, 0, 0, 82,
+ 0, 0, 0, 0, 0, 0, 65, 0, 77, 0,
+ 12, 13, 0, 0, 0, 0, 0, 0, 0, 60,
+ 61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
+ 0, 0, 0, 78, 0, 0, 0, 590, 0, 62,
+ 63, 77, 124, 12, 13, 0, 0, 83, 79, 10,
+ 0, 501, 0, 0, 82, 0, 0, 0, 0, 0,
+ 0, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 60, 61, 0, 64, 58, 0,
+ 0, 59, 0, 68, 67, 0, 0, 0, 78, 0,
+ 0, 0, 0, 0, 62, 63, 77, 124, 12, 13,
+ 0, 0, 83, 79, 10, 0, 500, 0, 0, 82,
+ 0, 0, 0, 0, 0, 0, 65, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,
+ 61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
+ 0, 0, 0, 78, 0, 0, 0, 78, 0, 62,
+ 63, 77, 124, 12, 13, 0, 124, 83, 79, 10,
+ 0, 83, 79, 10, 82, 0, 395, 0, 82, 0,
+ 0, 179, 0, 0, 0, 232, 0, 0, 0, 0,
+ 0, 68, 0, 0, 60, 61, 78, 64, 178, 0,
+ 0, 59, 196, 0, 67, 124, 0, 0, 489, 0,
+ 83, 79, 10, 0, 62, 63, 77, 82, 12, 13,
+ 77, 0, 12, 13, 179, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 60, 61, 0,
+ 64, 178, 0, 0, 59, 0, 68, 67, 289, 0,
+ 0, 78, 0, 0, 0, 0, 0, 62, 63, 77,
+ 124, 12, 13, 0, 0, 83, 79, 10, 0, 284,
+ 0, 0, 82, 0, 0, 0, 0, 0, 0, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
+ 0, 0, 60, 61, 78, 64, 58, 187, 0, 59,
+ 0, 0, 67, 124, 0, 0, 0, 0, 83, 79,
+ 10, 0, 62, 63, 77, 82, 12, 13, 0, 0,
+ 0, 0, 65, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 68, 0, 0, 60, 61, 78, 64, 58,
+ 0, 0, 59, 0, 0, 67, 124, 0, 0, 0,
+ 0, 83, 79, 10, 0, 62, 63, 77, 82, 12,
+ 13, 0, 0, 0, 0, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 68, 0, 0, 60, 61,
+ 78, 64, 58, 0, 0, 59, 0, 0, 67, 124,
+ 0, 0, 0, 0, 83, 79, 10, 0, 62, 63,
+ 77, 82, 12, 13, 0, 0, 0, 0, 179, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 0,
+ 0, 60, 61, 299, 64, 178, 0, 0, 59, 0,
+ 0, 67, 124, 0, 0, 0, 0, 83, 79, 10,
+ 0, 62, 63, 77, 82, 12, 13, 0, 0, 0,
+ 0, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 60, 61, 78, 64, 58, 0,
+ 0, 59, 0, 0, 67, 124, 0, 0, 0, 0,
+ 83, 79, 10, 0, 62, 63, 77, 82, 12, 13,
+ 0, 78, 0, 0, 232, 0, 0, 0, 0, 0,
+ 124, 0, 0, 0, 0, 83, 79, 10, 0, 0,
+ 0, 196, 82, 0, 0, 0, 0, 231, 0, 232,
+ 0, 0, 0, 224, 0, 0, 0, 0, 0, 77,
+ 0, 12, 13, 225, 0, 0, 196, 0, 0, 0,
+ 0, 0, 231, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 77, 0, 12, 13, 427, 134,
+ 149, 0, 152, 0, 135, 139, 140, 0, 0, 138,
+ 150, 137, 136, 133, 151, 141, 142, 143, 144, 145,
+ 146, 147, 148, 134, 149, 0, 152, 0, 135, 139,
+ 140, 0, 660, 138, 150, 137, 136, 133, 151, 141,
+ 142, 143, 144, 145, 146, 147, 148, 0, 78, 0,
+ 0, 250, 78, 0, 0, 0, 659, 124, 0, 0,
+ 0, 124, 83, 79, 10, 0, 83, 79, 10, 82,
+ 0, 0, 0, 82, 299, 0, 232, 0, 0, 0,
+ 232, 0, 0, 124, 0, 0, 0, 0, 83, 79,
+ 10, 0, 0, 196, 0, 82, 0, 196, 0, 231,
+ 0, 0, 232, 231, 0, 0, 0, 78, 0, 0,
+ 0, 77, 0, 12, 13, 77, 124, 12, 13, 196,
+ 0, 83, 79, 10, 0, 231, 0, 0, 82, 78,
+ 0, 0, 0, 347, 0, 406, 0, 77, 124, 12,
+ 13, 0, 349, 83, 79, 10, 0, 345, 343, 553,
+ 82, 0, 196, 0, 344, 0, 0, 190, 412, 0,
+ 0, 348, 0, 0, 0, 0, 0, 0, 0, 0,
+ 77, 0, 12, 13, 196, 0, 0, 0, 346, 0,
+ 195, 0, 0, 0, 0, 0, 0, 0, 347, 0,
+ 0, 0, 77, 0, 12, 13, 342, 349, 12, 13,
+ 0, 0, 345, 343, 341, 0, 0, 0, 347, 344,
+ 0, 0, 0, 0, 0, 0, 453, 349, 0, 0,
+ 0, 0, 345, 343, 341, 0, 0, 0, 0, 344,
+ 0, 0, 0, 346, 0, 0, 348, 0, 0, 452,
+ 0, 0, 0, 130, 0, 0, 0, 0, 0, 0,
+ 0, 342, 0, 346, 13, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 350, 0, 0, 0, 0,
+ 0, 342, 134, 149, 13, 152, 132, 135, 139, 140,
+ 0, 131, 138, 150, 137, 136, 133, 151, 141, 142,
+ 143, 144, 145, 146, 147, 148, 134, 149, 0, 152,
+ 0, 135, 139, 140, 0, 0, 138, 150, 137, 136,
+ 133, 151, 141, 142, 143, 144, 145, 146, 147, 148,
+ 134, 149, 0, 0, 0, 135, 139, 140, 0, 0,
+ 138, 150, 137, 136, 133, 151, 141, 142, 143, 144,
+ 145, 146, 147, 148, 134, 149, 0, 0, 0, 135,
+ 139, 140, 0, 0, 138, 150, 137, 136, 0, 151,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 0,
+ 0, 0, 135, 139, 140, 0, 0, 138, 150, 137,
+ 136, 0, 151, 141, 142, 143, 144, 145, 146, 147,
+ 148,
}
var yyPact = [...]int{
- -1000, -1000, 542, 536, -1000, 164, -1000, 550, 555, 318,
- -1000, -1000, -1000, 588, -1000, -1000, 549, 1340, 316, 155,
- -1000, 214, 640, 308, -1000, 305, -1000, -1000, -1000, -1000,
- 491, 370, 366, 301, -1000, -1000, -1000, -1000, -1000, 186,
- -1000, 164, 164, 272, 272, 164, 1689, -1000, 2129, 171,
- -1000, -1000, -1000, -1000, -1000, -1000, -1000, 25, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 173, 1732, -1000, -1000,
- -1000, 489, 200, -1000, -1000, -1000, 253, 1646, 1995, 26,
- -1000, -1000, 200, 200, -1000, -1000, 96, 536, -1000, 587,
- 586, 42, 205, -1000, 547, -9, -9, -9, 5, -1000,
- -1000, -1000, 347, 1850, -1000, -1000, -1000, 292, 849, -1000,
- 44, 1158, -1000, 172, 908, 488, -1000, -1000, -1000, -1000,
- -1000, -1000, 25, -1000, 486, -1000, -1000, -1000, -23, 2153,
- 1689, -1000, -1000, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1603, 1689, 522, 1689,
- 1548, 280, 1689, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, 469, 2153, -1000, -1000, -1000, -1000, 1732, 1828,
- 1689, -1000, -1000, -1000, 1250, -1000, 17, 13, 2153, -1000,
- 1158, -1000, -1000, -1000, -1000, 1158, 1158, 211, 1158, 39,
- 27, 300, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, 585, 2090, -1000, 1114, 2090, -1000, 172, 485, 164,
- 297, -1000, -1000, 194, 1689, 164, -1000, -1000, -1000, -1000,
- -1000, 1158, 573, 296, -1000, 191, 1689, 295, -1000, -1000,
- -1000, -1000, 1250, 461, -14, -1000, -1000, 908, -1000, -1000,
- 1158, 908, 1250, 908, 2153, 2201, 2224, 732, 732, 732,
- 732, 732, 732, 843, 843, 843, 843, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, 2177, -23, -23, 2153, -1000, 518,
- 294, -1000, -1000, 69, 1689, -1000, 293, -1000, -1000, -1000,
- 51, -1000, -1000, 1505, 1774, 176, 1026, 130, -1000, 1991,
- 958, 1026, 181, -1000, -1000, -1000, -1000, -1000, -1000, 1158,
- 1158, -1000, 457, -1000, 164, 11, 288, -1000, -1000, 739,
- 581, 525, 513, -1000, -1000, 210, 282, -1000, -1000, 479,
- -1000, 545, 447, 139, -1000, 275, 273, -1000, -1000, -1000,
- -1000, -1000, 129, 19, 52, 43, 2090, 2070, 572, 476,
- 78, 192, 264, 262, 164, -3, -1000, 2050, 445, 164,
- 1689, -23, -1000, 444, 1158, 443, 164, 1689, -23, 439,
- 164, 132, 1030, 908, -1000, -1000, -1000, -1000, 438, -1000,
- 437, -1000, -1000, 1689, 1450, 1395, 2153, 520, 1689, 203,
- 518, 425, -16, 1732, 394, 393, -1000, 1689, 165, -17,
- -1000, -1000, 1941, -1000, -1000, 1509, -1000, -1000, -1000, -1000,
- -1000, 1158, 390, -1000, 162, -1000, 1250, 1250, -1000, -1000,
- -1000, -1000, 1158, 149, 217, 581, 164, -1000, -1000, 388,
- 545, 210, 581, 545, 164, 137, 274, -1000, 908, 386,
- -1000, -1000, -1000, -1000, 2090, 10, 2090, 164, 1839, -1000,
- -1000, 298, 2090, -1000, -1000, 2090, 164, 256, -1000, 133,
- -1000, 582, -1000, 78, -1000, -1000, 381, -21, 164, 164,
- 581, 2090, -1000, -1000, -23, -1000, -1000, 255, -1000, -1000,
- 849, -23, -1000, -1000, -1000, 472, -1000, -1000, 908, -1000,
- -1000, -1000, -1000, -1000, -1000, 1030, 1030, 1250, 251, 1689,
- 1689, -1000, -1000, -1000, -1000, -1000, 1732, 166, -1000, -1000,
- 376, -1000, -1000, -1000, 4, -1000, 1026, -1000, 1103, 1026,
- 1026, 372, -1000, -1000, -1000, 125, -1000, -1000, -1000, -1000,
- -1000, 581, 363, -1000, 359, -1000, -1000, -1000, 352, -1000,
- -1000, 2090, 3, 121, 249, -1000, 2090, 117, 230, -1000,
- 283, -1000, -1000, -1000, 350, -1000, -1000, 344, -1000, 266,
- -1000, 221, 2017, 220, -1000, -1000, 581, 343, 164, 191,
- 908, 338, -1000, 118, 1689, 2153, 2153, 136, 1250, 89,
- -1000, -1000, -1000, -1000, 1689, -1000, -1000, -1000, 2153, -1000,
- 82, 41, -1000, -1000, -1000, 581, 581, 1030, -1000, 2090,
- -1000, 164, 581, -1000, 1839, 164, -1000, 2017, 133, -1000,
- -1000, -1000, 164, -1000, 164, -1000, -1000, -1000, 336, -1000,
- -1000, -1000, -1000, 219, -1000, 1689, 1689, 1732, 565, 1,
- 1026, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- 335, -1000, 328, 303, 276, 1030, 1917, 1893, -1000, -1000,
- 110, -1000, 37, 2017, -1000, -1000, 2017, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, 1689, 518, -1000,
+ -1000, -1000, 536, 535, -1000, 128, -1000, 545, 549, 336,
+ -1000, -1000, -1000, 605, -1000, -1000, 541, 1239, 328, 85,
+ -1000, 220, 438, 327, -1000, 323, -1000, -1000, -1000, -1000,
+ 503, 493, 484, 459, -1000, -1000, -1000, -1000, -1000, 177,
+ -1000, 128, 128, 1316, 1316, 128, 1698, -1000, 2168, 92,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, 39, 1698, 1698,
+ 1698, 1698, 1698, 1698, 1698, 1698, 157, 1741, -1000, -1000,
+ -1000, 479, 233, -1000, -1000, -1000, 202, 1655, 2050, 36,
+ -1000, -1000, 233, 233, -1000, -1000, 153, 535, -1000, 586,
+ 585, 40, 194, -1000, 540, -11, -11, -11, 17, -1000,
+ -1000, -1000, 367, 1827, -1000, -1000, -1000, 355, 754, -1000,
+ 252, 1973, -1000, 155, 1969, 478, -1000, -1000, -1000, -1000,
+ -1000, -1000, 39, -1000, 475, -1000, -1000, -1000, -23, 2192,
+ 1698, -1000, -1000, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
+ 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
+ 1698, 1698, 1698, 1698, 1698, 1698, 1612, 1698, 524, 1698,
+ 1557, 387, 1698, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, 431, 2192, -1000, -1000, -1000, -1000, 1741, 1784,
+ 1698, -1000, -1000, -1000, 1156, -1000, 24, 22, 2192, -1000,
+ 1973, -1000, -1000, -1000, -1000, 1973, 1973, 211, 1973, 27,
+ 263, 320, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, 583, 1010, -1000, 2129, 1010, -1000, 155, 470, 128,
+ 309, -1000, -1000, 187, 1698, 128, -1000, -1000, -1000, -1000,
+ -1000, 1973, 574, 307, -1000, 181, 1698, 305, -1000, -1000,
+ -1000, -1000, 1156, 430, -13, -1000, -1000, 1969, -1000, -1000,
+ 1973, 1969, 1156, 1969, 2192, 2240, 2263, 689, 689, 689,
+ 689, 689, 689, 741, 741, 741, 741, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, 2216, -23, -23, 2192, -1000, 519,
+ 304, -1000, -1000, 51, 1698, -1000, 278, -1000, -1000, -1000,
+ 66, -1000, -1000, 1514, 1022, 174, 1294, 152, -1000, 2028,
+ 918, 1294, 143, -1000, -1000, -1000, -1000, -1000, -1000, 1973,
+ 1973, -1000, 428, -1000, 128, 13, 273, -1000, -1000, 1852,
+ 580, 525, 463, -1000, -1000, 210, 272, -1000, -1000, 467,
+ -1000, 539, 425, 197, -1000, 270, 268, -1000, -1000, -1000,
+ -1000, -1000, 103, 28, 151, 86, 1010, 2109, 571, 460,
+ 65, 184, 266, 265, 128, -6, -1000, 206, 424, 128,
+ 1698, -23, -1000, 422, 1973, 420, 128, 1698, -23, 418,
+ 128, 131, 1518, 1969, -1000, -1000, -1000, -1000, 416, -1000,
+ 415, -1000, -1000, 1698, 1459, 1404, 2192, 521, 1698, 229,
+ 519, 405, -14, 1741, 404, 403, -1000, 1698, 147, -17,
+ -1000, -1000, 173, 2192, -1000, -1000, 1995, -1000, -1000, -1000,
+ -1000, -1000, 1973, 402, -1000, 138, -1000, 1156, 1156, -1000,
+ -1000, -1000, -1000, 1973, 112, 31, 580, 128, -1000, -1000,
+ 398, 539, 210, 580, 539, 128, 104, 231, -1000, 1969,
+ 397, -1000, -1000, -1000, -1000, 1010, 10, 1010, 128, 2054,
+ -1000, -1000, 514, 1010, -1000, -1000, 1010, 128, 259, -1000,
+ 69, -1000, 581, -1000, 65, -1000, -1000, 392, -22, 128,
+ 128, 580, 1010, -1000, -1000, -23, -1000, -1000, 258, -1000,
+ -1000, 754, -23, -1000, -1000, -1000, 440, -1000, -1000, 1969,
+ -1000, -1000, -1000, -1000, -1000, -1000, 1518, 1518, 1156, 255,
+ 1698, 1698, -1000, -1000, -1000, -1000, -1000, 1741, 166, -1000,
+ -1000, 391, -1000, -1000, -1000, -1, -1000, 1294, -1000, 1349,
+ 1294, 1294, 390, -1000, -1000, -1000, 129, -1000, -1000, -1000,
+ -1000, -1000, 580, 385, -1000, 383, -1000, -1000, -1000, 382,
+ -1000, -1000, 1010, 2, 102, 254, -1000, 1010, 81, 244,
+ -1000, 439, -1000, -1000, -1000, 370, -1000, -1000, 365, -1000,
+ 497, -1000, 239, 858, 435, -1000, -1000, 580, 362, 128,
+ 181, 1969, 361, -1000, 111, 1698, 2192, 2192, 226, 1156,
+ 55, -1000, -1000, -1000, -1000, 1698, -1000, -1000, -1000, 2192,
+ -1000, 68, 64, -1000, -1000, -1000, 580, 580, 1518, -1000,
+ 1010, -1000, 128, 580, -1000, 2054, 128, -1000, 858, 69,
+ -1000, -1000, -1000, 128, -1000, 128, -1000, -1000, -1000, 359,
+ -1000, -1000, -1000, -1000, 236, -1000, 1698, 1698, 1741, 560,
+ 1, 1294, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, 349, -1000, 342, 341, 339, 1518, 1919, 1895, -1000,
+ -1000, 141, -1000, 50, 858, -1000, -1000, 858, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, 1698, 519, -1000,
}
var yyPgo = [...]int{
- 0, 57, 771, 774, 45, 150, 26, 540, 29, 770,
- 768, 2, 28, 61, 322, 766, 17, 4, 765, 761,
- 760, 759, 758, 756, 3, 755, 622, 47, 14, 754,
- 490, 40, 41, 130, 37, 12, 752, 561, 43, 620,
- 751, 564, 750, 749, 25, 745, 162, 743, 31, 11,
- 740, 48, 5, 1, 18, 735, 679, 734, 7, 22,
- 733, 732, 19, 730, 729, 728, 16, 54, 725, 723,
- 33, 721, 23, 719, 588, 46, 9, 718, 715, 714,
- 713, 39, 712, 711, 710, 15, 56, 709, 13, 706,
- 0, 70, 49, 24, 20, 21, 10, 8, 704, 6,
- 42, 30, 703, 701, 700, 699, 88, 34, 698, 32,
- 27, 697, 696, 695, 694, 692, 685, 51, 44, 680,
- 36, 677, 35, 676, 671, 667, 666, 657, 656, 655,
- 648, 647, 642, 639, 637, 634, 631, 627, 38, 623,
- 596, 593,
+ 0, 51, 793, 672, 34, 221, 32, 700, 31, 792,
+ 788, 1, 76, 113, 208, 16, 25, 3, 785, 782,
+ 781, 774, 773, 771, 7, 770, 617, 30, 24, 769,
+ 437, 45, 47, 273, 41, 19, 768, 554, 20, 620,
+ 767, 556, 765, 762, 12, 761, 124, 760, 40, 13,
+ 758, 46, 4, 2, 28, 756, 766, 755, 10, 18,
+ 752, 751, 26, 750, 749, 736, 15, 35, 735, 733,
+ 38, 732, 29, 727, 612, 48, 21, 721, 720, 719,
+ 717, 42, 712, 708, 707, 9, 84, 702, 14, 698,
+ 0, 67, 49, 22, 6, 23, 17, 8, 697, 5,
+ 37, 11, 696, 695, 694, 687, 406, 36, 686, 33,
+ 27, 684, 682, 681, 680, 677, 671, 50, 44, 667,
+ 43, 666, 58, 662, 659, 658, 657, 654, 652, 650,
+ 649, 646, 645, 644, 641, 640, 639, 638, 39, 637,
+ 626, 624,
}
var yyR1 = [...]int{
@@ -730,33 +740,33 @@
63, -66, 61, 76, -138, -31, -81, -7, -67, -6,
-67, -53, 36, 63, 66, 6, -14, -136, 63, -62,
-132, -138, 12, 76, -17, 32, 73, 67, -58, -57,
- -28, -16, -14, 68, 68, 37, -7, -90, -88, -85,
- -12, 60, -138, 76, -58, 69, 63, -127, -7, -7,
- 61, -3, 73, -122, 63, -7, 76, -5, 4, -13,
- 54, 25, -13, 60, 64, -122, 63, -82, 60, -4,
- 61, -120, 63, 63, 73, 4, 72, 68, 68, -106,
- -111, 60, 37, -107, -109, 9, 60, -93, -94, 60,
- 4, 51, -3, 66, 63, 63, -101, -100, 61, 76,
- -106, 12, 61, -70, -56, 61, 61, -77, -76, -75,
- -54, -56, 61, -48, 69, -3, -52, -89, 60, -86,
- -90, -88, -85, -12, -8, 61, 61, -129, -38, 27,
- 27, 36, -38, -10, 69, -9, 8, 13, -53, 61,
- -138, -17, 61, 61, -35, 69, 76, -138, 67, -49,
- -49, -7, 61, 69, -6, -66, -7, 69, -72, -5,
- -33, 61, -13, -5, -13, -3, 69, -27, -67, 61,
- -106, 73, -106, -105, -104, -97, -3, -103, -102, -96,
- -3, -106, 25, -91, -110, -106, -106, -101, 63, -94,
- 4, -93, 61, -3, -95, -5, -106, -122, 63, -7,
- 60, -67, -52, -66, 63, -14, -14, -62, -128, -59,
- 67, -133, 61, 73, 67, -28, -16, -15, -14, 68,
- -58, -58, 61, 69, -5, 61, 61, 61, -106, 73,
- 69, 63, -106, 69, 63, 60, 61, 61, 50, 63,
- -99, -98, 60, -106, 60, -5, 61, -76, -67, 61,
- 69, -38, 69, -66, 67, 66, 6, 76, -64, -35,
- -49, 69, 69, -5, -5, -52, -106, -97, -5, -96,
- -101, -99, -94, -101, -101, 61, -14, -14, -65, -63,
- 15, 73, -58, 61, 61, 61, 61, -52, 67, 67,
- 21, -11, 69, -99, -99, -134, -24, -53,
+ -28, -16, -15, -14, 68, 68, 37, -7, -90, -88,
+ -85, -12, 60, -138, 76, -58, 69, 63, -127, -7,
+ -7, 61, -3, 73, -122, 63, -7, 76, -5, 4,
+ -13, 54, 25, -13, 60, 64, -122, 63, -82, 60,
+ -4, 61, -120, 63, 63, 73, 4, 72, 68, 68,
+ -106, -111, 60, 37, -107, -109, 9, 60, -93, -94,
+ 60, 4, 51, -3, 66, 63, 63, -101, -100, 61,
+ 76, -106, 12, 61, -70, -56, 61, 61, -77, -76,
+ -75, -54, -56, 61, -48, 69, -3, -52, -89, 60,
+ -86, -90, -88, -85, -12, -8, 61, 61, -129, -38,
+ 27, 27, 36, -38, -10, 69, -9, 8, 13, -53,
+ 61, -138, -17, 61, 61, -35, 69, 76, -138, 67,
+ -49, -49, -7, 61, 69, -6, -66, -7, 69, -72,
+ -5, -33, 61, -13, -5, -13, -3, 69, -27, -67,
+ 61, -106, 73, -106, -105, -104, -97, -3, -103, -102,
+ -96, -3, -106, 25, -91, -110, -106, -106, -101, 63,
+ -94, 4, -93, 61, -3, -95, -5, -106, -122, 63,
+ -7, 60, -67, -52, -66, 63, -14, -14, -62, -128,
+ -59, 67, -133, 61, 73, 67, -28, -16, -15, -14,
+ 68, -58, -58, 61, 69, -5, 61, 61, 61, -106,
+ 73, 69, 63, -106, 69, 63, 60, 61, 61, 50,
+ 63, -99, -98, 60, -106, 60, -5, 61, -76, -67,
+ 61, 69, -38, 69, -66, 67, 66, 6, 76, -64,
+ -35, -49, 69, 69, -5, -5, -52, -106, -97, -5,
+ -96, -101, -99, -94, -101, -101, 61, -14, -14, -65,
+ -63, 15, 73, -58, 61, 61, 61, 61, -52, 67,
+ 67, 21, -11, 69, -99, -99, -134, -24, -53,
}
var yyDef = [...]int{
@@ -800,33 +810,33 @@
287, 0, 212, 289, 250, 244, 245, 165, 0, 262,
0, 73, 65, 294, 0, 0, 69, 0, 294, 0,
0, 0, 288, 289, 0, 0, 131, 290, 0, 288,
- 280, 281, 142, 140, 140, 0, 199, -2, -2, -2,
- -2, 0, 0, 289, 0, 216, -2, -2, 191, 192,
- 180, 190, 0, 0, 287, 302, 0, 231, 303, 0,
- 0, 236, 302, 0, 0, 0, 287, 239, 249, 0,
- 9, 14, 304, 305, 0, 0, 0, 298, 300, 324,
- 325, 0, 0, 315, 316, 0, 296, 0, 342, 0,
- 339, 0, 341, 0, 308, 309, 0, 297, 0, 0,
- 302, 0, 29, 221, 40, 171, 32, 286, 222, 44,
- 46, 42, 36, 225, 211, 162, 209, 213, 249, 184,
- 185, 186, 187, 188, 248, 212, 212, -2, 0, 0,
- 0, 63, 77, 64, 92, 61, 0, 0, 80, 124,
- 0, 279, 129, 130, 0, 137, 289, 285, 0, 284,
- 284, 0, 135, 136, 271, 0, 195, 200, 227, 230,
- 273, 302, 0, 233, 0, 237, 202, 229, 0, 241,
- 319, 0, 0, 0, 299, 348, 0, 0, 301, 350,
- 0, 334, -2, -2, 0, 327, 328, 0, 306, 0,
- 340, 0, 335, 0, 347, 330, 302, 0, 287, 45,
- 249, 0, 205, 0, 294, 67, 68, 0, -2, 0,
- 58, 84, 125, 132, 290, 282, 283, 141, 144, 140,
- 0, 0, -2, 60, 232, 302, 302, 212, 320, 0,
- 322, 0, 302, 323, 0, 296, 326, 335, 0, 307,
- 207, 336, 296, 338, 296, 331, 33, 223, 0, 214,
- 66, 70, 90, 62, 55, 0, 0, 0, 86, 0,
- 284, 143, 138, 234, 235, 242, 321, 349, 332, 351,
- 0, 329, 0, 0, 0, 212, 0, 0, 81, 85,
- 0, 133, 0, 335, 343, 337, 335, 206, 56, 57,
- 82, 87, 145, 333, 208, 294, 0, 83,
+ 280, 281, 0, -2, 140, 140, 0, 199, -2, -2,
+ -2, -2, 0, 0, 289, 0, 216, -2, -2, 191,
+ 192, 180, 190, 0, 0, 287, 302, 0, 231, 303,
+ 0, 0, 236, 302, 0, 0, 0, 287, 239, 249,
+ 0, 9, 14, 304, 305, 0, 0, 0, 298, 300,
+ 324, 325, 0, 0, 315, 316, 0, 296, 0, 342,
+ 0, 339, 0, 341, 0, 308, 309, 0, 297, 0,
+ 0, 302, 0, 29, 221, 40, 171, 32, 286, 222,
+ 44, 46, 42, 36, 225, 211, 162, 209, 213, 249,
+ 184, 185, 186, 187, 188, 248, 212, 212, -2, 0,
+ 0, 0, 63, 77, 64, 92, 61, 0, 0, 80,
+ 124, 0, 279, 129, 130, 0, 137, 289, 285, 0,
+ 284, 284, 0, 135, 136, 271, 0, 195, 200, 227,
+ 230, 273, 302, 0, 233, 0, 237, 202, 229, 0,
+ 241, 319, 0, 0, 0, 299, 348, 0, 0, 301,
+ 350, 0, 334, -2, -2, 0, 327, 328, 0, 306,
+ 0, 340, 0, 335, 0, 347, 330, 302, 0, 287,
+ 45, 249, 0, 205, 0, 294, 67, 68, 0, -2,
+ 0, 58, 84, 125, 132, 290, 282, 283, 141, 144,
+ 140, 0, 0, -2, 60, 232, 302, 302, 212, 320,
+ 0, 322, 0, 302, 323, 0, 296, 326, 335, 0,
+ 307, 207, 336, 296, 338, 296, 331, 33, 223, 0,
+ 214, 66, 70, 90, 62, 55, 0, 0, 0, 86,
+ 0, 284, -2, 138, 234, 235, 242, 321, 349, 332,
+ 351, 0, 329, 0, 0, 0, 212, 0, 0, 81,
+ 85, 0, 133, 0, 335, 343, 337, 335, 206, 56,
+ 57, 82, 87, 145, 333, 208, 294, 0, 83,
}
var yyTok1 = [...]int{
@@ -867,22 +877,22 @@
{390, 63, "missing { after if clause"},
{387, 63, "missing { after switch clause"},
{279, 63, "missing { after for clause"},
- {498, 36, "missing { after for clause"},
+ {499, 36, "missing { after for clause"},
{17, 68, "unexpected semicolon or newline before {"},
{111, 63, "unexpected semicolon or newline in type declaration"},
{78, 69, "unexpected } in channel type"},
{78, 61, "unexpected ) in channel type"},
{78, 76, "unexpected comma in channel type"},
- {416, 15, "unexpected semicolon or newline before else"},
+ {417, 15, "unexpected semicolon or newline before else"},
{329, 76, "name list not allowed in interface type"},
{279, 33, "var declaration not allowed in for initializer"},
{25, 68, "unexpected { at end of statement"},
{371, 68, "unexpected { at end of statement"},
{122, 63, "argument to go/defer must be function call"},
{398, 63, "need trailing comma before newline in composite literal"},
- {414, 63, "need trailing comma before newline in composite literal"},
+ {415, 63, "need trailing comma before newline in composite literal"},
{124, 25, "nested func not allowed"},
- {650, 63, "else must be followed by if or statement block"},
+ {651, 63, "else must be followed by if or statement block"},
}
//line yaccpar:1
@@ -1272,7 +1282,7 @@
pack := Nod(OPACK, nil, nil)
pack.Sym = my
- pack.Pkg = ipkg
+ pack.Name.Pkg = ipkg
pack.Lineno = int32(yyDollar[1].i)
if strings.HasPrefix(my.Name, ".") {
@@ -1618,10 +1628,10 @@
// type switch - declare variable
nn = newname(n.Sym)
declare(nn, dclcontext)
- yyVAL.node.Nname = nn
+ yyVAL.node.Rlist = list1(nn)
// keep track of the instances for reporting unused
- nn.Defn = typesw.Right
+ nn.Name.Defn = typesw.Right
}
}
}
@@ -1670,10 +1680,10 @@
// type switch - declare variable
nn = newname(n.Sym)
declare(nn, dclcontext)
- yyVAL.node.Nname = nn
+ yyVAL.node.Rlist = list1(nn)
// keep track of the instances for reporting unused
- nn.Defn = typesw.Right
+ nn.Name.Defn = typesw.Right
}
}
}
@@ -1788,8 +1798,8 @@
if yyDollar[1].node != nil {
yyVAL.node.Ninit = list1(yyDollar[1].node)
}
- yyVAL.node.Ntest = yyDollar[3].node
- yyVAL.node.Nincr = yyDollar[5].node
+ yyVAL.node.Left = yyDollar[3].node
+ yyVAL.node.Right = yyDollar[5].node
}
case 71:
yyDollar = yyS[yypt-1 : yypt+1]
@@ -1797,7 +1807,7 @@
{
// normal test
yyVAL.node = Nod(OFOR, nil, nil)
- yyVAL.node.Ntest = yyDollar[1].node
+ yyVAL.node.Left = yyDollar[1].node
}
case 73:
yyDollar = yyS[yypt-2 : yypt+1]
@@ -1825,7 +1835,7 @@
{
// test
yyVAL.node = Nod(OIF, nil, nil)
- yyVAL.node.Ntest = yyDollar[1].node
+ yyVAL.node.Left = yyDollar[1].node
}
case 77:
yyDollar = yyS[yypt-3 : yypt+1]
@@ -1836,7 +1846,7 @@
if yyDollar[1].node != nil {
yyVAL.node.Ninit = list1(yyDollar[1].node)
}
- yyVAL.node.Ntest = yyDollar[3].node
+ yyVAL.node.Left = yyDollar[3].node
}
case 78:
yyDollar = yyS[yypt-1 : yypt+1]
@@ -1848,7 +1858,7 @@
yyDollar = yyS[yypt-3 : yypt+1]
//line go.y:756
{
- if yyDollar[3].node.Ntest == nil {
+ if yyDollar[3].node.Left == nil {
Yyerror("missing condition in if statement")
}
}
@@ -1872,7 +1882,7 @@
if nn.N.Op == OIF {
popdcl()
}
- n.Nelse = list1(nn.N)
+ n.Rlist = list1(nn.N)
n = nn.N
}
}
@@ -1886,7 +1896,7 @@
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:788
{
- if yyDollar[4].node.Ntest == nil {
+ if yyDollar[4].node.Left == nil {
Yyerror("missing condition in if statement")
}
yyDollar[4].node.Nbody = yyDollar[5].list
@@ -1929,7 +1939,7 @@
//line go.y:822
{
var n *Node
- n = yyDollar[3].node.Ntest
+ n = yyDollar[3].node.Left
if n != nil && n.Op != OTYPESW {
n = nil
}
@@ -2169,7 +2179,7 @@
{
if yyDollar[1].node.Op == OPACK {
var s *Sym
- s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Pkg)
+ s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg)
yyDollar[1].node.Used = true
yyVAL.node = oldname(s)
break
@@ -2390,8 +2400,8 @@
//line go.y:1222
{
yyVAL.node = oldname(yyDollar[1].sym)
- if yyVAL.node.Pack != nil {
- yyVAL.node.Pack.Used = true
+ if yyVAL.node.Name != nil && yyVAL.node.Name.Pack != nil {
+ yyVAL.node.Name.Pack.Used = true
}
}
case 164:
@@ -2431,7 +2441,7 @@
{
if yyDollar[1].node.Op == OPACK {
var s *Sym
- s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Pkg)
+ s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg)
yyDollar[1].node.Used = true
yyVAL.node = oldname(s)
break
@@ -2558,10 +2568,10 @@
t.Rlist = yyDollar[5].list
yyVAL.node = Nod(ODCLFUNC, nil, nil)
- yyVAL.node.Nname = newfuncname(yyDollar[1].sym)
- yyVAL.node.Nname.Defn = yyVAL.node
- yyVAL.node.Nname.Param.Ntype = t // TODO: check if nname already has an ntype
- declare(yyVAL.node.Nname, PFUNC)
+ yyVAL.node.Func.Nname = newfuncname(yyDollar[1].sym)
+ yyVAL.node.Func.Nname.Name.Defn = yyVAL.node
+ yyVAL.node.Func.Nname.Name.Param.Ntype = t // TODO: check if nname already has an ntype
+ declare(yyVAL.node.Func.Nname, PFUNC)
funchdr(yyVAL.node)
}
@@ -2595,11 +2605,11 @@
yyVAL.node = Nod(ODCLFUNC, nil, nil)
yyVAL.node.Func.Shortname = newfuncname(yyDollar[4].sym)
- yyVAL.node.Nname = methodname1(yyVAL.node.Func.Shortname, rcvr.Right)
- yyVAL.node.Nname.Defn = yyVAL.node
- yyVAL.node.Nname.Param.Ntype = t
- yyVAL.node.Nname.Nointerface = nointerface
- declare(yyVAL.node.Nname, PFUNC)
+ yyVAL.node.Func.Nname = methodname1(yyVAL.node.Func.Shortname, rcvr.Right)
+ yyVAL.node.Func.Nname.Name.Defn = yyVAL.node
+ yyVAL.node.Func.Nname.Name.Param.Ntype = t
+ yyVAL.node.Func.Nname.Nointerface = nointerface
+ declare(yyVAL.node.Func.Nname, PFUNC)
funchdr(yyVAL.node)
}
@@ -2787,28 +2797,28 @@
}
n = embedded(n.Sym, importpkg)
n.Right = yyDollar[2].node
- n.Val = yyDollar[3].val
+ n.SetVal(yyDollar[3].val)
yyVAL.list = list1(n)
break
}
for l = yyDollar[1].list; l != nil; l = l.Next {
l.N = Nod(ODCLFIELD, l.N, yyDollar[2].node)
- l.N.Val = yyDollar[3].val
+ l.N.SetVal(yyDollar[3].val)
}
}
case 231:
yyDollar = yyS[yypt-2 : yypt+1]
//line go.y:1652
{
- yyDollar[1].node.Val = yyDollar[2].val
+ yyDollar[1].node.SetVal(yyDollar[2].val)
yyVAL.list = list1(yyDollar[1].node)
}
case 232:
yyDollar = yyS[yypt-4 : yypt+1]
//line go.y:1657
{
- yyDollar[2].node.Val = yyDollar[4].val
+ yyDollar[2].node.SetVal(yyDollar[4].val)
yyVAL.list = list1(yyDollar[2].node)
Yyerror("cannot parenthesize embedded type")
}
@@ -2817,7 +2827,7 @@
//line go.y:1663
{
yyDollar[2].node.Right = Nod(OIND, yyDollar[2].node.Right, nil)
- yyDollar[2].node.Val = yyDollar[3].val
+ yyDollar[2].node.SetVal(yyDollar[3].val)
yyVAL.list = list1(yyDollar[2].node)
}
case 234:
@@ -2825,7 +2835,7 @@
//line go.y:1669
{
yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
- yyDollar[3].node.Val = yyDollar[5].val
+ yyDollar[3].node.SetVal(yyDollar[5].val)
yyVAL.list = list1(yyDollar[3].node)
Yyerror("cannot parenthesize embedded type")
}
@@ -2834,7 +2844,7 @@
//line go.y:1676
{
yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
- yyDollar[3].node.Val = yyDollar[5].val
+ yyDollar[3].node.SetVal(yyDollar[5].val)
yyVAL.list = list1(yyDollar[3].node)
Yyerror("cannot parenthesize embedded type")
}
@@ -2846,8 +2856,8 @@
yyVAL.sym = yyDollar[1].sym
n = oldname(yyDollar[1].sym)
- if n.Pack != nil {
- n.Pack.Used = true
+ if n.Name != nil && n.Name.Pack != nil {
+ n.Name.Pack.Used = true
}
}
case 237:
@@ -2861,7 +2871,7 @@
pkg = localpkg
} else {
yyDollar[1].sym.Def.Used = true
- pkg = yyDollar[1].sym.Def.Pkg
+ pkg = yyDollar[1].sym.Def.Name.Pkg
}
yyVAL.sym = restrictlookup(yyDollar[3].sym.Name, pkg)
}
@@ -2972,7 +2982,7 @@
{
var l *NodeList
- yyDollar[1].node.Defn = yyDollar[4].node
+ yyDollar[1].node.Name.Defn = yyDollar[4].node
l = list1(yyDollar[1].node)
if yyDollar[4].node != nil {
l = list(l, yyDollar[4].node)
@@ -3182,7 +3192,7 @@
yyDollar = yyS[yypt-0 : yypt+1]
//line go.y:1998
{
- yyVAL.val.Ctype = CTxxx
+ yyVAL.val.U = nil
}
case 304:
yyDollar = yyS[yypt-4 : yypt+1]
@@ -3350,7 +3360,7 @@
if yyDollar[1].sym != nil {
yyVAL.node.Left = newname(yyDollar[1].sym)
}
- yyVAL.node.Val = yyDollar[3].val
+ yyVAL.node.SetVal(yyDollar[3].val)
}
case 331:
yyDollar = yyS[yypt-4 : yypt+1]
@@ -3367,7 +3377,7 @@
yyVAL.node.Left = newname(yyDollar[1].sym)
}
yyVAL.node.Isddd = true
- yyVAL.node.Val = yyDollar[4].val
+ yyVAL.node.SetVal(yyDollar[4].val)
}
case 332:
yyDollar = yyS[yypt-3 : yypt+1]
@@ -3378,7 +3388,7 @@
if yyDollar[1].sym != nil && yyDollar[1].sym.Name != "?" {
yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(yyDollar[2].typ))
- yyVAL.node.Val = yyDollar[3].val
+ yyVAL.node.SetVal(yyDollar[3].val)
} else {
s = yyDollar[2].typ.Sym
if s == nil && Isptr[yyDollar[2].typ.Etype] {
@@ -3390,7 +3400,7 @@
}
yyVAL.node = embedded(s, p)
yyVAL.node.Right = typenod(yyDollar[2].typ)
- yyVAL.node.Val = yyDollar[3].val
+ yyVAL.node.SetVal(yyDollar[3].val)
}
}
case 333:
@@ -3434,16 +3444,16 @@
//line go.y:2232
{
yyVAL.node = nodlit(yyDollar[2].val)
- switch yyVAL.node.Val.Ctype {
+ switch yyVAL.node.Val().Ctype() {
case CTINT, CTRUNE:
- mpnegfix(yyVAL.node.Val.U.(*Mpint))
+ mpnegfix(yyVAL.node.Val().U.(*Mpint))
break
case CTFLT:
- mpnegflt(yyVAL.node.Val.U.(*Mpflt))
+ mpnegflt(yyVAL.node.Val().U.(*Mpflt))
break
case CTCPLX:
- mpnegflt(&yyVAL.node.Val.U.(*Mpcplx).Real)
- mpnegflt(&yyVAL.node.Val.U.(*Mpcplx).Imag)
+ mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Real)
+ mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Imag)
break
default:
Yyerror("bad negated constant")
@@ -3462,14 +3472,14 @@
yyDollar = yyS[yypt-5 : yypt+1]
//line go.y:2260
{
- if yyDollar[2].node.Val.Ctype == CTRUNE && yyDollar[4].node.Val.Ctype == CTINT {
+ if yyDollar[2].node.Val().Ctype() == CTRUNE && yyDollar[4].node.Val().Ctype() == CTINT {
yyVAL.node = yyDollar[2].node
- mpaddfixfix(yyDollar[2].node.Val.U.(*Mpint), yyDollar[4].node.Val.U.(*Mpint), 0)
+ mpaddfixfix(yyDollar[2].node.Val().U.(*Mpint), yyDollar[4].node.Val().U.(*Mpint), 0)
break
}
- yyDollar[4].node.Val.U.(*Mpcplx).Real = yyDollar[4].node.Val.U.(*Mpcplx).Imag
- Mpmovecflt(&yyDollar[4].node.Val.U.(*Mpcplx).Imag, 0.0)
- yyVAL.node = nodcplxlit(yyDollar[2].node.Val, yyDollar[4].node.Val)
+ yyDollar[4].node.Val().U.(*Mpcplx).Real = yyDollar[4].node.Val().U.(*Mpcplx).Imag
+ Mpmovecflt(&yyDollar[4].node.Val().U.(*Mpcplx).Imag, 0.0)
+ yyVAL.node = nodcplxlit(yyDollar[2].node.Val(), yyDollar[4].node.Val())
}
case 346:
yyDollar = yyS[yypt-1 : yypt+1]
diff --git a/src/cmd/compile/internal/gc/y.output b/src/cmd/compile/internal/gc/y.output
deleted file mode 100644
index 2821702..0000000
--- a/src/cmd/compile/internal/gc/y.output
+++ /dev/null
@@ -1,10411 +0,0 @@
-
-state 0
- $accept: .file $end
- $$4: . (4)
-
- . reduce 4 (src line 210)
-
- file goto 1
- loadsys goto 2
- $$4 goto 3
-
-state 1
- $accept: file.$end
-
- $end accept
- . error
-
-
-state 2
- file: loadsys.package imports xdcl_list
- package: . (2)
-
- LPACKAGE shift 5
- . reduce 2 (src line 193)
-
- package goto 4
-
-state 3
- loadsys: $$4.import_package import_there
-
- LPACKAGE shift 7
- . error
-
- import_package goto 6
-
-state 4
- file: loadsys package.imports xdcl_list
- imports: . (6)
-
- . reduce 6 (src line 227)
-
- imports goto 8
-
-state 5
- package: LPACKAGE.sym ';'
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 9
- hidden_importsym goto 11
-
-state 6
- loadsys: $$4 import_package.import_there
- $$21: . (21)
-
- . reduce 21 (src line 334)
-
- import_there goto 14
- $$21 goto 15
-
-state 7
- import_package: LPACKAGE.LNAME import_safety ';'
-
- LNAME shift 16
- . error
-
-
-state 8
- file: loadsys package imports.xdcl_list
- imports: imports.import ';'
- xdcl_list: . (218)
-
- LIMPORT shift 19
- . reduce 218 (src line 1569)
-
- xdcl_list goto 17
- import goto 18
-
-state 9
- package: LPACKAGE sym.';'
-
- ';' shift 20
- . error
-
-
-state 10
- sym: LNAME. (157)
-
- . reduce 157 (src line 1175)
-
-
-state 11
- sym: hidden_importsym. (158)
-
- . reduce 158 (src line 1184)
-
-
-state 12
- sym: '?'. (159)
-
- . reduce 159 (src line 1185)
-
-
-state 13
- hidden_importsym: '@'.LLITERAL '.' LNAME
- hidden_importsym: '@'.LLITERAL '.' '?'
-
- LLITERAL shift 21
- . error
-
-
-state 14
- loadsys: $$4 import_package import_there. (5)
-
- . reduce 5 (src line 221)
-
-
-state 15
- import_there: $$21.hidden_import_list '$' '$'
- hidden_import_list: . (344)
-
- . reduce 344 (src line 2271)
-
- hidden_import_list goto 22
-
-state 16
- import_package: LPACKAGE LNAME.import_safety ';'
- import_safety: . (19)
-
- LNAME shift 24
- . reduce 19 (src line 326)
-
- import_safety goto 23
-
-state 17
- file: loadsys package imports xdcl_list. (1)
- xdcl_list: xdcl_list.xdcl ';'
- xdcl: . (23)
-
- $end reduce 1 (src line 184)
- error shift 29
- LLITERAL shift 68
- LBREAK shift 41
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 33
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 23 (src line 347)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 28
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- xfndcl goto 27
- xdcl goto 25
- expr_list goto 49
- common_dcl goto 26
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 18
- imports: imports import.';'
-
- ';' shift 84
- . error
-
-
-state 19
- import: LIMPORT.import_stmt
- import: LIMPORT.'(' import_stmt_list osemi ')'
- import: LIMPORT.'(' ')'
-
- LLITERAL shift 88
- LNAME shift 10
- '(' shift 86
- '.' shift 90
- '?' shift 12
- '@' shift 13
- . error
-
- import_here goto 87
- sym goto 89
- hidden_importsym goto 11
- import_stmt goto 85
-
-state 20
- package: LPACKAGE sym ';'. (3)
-
- . reduce 3 (src line 200)
-
-
-state 21
- hidden_importsym: '@' LLITERAL.'.' LNAME
- hidden_importsym: '@' LLITERAL.'.' '?'
-
- '.' shift 91
- . error
-
-
-state 22
- import_there: $$21 hidden_import_list.'$' '$'
- hidden_import_list: hidden_import_list.hidden_import
-
- LCONST shift 96
- LFUNC shift 98
- LIMPORT shift 94
- LTYPE shift 97
- LVAR shift 95
- '$' shift 92
- . error
-
- hidden_import goto 93
-
-state 23
- import_package: LPACKAGE LNAME import_safety.';'
-
- ';' shift 99
- . error
-
-
-state 24
- import_safety: LNAME. (20)
-
- . reduce 20 (src line 327)
-
-
-state 25
- xdcl_list: xdcl_list xdcl.';'
-
- ';' shift 100
- . error
-
-
-state 26
- xdcl: common_dcl. (24)
-
- . reduce 24 (src line 352)
-
-
-state 27
- xdcl: xfndcl. (25)
-
- . reduce 25 (src line 353)
-
-
-state 28
- xdcl: non_dcl_stmt. (26)
-
- . reduce 26 (src line 357)
-
-
-state 29
- xdcl: error. (27)
-
- . reduce 27 (src line 362)
-
-
-state 30
- common_dcl: LVAR.vardcl
- common_dcl: LVAR.'(' vardcl_list osemi ')'
- common_dcl: LVAR.'(' ')'
-
- LNAME shift 10
- '(' shift 102
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 103
- vardcl goto 101
- hidden_importsym goto 11
-
-state 31
- common_dcl: lconst.constdcl
- common_dcl: lconst.'(' constdcl osemi ')'
- common_dcl: lconst.'(' constdcl ';' constdcl_list osemi ')'
- common_dcl: lconst.'(' ')'
-
- LNAME shift 10
- '(' shift 107
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 108
- constdcl goto 106
- hidden_importsym goto 11
-
-state 32
- common_dcl: LTYPE.typedcl
- common_dcl: LTYPE.'(' typedcl_list osemi ')'
- common_dcl: LTYPE.'(' ')'
-
- LNAME shift 10
- '(' shift 110
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 112
- typedclname goto 111
- typedcl goto 109
- hidden_importsym goto 11
-
-state 33
- xfndcl: LFUNC.fndcl fnbody
- fntype: LFUNC.'(' oarg_type_list_ocomma ')' fnres
-
- LNAME shift 10
- '(' shift 114
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 115
- fndcl goto 113
- hidden_importsym goto 11
-
-state 34
- non_dcl_stmt: simple_stmt. (256)
-
- . reduce 256 (src line 1796)
-
-
-state 35
- non_dcl_stmt: for_stmt. (257)
-
- . reduce 257 (src line 1798)
-
-
-state 36
- non_dcl_stmt: switch_stmt. (258)
-
- . reduce 258 (src line 1799)
-
-
-state 37
- non_dcl_stmt: select_stmt. (259)
-
- . reduce 259 (src line 1800)
-
-
-state 38
- non_dcl_stmt: if_stmt. (260)
-
- . reduce 260 (src line 1801)
-
-
-state 39
- non_dcl_stmt: labelname.':' $$261 stmt
-
- ':' shift 116
- . error
-
-
-state 40
- non_dcl_stmt: LFALL. (263)
-
- . reduce 263 (src line 1818)
-
-
-state 41
- non_dcl_stmt: LBREAK.onew_name
- onew_name: . (155)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 155 (src line 1169)
-
- sym goto 119
- new_name goto 118
- onew_name goto 117
- hidden_importsym goto 11
-
-state 42
- non_dcl_stmt: LCONTINUE.onew_name
- onew_name: . (155)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 155 (src line 1169)
-
- sym goto 119
- new_name goto 118
- onew_name goto 120
- hidden_importsym goto 11
-
-state 43
- non_dcl_stmt: LGO.pseudocall
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- '(' shift 67
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 122
- pexpr_no_paren goto 66
- pseudocall goto 121
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 44
- non_dcl_stmt: LDEFER.pseudocall
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- '(' shift 67
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 122
- pexpr_no_paren goto 66
- pseudocall goto 125
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 45
- non_dcl_stmt: LGOTO.new_name
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 119
- new_name goto 126
- hidden_importsym goto 11
-
-state 46
- non_dcl_stmt: LRETURN.oexpr_list
- oexpr_list: . (292)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 292 (src line 1967)
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 128
- oexpr_list goto 127
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 47
- lconst: LCONST. (38)
-
- . reduce 38 (src line 416)
-
-
-state 48
- simple_stmt: expr. (49)
- simple_stmt: expr.LASOP expr
- simple_stmt: expr.LINC
- simple_stmt: expr.LDEC
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- expr_list: expr. (276)
-
- LASOP shift 130
- LCOLAS reduce 276 (src line 1902)
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LDEC shift 132
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LINC shift 131
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- '=' reduce 276 (src line 1902)
- ',' reduce 276 (src line 1902)
- . reduce 49 (src line 472)
-
-
-state 49
- simple_stmt: expr_list.'=' expr_list
- simple_stmt: expr_list.LCOLAS expr_list
- expr_list: expr_list.',' expr
-
- LCOLAS shift 154
- '=' shift 153
- ',' shift 155
- . error
-
-
-state 50
- for_stmt: LFOR.$$74 for_body
- $$74: . (74)
-
- . reduce 74 (src line 721)
-
- $$74 goto 156
-
-state 51
- switch_stmt: LSWITCH.$$88 if_header $$89 LBODY caseblock_list '}'
- $$88: . (88)
-
- . reduce 88 (src line 816)
-
- $$88 goto 157
-
-state 52
- select_stmt: LSELECT.$$91 LBODY caseblock_list '}'
- $$91: . (91)
-
- . reduce 91 (src line 839)
-
- $$91 goto 158
-
-state 53
- if_stmt: LIF.$$78 if_header $$79 loop_body $$80 elseif_list else
- $$78: . (78)
-
- . reduce 78 (src line 750)
-
- $$78 goto 159
-
-state 54
- labelname: new_name. (163)
-
- . reduce 163 (src line 1229)
-
-
-state 55
- expr: uexpr. (93)
-
- . reduce 93 (src line 855)
-
-
-state 56
- new_name: sym. (153)
- name: sym. (162)
-
- ':' reduce 153 (src line 1153)
- . reduce 162 (src line 1220)
-
-
-state 57
- uexpr: pexpr. (114)
- pseudocall: pexpr.'(' ')'
- pseudocall: pexpr.'(' expr_or_type_list ocomma ')'
- pseudocall: pexpr.'(' expr_or_type_list LDDD ocomma ')'
- pexpr_no_paren: pexpr.'.' sym
- pexpr_no_paren: pexpr.'.' '(' expr_or_type ')'
- pexpr_no_paren: pexpr.'.' '(' LTYPE ')'
- pexpr_no_paren: pexpr.'[' expr ']'
- pexpr_no_paren: pexpr.'[' oexpr ':' oexpr ']'
- pexpr_no_paren: pexpr.'[' oexpr ':' oexpr ':' oexpr ']'
-
- '(' shift 160
- '.' shift 161
- '[' shift 162
- . reduce 114 (src line 939)
-
-
-state 58
- uexpr: '*'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 163
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 59
- uexpr: '&'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 164
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 60
- uexpr: '+'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 165
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 61
- uexpr: '-'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 166
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 62
- uexpr: '!'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 167
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 63
- uexpr: '~'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 168
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 64
- uexpr: '^'.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 169
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 65
- uexpr: LCOMM.uexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 170
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 66
- pexpr_no_paren: pexpr_no_paren.'{' start_complit braced_keyval_list '}'
- pexpr: pexpr_no_paren. (146)
-
- '{' shift 171
- . reduce 146 (src line 1116)
-
-
-state 67
- pexpr_no_paren: '('.expr_or_type ')' '{' start_complit braced_keyval_list '}'
- pexpr: '('.expr_or_type ')'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 173
- expr_or_type goto 172
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 68
- pexpr_no_paren: LLITERAL. (126)
-
- . reduce 126 (src line 1003)
-
-
-state 69
- pexpr_no_paren: name. (127)
-
- . reduce 127 (src line 1008)
-
-
-state 70
- pexpr_no_paren: pseudocall. (134)
-
- . reduce 134 (src line 1046)
-
-
-state 71
- pexpr_no_paren: convtype.'(' expr ocomma ')'
-
- '(' shift 180
- . error
-
-
-state 72
- pexpr_no_paren: comptype.lbrace start_complit braced_keyval_list '}'
-
- LBODY shift 182
- '{' shift 183
- . error
-
- lbrace goto 181
-
-state 73
- pexpr_no_paren: fnliteral. (139)
-
- . reduce 139 (src line 1073)
-
-
-state 74
- convtype: fntype. (181)
- fnlitdcl: fntype. (215)
-
- '(' reduce 181 (src line 1282)
- . reduce 215 (src line 1546)
-
-
-state 75
- convtype: othertype. (182)
- comptype: othertype. (183)
-
- '(' reduce 182 (src line 1284)
- . reduce 183 (src line 1286)
-
-
-state 76
- fnliteral: fnlitdcl.lbrace stmt_list '}'
- fnliteral: fnlitdcl.error
-
- error shift 185
- LBODY shift 182
- '{' shift 183
- . error
-
- lbrace goto 184
-
-state 77
- othertype: '['.oexpr ']' ntype
- othertype: '['.LDDD ']' ntype
- oexpr: . (290)
-
- LLITERAL shift 68
- LCHAN shift 78
- LDDD shift 187
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 290 (src line 1961)
-
- sym goto 123
- expr goto 188
- fnliteral goto 73
- name goto 69
- oexpr goto 186
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 78
- othertype: LCHAN.non_recvchantype
- othertype: LCHAN.LCOMM ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 190
- '*' shift 196
- '(' shift 195
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- dotname goto 194
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 193
- non_recvchantype goto 189
- othertype goto 192
- fntype goto 191
- hidden_importsym goto 11
-
-state 79
- othertype: LMAP.'[' ntype ']' ntype
-
- '[' shift 198
- . error
-
-
-state 80
- othertype: structtype. (196)
-
- . reduce 196 (src line 1334)
-
-
-state 81
- othertype: interfacetype. (197)
-
- . reduce 197 (src line 1335)
-
-
-state 82
- structtype: LSTRUCT.lbrace structdcl_list osemi '}'
- structtype: LSTRUCT.lbrace '}'
-
- LBODY shift 182
- '{' shift 183
- . error
-
- lbrace goto 199
-
-state 83
- interfacetype: LINTERFACE.lbrace interfacedcl_list osemi '}'
- interfacetype: LINTERFACE.lbrace '}'
-
- LBODY shift 182
- '{' shift 183
- . error
-
- lbrace goto 200
-
-state 84
- imports: imports import ';'. (7)
-
- . reduce 7 (src line 228)
-
-
-state 85
- import: LIMPORT import_stmt. (8)
-
- . reduce 8 (src line 230)
-
-
-state 86
- import: LIMPORT '('.import_stmt_list osemi ')'
- import: LIMPORT '('.')'
-
- LLITERAL shift 88
- LNAME shift 10
- ')' shift 202
- '.' shift 90
- '?' shift 12
- '@' shift 13
- . error
-
- import_here goto 87
- sym goto 89
- hidden_importsym goto 11
- import_stmt goto 203
- import_stmt_list goto 201
-
-state 87
- import_stmt: import_here.import_package import_there
- import_stmt: import_here.import_there
- $$21: . (21)
-
- LPACKAGE shift 7
- . reduce 21 (src line 334)
-
- import_package goto 204
- import_there goto 205
- $$21 goto 15
-
-state 88
- import_here: LLITERAL. (15)
-
- . reduce 15 (src line 286)
-
-
-state 89
- import_here: sym.LLITERAL
-
- LLITERAL shift 206
- . error
-
-
-state 90
- import_here: '.'.LLITERAL
-
- LLITERAL shift 207
- . error
-
-
-state 91
- hidden_importsym: '@' LLITERAL '.'.LNAME
- hidden_importsym: '@' LLITERAL '.'.'?'
-
- LNAME shift 208
- '?' shift 209
- . error
-
-
-state 92
- import_there: $$21 hidden_import_list '$'.'$'
-
- '$' shift 210
- . error
-
-
-state 93
- hidden_import_list: hidden_import_list hidden_import. (345)
-
- . reduce 345 (src line 2272)
-
-
-state 94
- hidden_import: LIMPORT.LNAME LLITERAL ';'
-
- LNAME shift 211
- . error
-
-
-state 95
- hidden_import: LVAR.hidden_pkg_importsym hidden_type ';'
-
- '@' shift 13
- . error
-
- hidden_importsym goto 213
- hidden_pkg_importsym goto 212
-
-state 96
- hidden_import: LCONST.hidden_pkg_importsym '=' hidden_constant ';'
- hidden_import: LCONST.hidden_pkg_importsym hidden_type '=' hidden_constant ';'
-
- '@' shift 13
- . error
-
- hidden_importsym goto 213
- hidden_pkg_importsym goto 214
-
-state 97
- hidden_import: LTYPE.hidden_pkgtype hidden_type ';'
-
- '@' shift 13
- . error
-
- hidden_importsym goto 213
- hidden_pkg_importsym goto 216
- hidden_pkgtype goto 215
-
-state 98
- hidden_import: LFUNC.hidden_fndcl fnbody ';'
-
- '(' shift 219
- '@' shift 13
- . error
-
- hidden_fndcl goto 217
- hidden_importsym goto 213
- hidden_pkg_importsym goto 218
-
-state 99
- import_package: LPACKAGE LNAME import_safety ';'. (18)
-
- . reduce 18 (src line 309)
-
-
-state 100
- xdcl_list: xdcl_list xdcl ';'. (219)
-
- . reduce 219 (src line 1573)
-
-
-state 101
- common_dcl: LVAR vardcl. (28)
-
- . reduce 28 (src line 367)
-
-
-state 102
- common_dcl: LVAR '('.vardcl_list osemi ')'
- common_dcl: LVAR '('.')'
-
- LNAME shift 10
- ')' shift 221
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 103
- vardcl goto 222
- vardcl_list goto 220
- hidden_importsym goto 11
-
-state 103
- vardcl: dcl_name_list.ntype
- vardcl: dcl_name_list.ntype '=' expr_list
- vardcl: dcl_name_list.'=' expr_list
- dcl_name_list: dcl_name_list.',' dcl_name
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '=' shift 224
- '[' shift 77
- '?' shift 12
- '@' shift 13
- ',' shift 225
- . error
-
- sym goto 123
- ntype goto 223
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 104
- dcl_name_list: dcl_name. (274)
-
- . reduce 274 (src line 1892)
-
-
-state 105
- dcl_name: sym. (154)
-
- . reduce 154 (src line 1163)
-
-
-state 106
- common_dcl: lconst constdcl. (31)
-
- . reduce 31 (src line 380)
-
-
-state 107
- common_dcl: lconst '('.constdcl osemi ')'
- common_dcl: lconst '('.constdcl ';' constdcl_list osemi ')'
- common_dcl: lconst '('.')'
-
- LNAME shift 10
- ')' shift 234
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 108
- constdcl goto 233
- hidden_importsym goto 11
-
-state 108
- constdcl: dcl_name_list.ntype '=' expr_list
- constdcl: dcl_name_list.'=' expr_list
- dcl_name_list: dcl_name_list.',' dcl_name
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '=' shift 236
- '[' shift 77
- '?' shift 12
- '@' shift 13
- ',' shift 225
- . error
-
- sym goto 123
- ntype goto 235
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 109
- common_dcl: LTYPE typedcl. (35)
-
- . reduce 35 (src line 403)
-
-
-state 110
- common_dcl: LTYPE '('.typedcl_list osemi ')'
- common_dcl: LTYPE '('.')'
-
- LNAME shift 10
- ')' shift 238
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 112
- typedclname goto 111
- typedcl goto 239
- typedcl_list goto 237
- hidden_importsym goto 11
-
-state 111
- typedcl: typedclname.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 240
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 112
- typedclname: sym. (47)
-
- . reduce 47 (src line 457)
-
-
-state 113
- xfndcl: LFUNC fndcl.fnbody
- fnbody: . (210)
-
- '{' shift 242
- . reduce 210 (src line 1519)
-
- fnbody goto 241
-
-state 114
- fndcl: '('.oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')' fnres
- fntype: LFUNC '('.oarg_type_list_ocomma ')' fnres
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 243
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 115
- fndcl: sym.'(' oarg_type_list_ocomma ')' fnres
-
- '(' shift 251
- . error
-
-
-state 116
- non_dcl_stmt: labelname ':'.$$261 stmt
- $$261: . (261)
-
- . reduce 261 (src line 1802)
-
- $$261 goto 252
-
-state 117
- non_dcl_stmt: LBREAK onew_name. (264)
-
- . reduce 264 (src line 1824)
-
-
-state 118
- onew_name: new_name. (156)
-
- . reduce 156 (src line 1173)
-
-
-state 119
- new_name: sym. (153)
-
- . reduce 153 (src line 1153)
-
-
-state 120
- non_dcl_stmt: LCONTINUE onew_name. (265)
-
- . reduce 265 (src line 1828)
-
-
-state 121
- pexpr_no_paren: pseudocall. (134)
- non_dcl_stmt: LGO pseudocall. (266)
-
- '(' reduce 134 (src line 1046)
- '.' reduce 134 (src line 1046)
- '{' reduce 134 (src line 1046)
- '[' reduce 134 (src line 1046)
- . reduce 266 (src line 1832)
-
-
-state 122
- pseudocall: pexpr.'(' ')'
- pseudocall: pexpr.'(' expr_or_type_list ocomma ')'
- pseudocall: pexpr.'(' expr_or_type_list LDDD ocomma ')'
- pexpr_no_paren: pexpr.'.' sym
- pexpr_no_paren: pexpr.'.' '(' expr_or_type ')'
- pexpr_no_paren: pexpr.'.' '(' LTYPE ')'
- pexpr_no_paren: pexpr.'[' expr ']'
- pexpr_no_paren: pexpr.'[' oexpr ':' oexpr ']'
- pexpr_no_paren: pexpr.'[' oexpr ':' oexpr ':' oexpr ']'
-
- '(' shift 160
- '.' shift 161
- '[' shift 162
- . error
-
-
-state 123
- name: sym. (162)
-
- . reduce 162 (src line 1220)
-
-
-state 124
- fntype: LFUNC.'(' oarg_type_list_ocomma ')' fnres
-
- '(' shift 253
- . error
-
-
-state 125
- pexpr_no_paren: pseudocall. (134)
- non_dcl_stmt: LDEFER pseudocall. (267)
-
- '(' reduce 134 (src line 1046)
- '.' reduce 134 (src line 1046)
- '{' reduce 134 (src line 1046)
- '[' reduce 134 (src line 1046)
- . reduce 267 (src line 1836)
-
-
-state 126
- non_dcl_stmt: LGOTO new_name. (268)
-
- . reduce 268 (src line 1840)
-
-
-state 127
- non_dcl_stmt: LRETURN oexpr_list. (269)
-
- . reduce 269 (src line 1845)
-
-
-state 128
- expr_list: expr_list.',' expr
- oexpr_list: expr_list. (293)
-
- ',' shift 155
- . reduce 293 (src line 1971)
-
-
-state 129
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- expr_list: expr. (276)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 276 (src line 1902)
-
-
-state 130
- simple_stmt: expr LASOP.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 254
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 131
- simple_stmt: expr LINC. (53)
-
- . reduce 53 (src line 522)
-
-
-state 132
- simple_stmt: expr LDEC. (54)
-
- . reduce 54 (src line 528)
-
-
-state 133
- expr: expr LOROR.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 255
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 134
- expr: expr LANDAND.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 256
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 135
- expr: expr LEQ.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 257
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 136
- expr: expr LNE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 258
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 137
- expr: expr LLT.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 259
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 138
- expr: expr LLE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 260
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 139
- expr: expr LGE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 261
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 140
- expr: expr LGT.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 262
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 141
- expr: expr '+'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 263
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 142
- expr: expr '-'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 264
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 143
- expr: expr '|'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 265
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 144
- expr: expr '^'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 266
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 145
- expr: expr '*'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 267
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 146
- expr: expr '/'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 268
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 147
- expr: expr '%'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 269
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 148
- expr: expr '&'.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 270
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 149
- expr: expr LANDNOT.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 271
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 150
- expr: expr LLSH.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 272
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 151
- expr: expr LRSH.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 273
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 152
- expr: expr LCOMM.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 274
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 153
- simple_stmt: expr_list '='.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 275
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 154
- simple_stmt: expr_list LCOLAS.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 276
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 155
- expr_list: expr_list ','.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 277
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 156
- for_stmt: LFOR $$74.for_body
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRANGE shift 284
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- for_body goto 278
- for_header goto 279
- name goto 69
- osimple_stmt goto 280
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- range_stmt goto 281
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 283
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 157
- switch_stmt: LSWITCH $$88.if_header $$89 LBODY caseblock_list '}'
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- if_header goto 285
- name goto 69
- osimple_stmt goto 286
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 158
- select_stmt: LSELECT $$91.LBODY caseblock_list '}'
-
- LBODY shift 287
- . error
-
-
-state 159
- if_stmt: LIF $$78.if_header $$79 loop_body $$80 elseif_list else
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- if_header goto 288
- name goto 69
- osimple_stmt goto 286
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 160
- pseudocall: pexpr '('.')'
- pseudocall: pexpr '('.expr_or_type_list ocomma ')'
- pseudocall: pexpr '('.expr_or_type_list LDDD ocomma ')'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- ')' shift 289
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 173
- expr_or_type goto 291
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_or_type_list goto 290
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 161
- pexpr_no_paren: pexpr '.'.sym
- pexpr_no_paren: pexpr '.'.'(' expr_or_type ')'
- pexpr_no_paren: pexpr '.'.'(' LTYPE ')'
-
- LNAME shift 10
- '(' shift 293
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 292
- hidden_importsym goto 11
-
-state 162
- pexpr_no_paren: pexpr '['.expr ']'
- pexpr_no_paren: pexpr '['.oexpr ':' oexpr ']'
- pexpr_no_paren: pexpr '['.oexpr ':' oexpr ':' oexpr ']'
- oexpr: . (290)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 290 (src line 1961)
-
- sym goto 123
- expr goto 294
- fnliteral goto 73
- name goto 69
- oexpr goto 295
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 163
- uexpr: '*' uexpr. (115)
-
- . reduce 115 (src line 941)
-
-
-state 164
- uexpr: '&' uexpr. (116)
-
- . reduce 116 (src line 945)
-
-
-state 165
- uexpr: '+' uexpr. (117)
-
- . reduce 117 (src line 956)
-
-
-state 166
- uexpr: '-' uexpr. (118)
-
- . reduce 118 (src line 960)
-
-
-state 167
- uexpr: '!' uexpr. (119)
-
- . reduce 119 (src line 964)
-
-
-state 168
- uexpr: '~' uexpr. (120)
-
- . reduce 120 (src line 968)
-
-
-state 169
- uexpr: '^' uexpr. (121)
-
- . reduce 121 (src line 973)
-
-
-state 170
- uexpr: LCOMM uexpr. (122)
-
- . reduce 122 (src line 977)
-
-
-state 171
- pexpr_no_paren: pexpr_no_paren '{'.start_complit braced_keyval_list '}'
- start_complit: . (140)
-
- . reduce 140 (src line 1075)
-
- start_complit goto 296
-
-state 172
- pexpr_no_paren: '(' expr_or_type.')' '{' start_complit braced_keyval_list '}'
- pexpr: '(' expr_or_type.')'
-
- ')' shift 297
- . error
-
-
-state 173
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- expr_or_type: expr. (148)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 148 (src line 1131)
-
-
-state 174
- expr_or_type: non_expr_type. (149)
-
- . reduce 149 (src line 1133)
-
-
-state 175
- non_expr_type: recvchantype. (172)
-
- . reduce 172 (src line 1263)
-
-
-state 176
- non_expr_type: fntype. (173)
- convtype: fntype. (181)
- fnlitdcl: fntype. (215)
-
- error reduce 215 (src line 1546)
- LBODY reduce 215 (src line 1546)
- '(' reduce 181 (src line 1282)
- '{' reduce 215 (src line 1546)
- . reduce 173 (src line 1265)
-
-
-state 177
- non_expr_type: othertype. (174)
- convtype: othertype. (182)
- comptype: othertype. (183)
-
- LBODY reduce 183 (src line 1286)
- '(' reduce 182 (src line 1284)
- '{' reduce 183 (src line 1286)
- . reduce 174 (src line 1266)
-
-
-state 178
- uexpr: '*'.uexpr
- non_expr_type: '*'.non_expr_type
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- non_expr_type goto 298
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 163
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 179
- uexpr: LCOMM.uexpr
- recvchantype: LCOMM.LCHAN ntype
-
- LLITERAL shift 68
- LCHAN shift 299
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 170
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 180
- pexpr_no_paren: convtype '('.expr ocomma ')'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 300
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 181
- pexpr_no_paren: comptype lbrace.start_complit braced_keyval_list '}'
- start_complit: . (140)
-
- . reduce 140 (src line 1075)
-
- start_complit goto 301
-
-state 182
- lbrace: LBODY. (151)
-
- . reduce 151 (src line 1138)
-
-
-state 183
- lbrace: '{'. (152)
-
- . reduce 152 (src line 1143)
-
-
-state 184
- fnliteral: fnlitdcl lbrace.stmt_list '}'
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 303
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- stmt_list goto 302
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 185
- fnliteral: fnlitdcl error. (217)
-
- . reduce 217 (src line 1558)
-
-
-state 186
- othertype: '[' oexpr.']' ntype
-
- ']' shift 309
- . error
-
-
-state 187
- othertype: '[' LDDD.']' ntype
-
- ']' shift 310
- . error
-
-
-state 188
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- oexpr: expr. (291)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 291 (src line 1965)
-
-
-state 189
- othertype: LCHAN non_recvchantype. (193)
-
- . reduce 193 (src line 1320)
-
-
-state 190
- othertype: LCHAN LCOMM.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 311
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 191
- non_recvchantype: fntype. (176)
-
- . reduce 176 (src line 1272)
-
-
-state 192
- non_recvchantype: othertype. (177)
-
- . reduce 177 (src line 1274)
-
-
-state 193
- non_recvchantype: ptrtype. (178)
-
- . reduce 178 (src line 1275)
-
-
-state 194
- non_recvchantype: dotname. (179)
-
- . reduce 179 (src line 1276)
-
-
-state 195
- non_recvchantype: '('.ntype ')'
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 312
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 196
- ptrtype: '*'.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 313
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 197
- dotname: name. (189)
- dotname: name.'.' sym
-
- '.' shift 314
- . reduce 189 (src line 1296)
-
-
-state 198
- othertype: LMAP '['.ntype ']' ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 315
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 199
- structtype: LSTRUCT lbrace.structdcl_list osemi '}'
- structtype: LSTRUCT lbrace.'}'
-
- LNAME shift 325
- '*' shift 322
- '(' shift 321
- '}' shift 317
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 119
- packname goto 324
- embed goto 320
- new_name goto 323
- new_name_list goto 319
- structdcl goto 318
- structdcl_list goto 316
- hidden_importsym goto 11
-
-state 200
- interfacetype: LINTERFACE lbrace.interfacedcl_list osemi '}'
- interfacetype: LINTERFACE lbrace.'}'
-
- LNAME shift 325
- '(' shift 331
- '}' shift 327
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 119
- packname goto 330
- interfacedcl goto 328
- new_name goto 329
- interfacedcl_list goto 326
- hidden_importsym goto 11
-
-state 201
- import: LIMPORT '(' import_stmt_list.osemi ')'
- import_stmt_list: import_stmt_list.';' import_stmt
- osemi: . (286)
-
- ';' shift 333
- . reduce 286 (src line 1955)
-
- osemi goto 332
-
-state 202
- import: LIMPORT '(' ')'. (10)
-
- . reduce 10 (src line 233)
-
-
-state 203
- import_stmt_list: import_stmt. (13)
-
- . reduce 13 (src line 282)
-
-
-state 204
- import_stmt: import_here import_package.import_there
- $$21: . (21)
-
- . reduce 21 (src line 334)
-
- import_there goto 334
- $$21 goto 15
-
-state 205
- import_stmt: import_here import_there. (12)
-
- . reduce 12 (src line 271)
-
-
-state 206
- import_here: sym LLITERAL. (16)
-
- . reduce 16 (src line 294)
-
-
-state 207
- import_here: '.' LLITERAL. (17)
-
- . reduce 17 (src line 301)
-
-
-state 208
- hidden_importsym: '@' LLITERAL '.' LNAME. (160)
-
- . reduce 160 (src line 1190)
-
-
-state 209
- hidden_importsym: '@' LLITERAL '.' '?'. (161)
-
- . reduce 161 (src line 1205)
-
-
-state 210
- import_there: $$21 hidden_import_list '$' '$'. (22)
-
- . reduce 22 (src line 338)
-
-
-state 211
- hidden_import: LIMPORT LNAME.LLITERAL ';'
-
- LLITERAL shift 335
- . error
-
-
-state 212
- hidden_import: LVAR hidden_pkg_importsym.hidden_type ';'
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 336
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 213
- hidden_pkg_importsym: hidden_importsym. (310)
-
- . reduce 310 (src line 2047)
-
-
-state 214
- hidden_import: LCONST hidden_pkg_importsym.'=' hidden_constant ';'
- hidden_import: LCONST hidden_pkg_importsym.hidden_type '=' hidden_constant ';'
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '=' shift 350
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 351
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 215
- hidden_import: LTYPE hidden_pkgtype.hidden_type ';'
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 352
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 216
- hidden_pkgtype: hidden_pkg_importsym. (311)
-
- . reduce 311 (src line 2054)
-
-
-state 217
- hidden_import: LFUNC hidden_fndcl.fnbody ';'
- fnbody: . (210)
-
- '{' shift 242
- . reduce 210 (src line 1519)
-
- fnbody goto 353
-
-state 218
- hidden_fndcl: hidden_pkg_importsym.'(' ohidden_funarg_list ')' ohidden_funres
-
- '(' shift 354
- . error
-
-
-state 219
- hidden_fndcl: '('.hidden_funarg_list ')' sym '(' ohidden_funarg_list ')' ohidden_funres
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 355
-
-state 220
- common_dcl: LVAR '(' vardcl_list.osemi ')'
- vardcl_list: vardcl_list.';' vardcl
- osemi: . (286)
-
- ';' shift 359
- . reduce 286 (src line 1955)
-
- osemi goto 358
-
-state 221
- common_dcl: LVAR '(' ')'. (30)
-
- . reduce 30 (src line 376)
-
-
-state 222
- vardcl_list: vardcl. (220)
-
- . reduce 220 (src line 1585)
-
-
-state 223
- vardcl: dcl_name_list ntype. (39)
- vardcl: dcl_name_list ntype.'=' expr_list
-
- '=' shift 360
- . reduce 39 (src line 422)
-
-
-state 224
- vardcl: dcl_name_list '='.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 361
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 225
- dcl_name_list: dcl_name_list ','.dcl_name
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 105
- dcl_name goto 362
- hidden_importsym goto 11
-
-state 226
- ntype: recvchantype. (166)
-
- . reduce 166 (src line 1252)
-
-
-state 227
- ntype: fntype. (167)
-
- . reduce 167 (src line 1254)
-
-
-state 228
- ntype: othertype. (168)
-
- . reduce 168 (src line 1255)
-
-
-state 229
- ntype: ptrtype. (169)
-
- . reduce 169 (src line 1256)
-
-
-state 230
- ntype: dotname. (170)
-
- . reduce 170 (src line 1257)
-
-
-state 231
- ntype: '('.ntype ')'
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 363
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 232
- recvchantype: LCOMM.LCHAN ntype
-
- LCHAN shift 364
- . error
-
-
-state 233
- common_dcl: lconst '(' constdcl.osemi ')'
- common_dcl: lconst '(' constdcl.';' constdcl_list osemi ')'
- osemi: . (286)
-
- ';' shift 366
- . reduce 286 (src line 1955)
-
- osemi goto 365
-
-state 234
- common_dcl: lconst '(' ')'. (34)
-
- . reduce 34 (src line 398)
-
-
-state 235
- constdcl: dcl_name_list ntype.'=' expr_list
-
- '=' shift 367
- . error
-
-
-state 236
- constdcl: dcl_name_list '='.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 368
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 237
- common_dcl: LTYPE '(' typedcl_list.osemi ')'
- typedcl_list: typedcl_list.';' typedcl
- osemi: . (286)
-
- ';' shift 370
- . reduce 286 (src line 1955)
-
- osemi goto 369
-
-state 238
- common_dcl: LTYPE '(' ')'. (37)
-
- . reduce 37 (src line 411)
-
-
-state 239
- typedcl_list: typedcl. (224)
-
- . reduce 224 (src line 1599)
-
-
-state 240
- typedcl: typedclname ntype. (48)
-
- . reduce 48 (src line 466)
-
-
-state 241
- xfndcl: LFUNC fndcl fnbody. (204)
-
- . reduce 204 (src line 1380)
-
-
-state 242
- fnbody: '{'.stmt_list '}'
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 303
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- stmt_list goto 371
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 243
- fndcl: '(' oarg_type_list_ocomma.')' sym '(' oarg_type_list_ocomma ')' fnres
- fntype: LFUNC '(' oarg_type_list_ocomma.')' fnres
-
- ')' shift 372
- . error
-
-
-state 244
- arg_type_list: arg_type_list.',' arg_type
- oarg_type_list_ocomma: arg_type_list.ocomma
- ocomma: . (288)
-
- ',' shift 373
- . reduce 288 (src line 1958)
-
- ocomma goto 374
-
-state 245
- arg_type_list: arg_type. (247)
-
- . reduce 247 (src line 1759)
-
-
-state 246
- arg_type: name_or_type. (243)
-
- . reduce 243 (src line 1743)
-
-
-state 247
- name: sym. (162)
- arg_type: sym.name_or_type
- arg_type: sym.dotdotdot
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 162 (src line 1220)
-
- sym goto 123
- ntype goto 249
- dotname goto 230
- name goto 197
- name_or_type goto 375
- dotdotdot goto 376
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 248
- arg_type: dotdotdot. (246)
-
- . reduce 246 (src line 1757)
-
-
-state 249
- name_or_type: ntype. (150)
-
- . reduce 150 (src line 1135)
-
-
-state 250
- dotdotdot: LDDD. (164)
- dotdotdot: LDDD.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 164 (src line 1241)
-
- sym goto 123
- ntype goto 377
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 251
- fndcl: sym '('.oarg_type_list_ocomma ')' fnres
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 378
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 252
- non_dcl_stmt: labelname ':' $$261.stmt
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCASE reduce 251 (src line 1781)
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFAULT reduce 251 (src line 1781)
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 379
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 253
- fntype: LFUNC '('.oarg_type_list_ocomma ')' fnres
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 380
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 254
- simple_stmt: expr LASOP expr. (50)
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 50 (src line 487)
-
-
-state 255
- expr: expr.LOROR expr
- expr: expr LOROR expr. (94)
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 94 (src line 857)
-
-
-state 256
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr LANDAND expr. (95)
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 95 (src line 861)
-
-
-state 257
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr LEQ expr. (96)
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 96 (src line 865)
-
-
-state 258
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr LNE expr. (97)
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 97 (src line 869)
-
-
-state 259
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr LLT expr. (98)
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 98 (src line 873)
-
-
-state 260
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr LLE expr. (99)
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 99 (src line 877)
-
-
-state 261
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr LGE expr. (100)
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 100 (src line 881)
-
-
-state 262
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr LGT expr. (101)
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 101 (src line 885)
-
-
-state 263
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr '+' expr. (102)
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 102 (src line 889)
-
-
-state 264
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr '-' expr. (103)
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 103 (src line 893)
-
-
-state 265
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr '|' expr. (104)
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 104 (src line 897)
-
-
-state 266
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr '^' expr. (105)
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDNOT shift 149
- LLSH shift 150
- LRSH shift 151
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 105 (src line 901)
-
-
-state 267
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr '*' expr. (106)
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 106 (src line 905)
-
-
-state 268
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr '/' expr. (107)
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 107 (src line 909)
-
-
-state 269
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr '%' expr. (108)
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 108 (src line 913)
-
-
-state 270
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr '&' expr. (109)
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 109 (src line 917)
-
-
-state 271
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr LANDNOT expr. (110)
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 110 (src line 921)
-
-
-state 272
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr LLSH expr. (111)
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- . reduce 111 (src line 925)
-
-
-state 273
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr LRSH expr. (112)
- expr: expr.LCOMM expr
-
- . reduce 112 (src line 929)
-
-
-state 274
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- expr: expr LCOMM expr. (113)
-
- LANDAND shift 134
- LANDNOT shift 149
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 113 (src line 934)
-
-
-state 275
- simple_stmt: expr_list '=' expr_list. (51)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 51 (src line 492)
-
-
-state 276
- simple_stmt: expr_list LCOLAS expr_list. (52)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 52 (src line 504)
-
-
-state 277
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- expr_list: expr_list ',' expr. (277)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 277 (src line 1907)
-
-
-state 278
- for_stmt: LFOR $$74 for_body. (75)
-
- . reduce 75 (src line 726)
-
-
-state 279
- for_body: for_header.loop_body
-
- LBODY shift 382
- . error
-
- loop_body goto 381
-
-state 280
- for_header: osimple_stmt.';' osimple_stmt ';' osimple_stmt
- for_header: osimple_stmt. (71)
-
- ';' shift 383
- . reduce 71 (src line 706)
-
-
-state 281
- for_header: range_stmt. (72)
-
- . reduce 72 (src line 712)
-
-
-state 282
- osimple_stmt: simple_stmt. (295)
-
- . reduce 295 (src line 1977)
-
-
-state 283
- simple_stmt: expr_list.'=' expr_list
- simple_stmt: expr_list.LCOLAS expr_list
- range_stmt: expr_list.'=' LRANGE expr
- range_stmt: expr_list.LCOLAS LRANGE expr
- expr_list: expr_list.',' expr
-
- LCOLAS shift 385
- '=' shift 384
- ',' shift 155
- . error
-
-
-state 284
- range_stmt: LRANGE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 386
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 285
- switch_stmt: LSWITCH $$88 if_header.$$89 LBODY caseblock_list '}'
- $$89: . (89)
-
- . reduce 89 (src line 821)
-
- $$89 goto 387
-
-state 286
- if_header: osimple_stmt. (76)
- if_header: osimple_stmt.';' osimple_stmt
-
- ';' shift 388
- . reduce 76 (src line 732)
-
-
-state 287
- select_stmt: LSELECT $$91 LBODY.caseblock_list '}'
- caseblock_list: . (63)
-
- . reduce 63 (src line 652)
-
- caseblock_list goto 389
-
-state 288
- if_stmt: LIF $$78 if_header.$$79 loop_body $$80 elseif_list else
- $$79: . (79)
-
- . reduce 79 (src line 755)
-
- $$79 goto 390
-
-state 289
- pseudocall: pexpr '(' ')'. (123)
-
- . reduce 123 (src line 986)
-
-
-state 290
- pseudocall: pexpr '(' expr_or_type_list.ocomma ')'
- pseudocall: pexpr '(' expr_or_type_list.LDDD ocomma ')'
- expr_or_type_list: expr_or_type_list.',' expr_or_type
- ocomma: . (288)
-
- LDDD shift 392
- ',' shift 393
- . reduce 288 (src line 1958)
-
- ocomma goto 391
-
-state 291
- expr_or_type_list: expr_or_type. (278)
-
- . reduce 278 (src line 1912)
-
-
-state 292
- pexpr_no_paren: pexpr '.' sym. (128)
-
- . reduce 128 (src line 1009)
-
-
-state 293
- pexpr_no_paren: pexpr '.' '('.expr_or_type ')'
- pexpr_no_paren: pexpr '.' '('.LTYPE ')'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LTYPE shift 395
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 173
- expr_or_type goto 394
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 294
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- pexpr_no_paren: pexpr '[' expr.']'
- oexpr: expr. (291)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- ']' shift 396
- . reduce 291 (src line 1965)
-
-
-state 295
- pexpr_no_paren: pexpr '[' oexpr.':' oexpr ']'
- pexpr_no_paren: pexpr '[' oexpr.':' oexpr ':' oexpr ']'
-
- ':' shift 397
- . error
-
-
-state 296
- pexpr_no_paren: pexpr_no_paren '{' start_complit.braced_keyval_list '}'
- braced_keyval_list: . (284)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 284 (src line 1943)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 401
- fnliteral goto 73
- keyval goto 400
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- keyval_list goto 399
- braced_keyval_list goto 398
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 297
- pexpr_no_paren: '(' expr_or_type ')'.'{' start_complit braced_keyval_list '}'
- pexpr: '(' expr_or_type ')'. (147)
-
- '{' shift 404
- . reduce 147 (src line 1118)
-
-
-state 298
- non_expr_type: '*' non_expr_type. (175)
-
- . reduce 175 (src line 1267)
-
-
-state 299
- othertype: LCHAN.non_recvchantype
- othertype: LCHAN.LCOMM ntype
- recvchantype: LCOMM LCHAN.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 405
- '*' shift 196
- '(' shift 411
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 406
- dotname goto 410
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 409
- recvchantype goto 226
- non_recvchantype goto 189
- othertype goto 408
- fntype goto 407
- hidden_importsym goto 11
-
-state 300
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- pexpr_no_paren: convtype '(' expr.ocomma ')'
- ocomma: . (288)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- ',' shift 413
- . reduce 288 (src line 1958)
-
- ocomma goto 412
-
-state 301
- pexpr_no_paren: comptype lbrace start_complit.braced_keyval_list '}'
- braced_keyval_list: . (284)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 284 (src line 1943)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 401
- fnliteral goto 73
- keyval goto 400
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- keyval_list goto 399
- braced_keyval_list goto 414
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 302
- fnliteral: fnlitdcl lbrace stmt_list.'}'
- stmt_list: stmt_list.';' stmt
-
- ';' shift 416
- '}' shift 415
- . error
-
-
-state 303
- stmt_list: stmt. (270)
-
- . reduce 270 (src line 1866)
-
-
-state 304
- stmt: compound_stmt. (252)
-
- . reduce 252 (src line 1785)
-
-
-state 305
- stmt: common_dcl. (253)
-
- . reduce 253 (src line 1786)
-
-
-state 306
- stmt: non_dcl_stmt. (254)
-
- . reduce 254 (src line 1790)
-
-
-state 307
- stmt: error. (255)
-
- . reduce 255 (src line 1791)
-
-
-state 308
- compound_stmt: '{'.$$59 stmt_list '}'
- $$59: . (59)
-
- . reduce 59 (src line 606)
-
- $$59 goto 417
-
-state 309
- othertype: '[' oexpr ']'.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 418
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 310
- othertype: '[' LDDD ']'.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 419
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 311
- othertype: LCHAN LCOMM ntype. (194)
-
- . reduce 194 (src line 1325)
-
-
-state 312
- non_recvchantype: '(' ntype.')'
-
- ')' shift 420
- . error
-
-
-state 313
- ptrtype: '*' ntype. (198)
-
- . reduce 198 (src line 1337)
-
-
-state 314
- dotname: name '.'.sym
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 421
- hidden_importsym goto 11
-
-state 315
- othertype: LMAP '[' ntype.']' ntype
-
- ']' shift 422
- . error
-
-
-state 316
- structtype: LSTRUCT lbrace structdcl_list.osemi '}'
- structdcl_list: structdcl_list.';' structdcl
- osemi: . (286)
-
- ';' shift 424
- . reduce 286 (src line 1955)
-
- osemi goto 423
-
-state 317
- structtype: LSTRUCT lbrace '}'. (201)
-
- . reduce 201 (src line 1357)
-
-
-state 318
- structdcl_list: structdcl. (226)
-
- . reduce 226 (src line 1609)
-
-
-state 319
- structdcl: new_name_list.ntype oliteral
- new_name_list: new_name_list.',' new_name
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- ',' shift 426
- . error
-
- sym goto 123
- ntype goto 425
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 320
- structdcl: embed.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 427
-
-state 321
- structdcl: '('.embed ')' oliteral
- structdcl: '('.'*' embed ')' oliteral
-
- LNAME shift 431
- '*' shift 430
- . error
-
- packname goto 324
- embed goto 429
-
-state 322
- structdcl: '*'.embed oliteral
- structdcl: '*'.'(' embed ')' oliteral
-
- LNAME shift 431
- '(' shift 433
- . error
-
- packname goto 324
- embed goto 432
-
-state 323
- new_name_list: new_name. (272)
-
- . reduce 272 (src line 1882)
-
-
-state 324
- embed: packname. (238)
-
- . reduce 238 (src line 1708)
-
-
-state 325
- sym: LNAME. (157)
- packname: LNAME. (236)
- packname: LNAME.'.' sym
-
- LLITERAL reduce 236 (src line 1683)
- ';' reduce 236 (src line 1683)
- '.' shift 434
- '}' reduce 236 (src line 1683)
- . reduce 157 (src line 1175)
-
-
-state 326
- interfacetype: LINTERFACE lbrace interfacedcl_list.osemi '}'
- interfacedcl_list: interfacedcl_list.';' interfacedcl
- osemi: . (286)
-
- ';' shift 436
- . reduce 286 (src line 1955)
-
- osemi goto 435
-
-state 327
- interfacetype: LINTERFACE lbrace '}'. (203)
-
- . reduce 203 (src line 1370)
-
-
-state 328
- interfacedcl_list: interfacedcl. (228)
-
- . reduce 228 (src line 1616)
-
-
-state 329
- interfacedcl: new_name.indcl
-
- '(' shift 438
- . error
-
- indcl goto 437
-
-state 330
- interfacedcl: packname. (240)
-
- . reduce 240 (src line 1720)
-
-
-state 331
- interfacedcl: '('.packname ')'
-
- LNAME shift 431
- . error
-
- packname goto 439
-
-state 332
- import: LIMPORT '(' import_stmt_list osemi.')'
-
- ')' shift 440
- . error
-
-
-state 333
- import_stmt_list: import_stmt_list ';'.import_stmt
- osemi: ';'. (287)
-
- LLITERAL shift 88
- LNAME shift 10
- '.' shift 90
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- import_here goto 87
- sym goto 89
- hidden_importsym goto 11
- import_stmt goto 441
-
-state 334
- import_stmt: import_here import_package import_there. (11)
-
- . reduce 11 (src line 235)
-
-
-state 335
- hidden_import: LIMPORT LNAME LLITERAL.';'
-
- ';' shift 442
- . error
-
-
-state 336
- hidden_import: LVAR hidden_pkg_importsym hidden_type.';'
-
- ';' shift 443
- . error
-
-
-state 337
- hidden_type: hidden_type_misc. (312)
-
- . reduce 312 (src line 2065)
-
-
-state 338
- hidden_type: hidden_type_recv_chan. (313)
-
- . reduce 313 (src line 2067)
-
-
-state 339
- hidden_type: hidden_type_func. (314)
-
- . reduce 314 (src line 2068)
-
-
-state 340
- hidden_type_misc: hidden_importsym. (317)
-
- . reduce 317 (src line 2074)
-
-
-state 341
- hidden_type_misc: LNAME. (318)
-
- . reduce 318 (src line 2079)
-
-
-state 342
- hidden_type_misc: '['.']' hidden_type
- hidden_type_misc: '['.LLITERAL ']' hidden_type
-
- LLITERAL shift 445
- ']' shift 444
- . error
-
-
-state 343
- hidden_type_misc: LMAP.'[' hidden_type ']' hidden_type
-
- '[' shift 446
- . error
-
-
-state 344
- hidden_type_misc: LSTRUCT.'{' ohidden_structdcl_list '}'
-
- '{' shift 447
- . error
-
-
-state 345
- hidden_type_misc: LINTERFACE.'{' ohidden_interfacedcl_list '}'
-
- '{' shift 448
- . error
-
-
-state 346
- hidden_type_misc: '*'.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 449
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 347
- hidden_type_misc: LCHAN.hidden_type_non_recv_chan
- hidden_type_misc: LCHAN.'(' hidden_type_recv_chan ')'
- hidden_type_misc: LCHAN.LCOMM hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 452
- '*' shift 346
- '(' shift 451
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type_misc goto 453
- hidden_type_func goto 454
- hidden_type_non_recv_chan goto 450
-
-state 348
- hidden_type_recv_chan: LCOMM.LCHAN hidden_type
-
- LCHAN shift 455
- . error
-
-
-state 349
- hidden_type_func: LFUNC.'(' ohidden_funarg_list ')' ohidden_funres
-
- '(' shift 456
- . error
-
-
-state 350
- hidden_import: LCONST hidden_pkg_importsym '='.hidden_constant ';'
-
- LLITERAL shift 460
- LNAME shift 10
- '-' shift 461
- '(' shift 459
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 462
- hidden_importsym goto 11
- hidden_constant goto 457
- hidden_literal goto 458
-
-state 351
- hidden_import: LCONST hidden_pkg_importsym hidden_type.'=' hidden_constant ';'
-
- '=' shift 463
- . error
-
-
-state 352
- hidden_import: LTYPE hidden_pkgtype hidden_type.';'
-
- ';' shift 464
- . error
-
-
-state 353
- hidden_import: LFUNC hidden_fndcl fnbody.';'
-
- ';' shift 465
- . error
-
-
-state 354
- hidden_fndcl: hidden_pkg_importsym '('.ohidden_funarg_list ')' ohidden_funres
- ohidden_funarg_list: . (296)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 296 (src line 1979)
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 467
- ohidden_funarg_list goto 466
-
-state 355
- hidden_fndcl: '(' hidden_funarg_list.')' sym '(' ohidden_funarg_list ')' ohidden_funres
- hidden_funarg_list: hidden_funarg_list.',' hidden_funarg
-
- ')' shift 468
- ',' shift 469
- . error
-
-
-state 356
- hidden_funarg_list: hidden_funarg. (346)
-
- . reduce 346 (src line 2274)
-
-
-state 357
- hidden_funarg: sym.hidden_type oliteral
- hidden_funarg: sym.LDDD hidden_type oliteral
-
- LCHAN shift 347
- LDDD shift 471
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 470
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 358
- common_dcl: LVAR '(' vardcl_list osemi.')'
-
- ')' shift 472
- . error
-
-
-state 359
- vardcl_list: vardcl_list ';'.vardcl
- osemi: ';'. (287)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 103
- vardcl goto 473
- hidden_importsym goto 11
-
-state 360
- vardcl: dcl_name_list ntype '='.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 474
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 361
- vardcl: dcl_name_list '=' expr_list. (41)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 41 (src line 431)
-
-
-state 362
- dcl_name_list: dcl_name_list ',' dcl_name. (275)
-
- . reduce 275 (src line 1897)
-
-
-state 363
- ntype: '(' ntype.')'
-
- ')' shift 475
- . error
-
-
-state 364
- recvchantype: LCOMM LCHAN.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 406
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 365
- common_dcl: lconst '(' constdcl osemi.')'
-
- ')' shift 476
- . error
-
-
-state 366
- common_dcl: lconst '(' constdcl ';'.constdcl_list osemi ')'
- osemi: ';'. (287)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 480
- constdcl goto 479
- constdcl1 goto 478
- constdcl_list goto 477
- hidden_importsym goto 11
-
-state 367
- constdcl: dcl_name_list ntype '='.expr_list
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 481
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 368
- constdcl: dcl_name_list '=' expr_list. (43)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 43 (src line 441)
-
-
-state 369
- common_dcl: LTYPE '(' typedcl_list osemi.')'
-
- ')' shift 482
- . error
-
-
-state 370
- typedcl_list: typedcl_list ';'.typedcl
- osemi: ';'. (287)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 112
- typedclname goto 111
- typedcl goto 483
- hidden_importsym goto 11
-
-state 371
- fnbody: '{' stmt_list.'}'
- stmt_list: stmt_list.';' stmt
-
- ';' shift 416
- '}' shift 484
- . error
-
-
-state 372
- fndcl: '(' oarg_type_list_ocomma ')'.sym '(' oarg_type_list_ocomma ')' fnres
- fntype: LFUNC '(' oarg_type_list_ocomma ')'.fnres
- fnres: . (212)
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 488
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 212 (src line 1531)
-
- sym goto 485
- dotname goto 493
- name goto 197
- fnres goto 486
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 492
- recvchantype goto 489
- othertype goto 491
- fnret_type goto 487
- fntype goto 490
- hidden_importsym goto 11
-
-state 373
- arg_type_list: arg_type_list ','.arg_type
- ocomma: ','. (289)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 289 (src line 1959)
-
- sym goto 247
- ntype goto 249
- arg_type goto 494
- dotname goto 230
- name goto 197
- name_or_type goto 246
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 374
- oarg_type_list_ocomma: arg_type_list ocomma. (250)
-
- . reduce 250 (src line 1773)
-
-
-state 375
- arg_type: sym name_or_type. (244)
-
- . reduce 244 (src line 1745)
-
-
-state 376
- arg_type: sym dotdotdot. (245)
-
- . reduce 245 (src line 1751)
-
-
-state 377
- dotdotdot: LDDD ntype. (165)
-
- . reduce 165 (src line 1247)
-
-
-state 378
- fndcl: sym '(' oarg_type_list_ocomma.')' fnres
-
- ')' shift 495
- . error
-
-
-state 379
- non_dcl_stmt: labelname ':' $$261 stmt. (262)
-
- . reduce 262 (src line 1807)
-
-
-state 380
- fntype: LFUNC '(' oarg_type_list_ocomma.')' fnres
-
- ')' shift 496
- . error
-
-
-state 381
- for_body: for_header loop_body. (73)
-
- . reduce 73 (src line 714)
-
-
-state 382
- loop_body: LBODY.$$65 stmt_list '}'
- $$65: . (65)
-
- . reduce 65 (src line 661)
-
- $$65 goto 497
-
-state 383
- for_header: osimple_stmt ';'.osimple_stmt ';' osimple_stmt
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- name goto 69
- osimple_stmt goto 498
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 384
- simple_stmt: expr_list '='.expr_list
- range_stmt: expr_list '='.LRANGE expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRANGE shift 499
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 275
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 385
- simple_stmt: expr_list LCOLAS.expr_list
- range_stmt: expr_list LCOLAS.LRANGE expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRANGE shift 500
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 129
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_list goto 276
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 386
- range_stmt: LRANGE expr. (69)
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 69 (src line 686)
-
-
-state 387
- switch_stmt: LSWITCH $$88 if_header $$89.LBODY caseblock_list '}'
-
- LBODY shift 501
- . error
-
-
-state 388
- if_header: osimple_stmt ';'.osimple_stmt
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- name goto 69
- osimple_stmt goto 502
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 389
- caseblock_list: caseblock_list.caseblock
- select_stmt: LSELECT $$91 LBODY caseblock_list.'}'
-
- LCASE shift 506
- LDEFAULT shift 507
- '}' shift 504
- . error
-
- case goto 505
- caseblock goto 503
-
-state 390
- if_stmt: LIF $$78 if_header $$79.loop_body $$80 elseif_list else
-
- LBODY shift 382
- . error
-
- loop_body goto 508
-
-state 391
- pseudocall: pexpr '(' expr_or_type_list ocomma.')'
-
- ')' shift 509
- . error
-
-
-state 392
- pseudocall: pexpr '(' expr_or_type_list LDDD.ocomma ')'
- ocomma: . (288)
-
- ',' shift 413
- . reduce 288 (src line 1958)
-
- ocomma goto 510
-
-state 393
- expr_or_type_list: expr_or_type_list ','.expr_or_type
- ocomma: ','. (289)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 289 (src line 1959)
-
- sym goto 123
- expr goto 173
- expr_or_type goto 511
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 394
- pexpr_no_paren: pexpr '.' '(' expr_or_type.')'
-
- ')' shift 512
- . error
-
-
-state 395
- pexpr_no_paren: pexpr '.' '(' LTYPE.')'
-
- ')' shift 513
- . error
-
-
-state 396
- pexpr_no_paren: pexpr '[' expr ']'. (131)
-
- . reduce 131 (src line 1028)
-
-
-state 397
- pexpr_no_paren: pexpr '[' oexpr ':'.oexpr ']'
- pexpr_no_paren: pexpr '[' oexpr ':'.oexpr ':' oexpr ']'
- oexpr: . (290)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 290 (src line 1961)
-
- sym goto 123
- expr goto 188
- fnliteral goto 73
- name goto 69
- oexpr goto 514
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 398
- pexpr_no_paren: pexpr_no_paren '{' start_complit braced_keyval_list.'}'
-
- '}' shift 515
- . error
-
-
-state 399
- keyval_list: keyval_list.',' keyval
- keyval_list: keyval_list.',' bare_complitexpr
- braced_keyval_list: keyval_list.ocomma
- ocomma: . (288)
-
- ',' shift 516
- . reduce 288 (src line 1958)
-
- ocomma goto 517
-
-state 400
- keyval_list: keyval. (280)
-
- . reduce 280 (src line 1925)
-
-
-state 401
- keyval_list: bare_complitexpr. (281)
-
- . reduce 281 (src line 1930)
-
-
-state 402
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- keyval: expr.':' complitexpr
- bare_complitexpr: expr. (142)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- ':' shift 518
- . reduce 142 (src line 1088)
-
-
-state 403
- bare_complitexpr: '{'.start_complit braced_keyval_list '}'
- start_complit: . (140)
-
- . reduce 140 (src line 1075)
-
- start_complit goto 519
-
-state 404
- pexpr_no_paren: '(' expr_or_type ')' '{'.start_complit braced_keyval_list '}'
- start_complit: . (140)
-
- . reduce 140 (src line 1075)
-
- start_complit goto 520
-
-state 405
- othertype: LCHAN LCOMM.ntype
- recvchantype: LCOMM.LCHAN ntype
-
- LCHAN shift 299
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 311
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 406
- recvchantype: LCOMM LCHAN ntype. (199)
-
- . reduce 199 (src line 1343)
-
-
-state 407
- ntype: fntype. (167)
- non_recvchantype: fntype. (176)
-
- LBODY reduce 176 (src line 1272)
- '(' reduce 176 (src line 1272)
- '{' reduce 176 (src line 1272)
- . reduce 167 (src line 1254)
-
-
-state 408
- ntype: othertype. (168)
- non_recvchantype: othertype. (177)
-
- LBODY reduce 177 (src line 1274)
- '(' reduce 177 (src line 1274)
- '{' reduce 177 (src line 1274)
- . reduce 168 (src line 1255)
-
-
-state 409
- ntype: ptrtype. (169)
- non_recvchantype: ptrtype. (178)
-
- LBODY reduce 178 (src line 1275)
- '(' reduce 178 (src line 1275)
- '{' reduce 178 (src line 1275)
- . reduce 169 (src line 1256)
-
-
-state 410
- ntype: dotname. (170)
- non_recvchantype: dotname. (179)
-
- LBODY reduce 179 (src line 1276)
- '(' reduce 179 (src line 1276)
- '{' reduce 179 (src line 1276)
- . reduce 170 (src line 1257)
-
-
-state 411
- ntype: '('.ntype ')'
- non_recvchantype: '('.ntype ')'
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 521
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 412
- pexpr_no_paren: convtype '(' expr ocomma.')'
-
- ')' shift 522
- . error
-
-
-state 413
- ocomma: ','. (289)
-
- . reduce 289 (src line 1959)
-
-
-state 414
- pexpr_no_paren: comptype lbrace start_complit braced_keyval_list.'}'
-
- '}' shift 523
- . error
-
-
-state 415
- fnliteral: fnlitdcl lbrace stmt_list '}'. (216)
-
- . reduce 216 (src line 1552)
-
-
-state 416
- stmt_list: stmt_list ';'.stmt
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCASE reduce 251 (src line 1781)
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFAULT reduce 251 (src line 1781)
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 524
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 417
- compound_stmt: '{' $$59.stmt_list '}'
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 303
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- stmt_list goto 525
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 418
- othertype: '[' oexpr ']' ntype. (191)
-
- . reduce 191 (src line 1310)
-
-
-state 419
- othertype: '[' LDDD ']' ntype. (192)
-
- . reduce 192 (src line 1315)
-
-
-state 420
- non_recvchantype: '(' ntype ')'. (180)
-
- . reduce 180 (src line 1277)
-
-
-state 421
- dotname: name '.' sym. (190)
-
- . reduce 190 (src line 1298)
-
-
-state 422
- othertype: LMAP '[' ntype ']'.ntype
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- ntype goto 526
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 423
- structtype: LSTRUCT lbrace structdcl_list osemi.'}'
-
- '}' shift 527
- . error
-
-
-state 424
- structdcl_list: structdcl_list ';'.structdcl
- osemi: ';'. (287)
-
- LNAME shift 325
- '*' shift 322
- '(' shift 321
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 119
- packname goto 324
- embed goto 320
- new_name goto 323
- new_name_list goto 319
- structdcl goto 528
- hidden_importsym goto 11
-
-state 425
- structdcl: new_name_list ntype.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 529
-
-state 426
- new_name_list: new_name_list ','.new_name
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 119
- new_name goto 530
- hidden_importsym goto 11
-
-state 427
- structdcl: embed oliteral. (231)
-
- . reduce 231 (src line 1651)
-
-
-state 428
- oliteral: LLITERAL. (303)
-
- . reduce 303 (src line 2001)
-
-
-state 429
- structdcl: '(' embed.')' oliteral
-
- ')' shift 531
- . error
-
-
-state 430
- structdcl: '(' '*'.embed ')' oliteral
-
- LNAME shift 431
- . error
-
- packname goto 324
- embed goto 532
-
-state 431
- packname: LNAME. (236)
- packname: LNAME.'.' sym
-
- '.' shift 434
- . reduce 236 (src line 1683)
-
-
-state 432
- structdcl: '*' embed.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 533
-
-state 433
- structdcl: '*' '('.embed ')' oliteral
-
- LNAME shift 431
- . error
-
- packname goto 324
- embed goto 534
-
-state 434
- packname: LNAME '.'.sym
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 535
- hidden_importsym goto 11
-
-state 435
- interfacetype: LINTERFACE lbrace interfacedcl_list osemi.'}'
-
- '}' shift 536
- . error
-
-
-state 436
- interfacedcl_list: interfacedcl_list ';'.interfacedcl
- osemi: ';'. (287)
-
- LNAME shift 325
- '(' shift 331
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 119
- packname goto 330
- interfacedcl goto 537
- new_name goto 329
- hidden_importsym goto 11
-
-state 437
- interfacedcl: new_name indcl. (239)
-
- . reduce 239 (src line 1714)
-
-
-state 438
- indcl: '('.oarg_type_list_ocomma ')' fnres
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 538
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 439
- interfacedcl: '(' packname.')'
-
- ')' shift 539
- . error
-
-
-state 440
- import: LIMPORT '(' import_stmt_list osemi ')'. (9)
-
- . reduce 9 (src line 232)
-
-
-state 441
- import_stmt_list: import_stmt_list ';' import_stmt. (14)
-
- . reduce 14 (src line 284)
-
-
-state 442
- hidden_import: LIMPORT LNAME LLITERAL ';'. (304)
-
- . reduce 304 (src line 2006)
-
-
-state 443
- hidden_import: LVAR hidden_pkg_importsym hidden_type ';'. (305)
-
- . reduce 305 (src line 2011)
-
-
-state 444
- hidden_type_misc: '[' ']'.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 540
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 445
- hidden_type_misc: '[' LLITERAL.']' hidden_type
-
- ']' shift 541
- . error
-
-
-state 446
- hidden_type_misc: LMAP '['.hidden_type ']' hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 542
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 447
- hidden_type_misc: LSTRUCT '{'.ohidden_structdcl_list '}'
- ohidden_structdcl_list: . (298)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 298 (src line 1985)
-
- sym goto 546
- hidden_importsym goto 11
- hidden_structdcl goto 545
- hidden_structdcl_list goto 544
- ohidden_structdcl_list goto 543
-
-state 448
- hidden_type_misc: LINTERFACE '{'.ohidden_interfacedcl_list '}'
- ohidden_interfacedcl_list: . (300)
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 552
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '?' shift 12
- '@' shift 13
- . reduce 300 (src line 1991)
-
- sym goto 550
- hidden_importsym goto 553
- hidden_interfacedcl goto 549
- hidden_interfacedcl_list goto 548
- ohidden_interfacedcl_list goto 547
- hidden_type goto 551
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 449
- hidden_type_misc: '*' hidden_type. (324)
-
- . reduce 324 (src line 2110)
-
-
-state 450
- hidden_type_misc: LCHAN hidden_type_non_recv_chan. (325)
-
- . reduce 325 (src line 2114)
-
-
-state 451
- hidden_type_misc: LCHAN '('.hidden_type_recv_chan ')'
-
- LCOMM shift 348
- . error
-
- hidden_type_recv_chan goto 554
-
-state 452
- hidden_type_misc: LCHAN LCOMM.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 555
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 453
- hidden_type_non_recv_chan: hidden_type_misc. (315)
-
- . reduce 315 (src line 2070)
-
-
-state 454
- hidden_type_non_recv_chan: hidden_type_func. (316)
-
- . reduce 316 (src line 2072)
-
-
-state 455
- hidden_type_recv_chan: LCOMM LCHAN.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 556
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 456
- hidden_type_func: LFUNC '('.ohidden_funarg_list ')' ohidden_funres
- ohidden_funarg_list: . (296)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 296 (src line 1979)
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 467
- ohidden_funarg_list goto 557
-
-state 457
- hidden_import: LCONST hidden_pkg_importsym '=' hidden_constant.';'
-
- ';' shift 558
- . error
-
-
-state 458
- hidden_constant: hidden_literal. (342)
-
- . reduce 342 (src line 2257)
-
-
-state 459
- hidden_constant: '('.hidden_literal '+' hidden_literal ')'
-
- LLITERAL shift 460
- LNAME shift 10
- '-' shift 461
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 462
- hidden_importsym goto 11
- hidden_literal goto 559
-
-state 460
- hidden_literal: LLITERAL. (339)
-
- . reduce 339 (src line 2226)
-
-
-state 461
- hidden_literal: '-'.LLITERAL
-
- LLITERAL shift 560
- . error
-
-
-state 462
- hidden_literal: sym. (341)
-
- . reduce 341 (src line 2249)
-
-
-state 463
- hidden_import: LCONST hidden_pkg_importsym hidden_type '='.hidden_constant ';'
-
- LLITERAL shift 460
- LNAME shift 10
- '-' shift 461
- '(' shift 459
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 462
- hidden_importsym goto 11
- hidden_constant goto 561
- hidden_literal goto 458
-
-state 464
- hidden_import: LTYPE hidden_pkgtype hidden_type ';'. (308)
-
- . reduce 308 (src line 2023)
-
-
-state 465
- hidden_import: LFUNC hidden_fndcl fnbody ';'. (309)
-
- . reduce 309 (src line 2027)
-
-
-state 466
- hidden_fndcl: hidden_pkg_importsym '(' ohidden_funarg_list.')' ohidden_funres
-
- ')' shift 562
- . error
-
-
-state 467
- ohidden_funarg_list: hidden_funarg_list. (297)
- hidden_funarg_list: hidden_funarg_list.',' hidden_funarg
-
- ',' shift 469
- . reduce 297 (src line 1983)
-
-
-state 468
- hidden_fndcl: '(' hidden_funarg_list ')'.sym '(' ohidden_funarg_list ')' ohidden_funres
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 563
- hidden_importsym goto 11
-
-state 469
- hidden_funarg_list: hidden_funarg_list ','.hidden_funarg
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 564
-
-state 470
- hidden_funarg: sym hidden_type.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 565
-
-state 471
- hidden_funarg: sym LDDD.hidden_type oliteral
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 566
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 472
- common_dcl: LVAR '(' vardcl_list osemi ')'. (29)
-
- . reduce 29 (src line 372)
-
-
-state 473
- vardcl_list: vardcl_list ';' vardcl. (221)
-
- . reduce 221 (src line 1587)
-
-
-state 474
- vardcl: dcl_name_list ntype '=' expr_list. (40)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 40 (src line 427)
-
-
-state 475
- ntype: '(' ntype ')'. (171)
-
- . reduce 171 (src line 1258)
-
-
-state 476
- common_dcl: lconst '(' constdcl osemi ')'. (32)
-
- . reduce 32 (src line 386)
-
-
-state 477
- common_dcl: lconst '(' constdcl ';' constdcl_list.osemi ')'
- constdcl_list: constdcl_list.';' constdcl1
- osemi: . (286)
-
- ';' shift 568
- . reduce 286 (src line 1955)
-
- osemi goto 567
-
-state 478
- constdcl_list: constdcl1. (222)
-
- . reduce 222 (src line 1592)
-
-
-state 479
- constdcl1: constdcl. (44)
-
- . reduce 44 (src line 446)
-
-
-state 480
- constdcl: dcl_name_list.ntype '=' expr_list
- constdcl: dcl_name_list.'=' expr_list
- constdcl1: dcl_name_list.ntype
- constdcl1: dcl_name_list. (46)
- dcl_name_list: dcl_name_list.',' dcl_name
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '=' shift 236
- '[' shift 77
- '?' shift 12
- '@' shift 13
- ',' shift 225
- . reduce 46 (src line 452)
-
- sym goto 123
- ntype goto 569
- dotname goto 230
- name goto 197
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 481
- constdcl: dcl_name_list ntype '=' expr_list. (42)
- expr_list: expr_list.',' expr
-
- ',' shift 155
- . reduce 42 (src line 436)
-
-
-state 482
- common_dcl: LTYPE '(' typedcl_list osemi ')'. (36)
-
- . reduce 36 (src line 407)
-
-
-state 483
- typedcl_list: typedcl_list ';' typedcl. (225)
-
- . reduce 225 (src line 1604)
-
-
-state 484
- fnbody: '{' stmt_list '}'. (211)
-
- . reduce 211 (src line 1523)
-
-
-state 485
- name: sym. (162)
- fndcl: '(' oarg_type_list_ocomma ')' sym.'(' oarg_type_list_ocomma ')' fnres
-
- '(' shift 570
- . reduce 162 (src line 1220)
-
-
-state 486
- fntype: LFUNC '(' oarg_type_list_ocomma ')' fnres. (209)
-
- . reduce 209 (src line 1510)
-
-
-state 487
- fnres: fnret_type. (213)
-
- . reduce 213 (src line 1536)
-
-
-state 488
- fnres: '('.oarg_type_list_ocomma ')'
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 571
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 489
- fnret_type: recvchantype. (184)
-
- . reduce 184 (src line 1289)
-
-
-state 490
- fnret_type: fntype. (185)
-
- . reduce 185 (src line 1291)
-
-
-state 491
- fnret_type: othertype. (186)
-
- . reduce 186 (src line 1292)
-
-
-state 492
- fnret_type: ptrtype. (187)
-
- . reduce 187 (src line 1293)
-
-
-state 493
- fnret_type: dotname. (188)
-
- . reduce 188 (src line 1294)
-
-
-state 494
- arg_type_list: arg_type_list ',' arg_type. (248)
-
- . reduce 248 (src line 1764)
-
-
-state 495
- fndcl: sym '(' oarg_type_list_ocomma ')'.fnres
- fnres: . (212)
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 488
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 212 (src line 1531)
-
- sym goto 123
- dotname goto 493
- name goto 197
- fnres goto 572
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 492
- recvchantype goto 489
- othertype goto 491
- fnret_type goto 487
- fntype goto 490
- hidden_importsym goto 11
-
-state 496
- fntype: LFUNC '(' oarg_type_list_ocomma ')'.fnres
- fnres: . (212)
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 488
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 212 (src line 1531)
-
- sym goto 123
- dotname goto 493
- name goto 197
- fnres goto 486
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 492
- recvchantype goto 489
- othertype goto 491
- fnret_type goto 487
- fntype goto 490
- hidden_importsym goto 11
-
-state 497
- loop_body: LBODY $$65.stmt_list '}'
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 303
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- stmt_list goto 573
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 498
- for_header: osimple_stmt ';' osimple_stmt.';' osimple_stmt
-
- ';' shift 574
- . error
-
-
-state 499
- range_stmt: expr_list '=' LRANGE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 575
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 500
- range_stmt: expr_list LCOLAS LRANGE.expr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 576
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 501
- switch_stmt: LSWITCH $$88 if_header $$89 LBODY.caseblock_list '}'
- caseblock_list: . (63)
-
- . reduce 63 (src line 652)
-
- caseblock_list goto 577
-
-state 502
- if_header: osimple_stmt ';' osimple_stmt. (77)
-
- . reduce 77 (src line 739)
-
-
-state 503
- caseblock_list: caseblock_list caseblock. (64)
-
- . reduce 64 (src line 656)
-
-
-state 504
- select_stmt: LSELECT $$91 LBODY caseblock_list '}'. (92)
-
- . reduce 92 (src line 844)
-
-
-state 505
- caseblock: case.$$61 stmt_list
- $$61: . (61)
-
- . reduce 61 (src line 621)
-
- $$61 goto 578
-
-state 506
- case: LCASE.expr_or_type_list ':'
- case: LCASE.expr_or_type_list '=' expr ':'
- case: LCASE.expr_or_type_list LCOLAS expr ':'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 173
- expr_or_type goto 291
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- expr_or_type_list goto 579
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 507
- case: LDEFAULT.':'
-
- ':' shift 580
- . error
-
-
-state 508
- if_stmt: LIF $$78 if_header $$79 loop_body.$$80 elseif_list else
- $$80: . (80)
-
- . reduce 80 (src line 761)
-
- $$80 goto 581
-
-state 509
- pseudocall: pexpr '(' expr_or_type_list ocomma ')'. (124)
-
- . reduce 124 (src line 991)
-
-
-state 510
- pseudocall: pexpr '(' expr_or_type_list LDDD ocomma.')'
-
- ')' shift 582
- . error
-
-
-state 511
- expr_or_type_list: expr_or_type_list ',' expr_or_type. (279)
-
- . reduce 279 (src line 1917)
-
-
-state 512
- pexpr_no_paren: pexpr '.' '(' expr_or_type ')'. (129)
-
- . reduce 129 (src line 1020)
-
-
-state 513
- pexpr_no_paren: pexpr '.' '(' LTYPE ')'. (130)
-
- . reduce 130 (src line 1024)
-
-
-state 514
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr.']'
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr.':' oexpr ']'
-
- ':' shift 584
- ']' shift 583
- . error
-
-
-state 515
- pexpr_no_paren: pexpr_no_paren '{' start_complit braced_keyval_list '}'. (137)
-
- . reduce 137 (src line 1060)
-
-
-state 516
- keyval_list: keyval_list ','.keyval
- keyval_list: keyval_list ','.bare_complitexpr
- ocomma: ','. (289)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 289 (src line 1959)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 586
- fnliteral goto 73
- keyval goto 585
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 517
- braced_keyval_list: keyval_list ocomma. (285)
-
- . reduce 285 (src line 1947)
-
-
-state 518
- keyval: expr ':'.complitexpr
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 589
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 588
- complitexpr goto 587
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 519
- bare_complitexpr: '{' start_complit.braced_keyval_list '}'
- braced_keyval_list: . (284)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 284 (src line 1943)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 401
- fnliteral goto 73
- keyval goto 400
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- keyval_list goto 399
- braced_keyval_list goto 590
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 520
- pexpr_no_paren: '(' expr_or_type ')' '{' start_complit.braced_keyval_list '}'
- braced_keyval_list: . (284)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 284 (src line 1943)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 401
- fnliteral goto 73
- keyval goto 400
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- keyval_list goto 399
- braced_keyval_list goto 591
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 521
- ntype: '(' ntype.')'
- non_recvchantype: '(' ntype.')'
-
- ')' shift 592
- . error
-
-
-state 522
- pexpr_no_paren: convtype '(' expr ocomma ')'. (135)
-
- . reduce 135 (src line 1047)
-
-
-state 523
- pexpr_no_paren: comptype lbrace start_complit braced_keyval_list '}'. (136)
-
- . reduce 136 (src line 1053)
-
-
-state 524
- stmt_list: stmt_list ';' stmt. (271)
-
- . reduce 271 (src line 1874)
-
-
-state 525
- compound_stmt: '{' $$59 stmt_list.'}'
- stmt_list: stmt_list.';' stmt
-
- ';' shift 416
- '}' shift 593
- . error
-
-
-state 526
- othertype: LMAP '[' ntype ']' ntype. (195)
-
- . reduce 195 (src line 1330)
-
-
-state 527
- structtype: LSTRUCT lbrace structdcl_list osemi '}'. (200)
-
- . reduce 200 (src line 1350)
-
-
-state 528
- structdcl_list: structdcl_list ';' structdcl. (227)
-
- . reduce 227 (src line 1611)
-
-
-state 529
- structdcl: new_name_list ntype oliteral. (230)
-
- . reduce 230 (src line 1626)
-
-
-state 530
- new_name_list: new_name_list ',' new_name. (273)
-
- . reduce 273 (src line 1887)
-
-
-state 531
- structdcl: '(' embed ')'.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 594
-
-state 532
- structdcl: '(' '*' embed.')' oliteral
-
- ')' shift 595
- . error
-
-
-state 533
- structdcl: '*' embed oliteral. (233)
-
- . reduce 233 (src line 1662)
-
-
-state 534
- structdcl: '*' '(' embed.')' oliteral
-
- ')' shift 596
- . error
-
-
-state 535
- packname: LNAME '.' sym. (237)
-
- . reduce 237 (src line 1694)
-
-
-state 536
- interfacetype: LINTERFACE lbrace interfacedcl_list osemi '}'. (202)
-
- . reduce 202 (src line 1363)
-
-
-state 537
- interfacedcl_list: interfacedcl_list ';' interfacedcl. (229)
-
- . reduce 229 (src line 1621)
-
-
-state 538
- indcl: '(' oarg_type_list_ocomma.')' fnres
-
- ')' shift 597
- . error
-
-
-state 539
- interfacedcl: '(' packname ')'. (241)
-
- . reduce 241 (src line 1724)
-
-
-state 540
- hidden_type_misc: '[' ']' hidden_type. (319)
-
- . reduce 319 (src line 2090)
-
-
-state 541
- hidden_type_misc: '[' LLITERAL ']'.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 598
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 542
- hidden_type_misc: LMAP '[' hidden_type.']' hidden_type
-
- ']' shift 599
- . error
-
-
-state 543
- hidden_type_misc: LSTRUCT '{' ohidden_structdcl_list.'}'
-
- '}' shift 600
- . error
-
-
-state 544
- ohidden_structdcl_list: hidden_structdcl_list. (299)
- hidden_structdcl_list: hidden_structdcl_list.';' hidden_structdcl
-
- ';' shift 601
- . reduce 299 (src line 1989)
-
-
-state 545
- hidden_structdcl_list: hidden_structdcl. (348)
-
- . reduce 348 (src line 2284)
-
-
-state 546
- hidden_structdcl: sym.hidden_type oliteral
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 602
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 547
- hidden_type_misc: LINTERFACE '{' ohidden_interfacedcl_list.'}'
-
- '}' shift 603
- . error
-
-
-state 548
- ohidden_interfacedcl_list: hidden_interfacedcl_list. (301)
- hidden_interfacedcl_list: hidden_interfacedcl_list.';' hidden_interfacedcl
-
- ';' shift 604
- . reduce 301 (src line 1995)
-
-
-state 549
- hidden_interfacedcl_list: hidden_interfacedcl. (350)
-
- . reduce 350 (src line 2294)
-
-
-state 550
- hidden_interfacedcl: sym.'(' ohidden_funarg_list ')' ohidden_funres
-
- '(' shift 605
- . error
-
-
-state 551
- hidden_interfacedcl: hidden_type. (334)
-
- . reduce 334 (src line 2201)
-
-
-state 552
- sym: LNAME. (157)
- hidden_type_misc: LNAME. (318)
-
- '(' reduce 157 (src line 1175)
- . reduce 318 (src line 2079)
-
-
-state 553
- sym: hidden_importsym. (158)
- hidden_type_misc: hidden_importsym. (317)
-
- '(' reduce 158 (src line 1184)
- . reduce 317 (src line 2074)
-
-
-state 554
- hidden_type_misc: LCHAN '(' hidden_type_recv_chan.')'
-
- ')' shift 606
- . error
-
-
-state 555
- hidden_type_misc: LCHAN LCOMM hidden_type. (327)
-
- . reduce 327 (src line 2126)
-
-
-state 556
- hidden_type_recv_chan: LCOMM LCHAN hidden_type. (328)
-
- . reduce 328 (src line 2133)
-
-
-state 557
- hidden_type_func: LFUNC '(' ohidden_funarg_list.')' ohidden_funres
-
- ')' shift 607
- . error
-
-
-state 558
- hidden_import: LCONST hidden_pkg_importsym '=' hidden_constant ';'. (306)
-
- . reduce 306 (src line 2015)
-
-
-state 559
- hidden_constant: '(' hidden_literal.'+' hidden_literal ')'
-
- '+' shift 608
- . error
-
-
-state 560
- hidden_literal: '-' LLITERAL. (340)
-
- . reduce 340 (src line 2231)
-
-
-state 561
- hidden_import: LCONST hidden_pkg_importsym hidden_type '=' hidden_constant.';'
-
- ';' shift 609
- . error
-
-
-state 562
- hidden_fndcl: hidden_pkg_importsym '(' ohidden_funarg_list ')'.ohidden_funres
- ohidden_funres: . (335)
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '(' shift 612
- '[' shift 342
- '@' shift 13
- . reduce 335 (src line 2206)
-
- hidden_importsym goto 340
- hidden_funres goto 611
- ohidden_funres goto 610
- hidden_type goto 613
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 563
- hidden_fndcl: '(' hidden_funarg_list ')' sym.'(' ohidden_funarg_list ')' ohidden_funres
-
- '(' shift 614
- . error
-
-
-state 564
- hidden_funarg_list: hidden_funarg_list ',' hidden_funarg. (347)
-
- . reduce 347 (src line 2279)
-
-
-state 565
- hidden_funarg: sym hidden_type oliteral. (330)
-
- . reduce 330 (src line 2147)
-
-
-state 566
- hidden_funarg: sym LDDD hidden_type.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 615
-
-state 567
- common_dcl: lconst '(' constdcl ';' constdcl_list osemi.')'
-
- ')' shift 616
- . error
-
-
-state 568
- constdcl_list: constdcl_list ';'.constdcl1
- osemi: ';'. (287)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 287 (src line 1956)
-
- sym goto 105
- dcl_name goto 104
- dcl_name_list goto 480
- constdcl goto 479
- constdcl1 goto 617
- hidden_importsym goto 11
-
-state 569
- constdcl: dcl_name_list ntype.'=' expr_list
- constdcl1: dcl_name_list ntype. (45)
-
- '=' shift 367
- . reduce 45 (src line 448)
-
-
-state 570
- fndcl: '(' oarg_type_list_ocomma ')' sym '('.oarg_type_list_ocomma ')' fnres
- oarg_type_list_ocomma: . (249)
-
- LCHAN shift 78
- LDDD shift 250
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 231
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 249 (src line 1769)
-
- sym goto 247
- ntype goto 249
- arg_type goto 245
- dotname goto 230
- name goto 197
- name_or_type goto 246
- oarg_type_list_ocomma goto 618
- arg_type_list goto 244
- dotdotdot goto 248
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 229
- recvchantype goto 226
- othertype goto 228
- fntype goto 227
- hidden_importsym goto 11
-
-state 571
- fnres: '(' oarg_type_list_ocomma.')'
-
- ')' shift 619
- . error
-
-
-state 572
- fndcl: sym '(' oarg_type_list_ocomma ')' fnres. (205)
-
- . reduce 205 (src line 1398)
-
-
-state 573
- loop_body: LBODY $$65 stmt_list.'}'
- stmt_list: stmt_list.';' stmt
-
- ';' shift 416
- '}' shift 620
- . error
-
-
-state 574
- for_header: osimple_stmt ';' osimple_stmt ';'.osimple_stmt
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- name goto 69
- osimple_stmt goto 621
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 575
- range_stmt: expr_list '=' LRANGE expr. (67)
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 67 (src line 672)
-
-
-state 576
- range_stmt: expr_list LCOLAS LRANGE expr. (68)
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 68 (src line 679)
-
-
-state 577
- caseblock_list: caseblock_list.caseblock
- switch_stmt: LSWITCH $$88 if_header $$89 LBODY caseblock_list.'}'
-
- LCASE shift 506
- LDEFAULT shift 507
- '}' shift 622
- . error
-
- case goto 505
- caseblock goto 503
-
-state 578
- caseblock: case $$61.stmt_list
- stmt: . (251)
-
- error shift 307
- LLITERAL shift 68
- LBREAK shift 41
- LCASE reduce 251 (src line 1781)
- LCHAN shift 78
- LCONST shift 47
- LCONTINUE shift 42
- LDEFAULT reduce 251 (src line 1781)
- LDEFER shift 44
- LFALL shift 40
- LFOR shift 50
- LFUNC shift 124
- LGO shift 43
- LGOTO shift 45
- LIF shift 53
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LRETURN shift 46
- LSELECT shift 52
- LSTRUCT shift 82
- LSWITCH shift 51
- LTYPE shift 32
- LVAR shift 30
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- ';' reduce 251 (src line 1781)
- '{' shift 308
- '}' reduce 251 (src line 1781)
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 56
- stmt goto 303
- compound_stmt goto 304
- expr goto 48
- fnliteral goto 73
- for_stmt goto 35
- if_stmt goto 38
- non_dcl_stmt goto 306
- labelname goto 39
- name goto 69
- new_name goto 54
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- select_stmt goto 37
- simple_stmt goto 34
- switch_stmt goto 36
- uexpr goto 55
- expr_list goto 49
- stmt_list goto 623
- common_dcl goto 305
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- lconst goto 31
- fnlitdcl goto 76
-
-state 579
- case: LCASE expr_or_type_list.':'
- case: LCASE expr_or_type_list.'=' expr ':'
- case: LCASE expr_or_type_list.LCOLAS expr ':'
- expr_or_type_list: expr_or_type_list.',' expr_or_type
-
- LCOLAS shift 626
- '=' shift 625
- ':' shift 624
- ',' shift 627
- . error
-
-
-state 580
- case: LDEFAULT ':'. (58)
-
- . reduce 58 (src line 586)
-
-
-state 581
- if_stmt: LIF $$78 if_header $$79 loop_body $$80.elseif_list else
- elseif_list: . (84)
-
- . reduce 84 (src line 796)
-
- elseif_list goto 628
-
-state 582
- pseudocall: pexpr '(' expr_or_type_list LDDD ocomma ')'. (125)
-
- . reduce 125 (src line 996)
-
-
-state 583
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr ']'. (132)
-
- . reduce 132 (src line 1032)
-
-
-state 584
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr ':'.oexpr ']'
- oexpr: . (290)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 290 (src line 1961)
-
- sym goto 123
- expr goto 188
- fnliteral goto 73
- name goto 69
- oexpr goto 629
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 585
- keyval_list: keyval_list ',' keyval. (282)
-
- . reduce 282 (src line 1934)
-
-
-state 586
- keyval_list: keyval_list ',' bare_complitexpr. (283)
-
- . reduce 283 (src line 1938)
-
-
-state 587
- keyval: expr ':' complitexpr. (141)
-
- . reduce 141 (src line 1082)
-
-
-state 588
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
- complitexpr: expr. (144)
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- . reduce 144 (src line 1108)
-
-
-state 589
- complitexpr: '{'.start_complit braced_keyval_list '}'
- start_complit: . (140)
-
- . reduce 140 (src line 1075)
-
- start_complit goto 630
-
-state 590
- bare_complitexpr: '{' start_complit braced_keyval_list.'}'
-
- '}' shift 631
- . error
-
-
-state 591
- pexpr_no_paren: '(' expr_or_type ')' '{' start_complit braced_keyval_list.'}'
-
- '}' shift 632
- . error
-
-
-state 592
- ntype: '(' ntype ')'. (171)
- non_recvchantype: '(' ntype ')'. (180)
-
- LBODY reduce 180 (src line 1277)
- '(' reduce 180 (src line 1277)
- '{' reduce 180 (src line 1277)
- . reduce 171 (src line 1258)
-
-
-state 593
- compound_stmt: '{' $$59 stmt_list '}'. (60)
-
- . reduce 60 (src line 611)
-
-
-state 594
- structdcl: '(' embed ')' oliteral. (232)
-
- . reduce 232 (src line 1656)
-
-
-state 595
- structdcl: '(' '*' embed ')'.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 633
-
-state 596
- structdcl: '*' '(' embed ')'.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 634
-
-state 597
- indcl: '(' oarg_type_list_ocomma ')'.fnres
- fnres: . (212)
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 488
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 212 (src line 1531)
-
- sym goto 123
- dotname goto 493
- name goto 197
- fnres goto 635
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 492
- recvchantype goto 489
- othertype goto 491
- fnret_type goto 487
- fntype goto 490
- hidden_importsym goto 11
-
-state 598
- hidden_type_misc: '[' LLITERAL ']' hidden_type. (320)
-
- . reduce 320 (src line 2094)
-
-
-state 599
- hidden_type_misc: LMAP '[' hidden_type ']'.hidden_type
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '@' shift 13
- . error
-
- hidden_importsym goto 340
- hidden_type goto 636
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 600
- hidden_type_misc: LSTRUCT '{' ohidden_structdcl_list '}'. (322)
-
- . reduce 322 (src line 2102)
-
-
-state 601
- hidden_structdcl_list: hidden_structdcl_list ';'.hidden_structdcl
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 546
- hidden_importsym goto 11
- hidden_structdcl goto 637
-
-state 602
- hidden_structdcl: sym hidden_type.oliteral
- oliteral: . (302)
-
- LLITERAL shift 428
- . reduce 302 (src line 1997)
-
- oliteral goto 638
-
-state 603
- hidden_type_misc: LINTERFACE '{' ohidden_interfacedcl_list '}'. (323)
-
- . reduce 323 (src line 2106)
-
-
-state 604
- hidden_interfacedcl_list: hidden_interfacedcl_list ';'.hidden_interfacedcl
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 552
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '[' shift 342
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 550
- hidden_importsym goto 553
- hidden_interfacedcl goto 639
- hidden_type goto 551
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 605
- hidden_interfacedcl: sym '('.ohidden_funarg_list ')' ohidden_funres
- ohidden_funarg_list: . (296)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 296 (src line 1979)
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 467
- ohidden_funarg_list goto 640
-
-state 606
- hidden_type_misc: LCHAN '(' hidden_type_recv_chan ')'. (326)
-
- . reduce 326 (src line 2120)
-
-
-state 607
- hidden_type_func: LFUNC '(' ohidden_funarg_list ')'.ohidden_funres
- ohidden_funres: . (335)
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '(' shift 612
- '[' shift 342
- '@' shift 13
- . reduce 335 (src line 2206)
-
- hidden_importsym goto 340
- hidden_funres goto 611
- ohidden_funres goto 641
- hidden_type goto 613
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 608
- hidden_constant: '(' hidden_literal '+'.hidden_literal ')'
-
- LLITERAL shift 460
- LNAME shift 10
- '-' shift 461
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 462
- hidden_importsym goto 11
- hidden_literal goto 642
-
-state 609
- hidden_import: LCONST hidden_pkg_importsym hidden_type '=' hidden_constant ';'. (307)
-
- . reduce 307 (src line 2019)
-
-
-state 610
- hidden_fndcl: hidden_pkg_importsym '(' ohidden_funarg_list ')' ohidden_funres. (207)
-
- . reduce 207 (src line 1467)
-
-
-state 611
- ohidden_funres: hidden_funres. (336)
-
- . reduce 336 (src line 2210)
-
-
-state 612
- hidden_funres: '('.ohidden_funarg_list ')'
- ohidden_funarg_list: . (296)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 296 (src line 1979)
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 467
- ohidden_funarg_list goto 643
-
-state 613
- hidden_funres: hidden_type. (338)
-
- . reduce 338 (src line 2217)
-
-
-state 614
- hidden_fndcl: '(' hidden_funarg_list ')' sym '('.ohidden_funarg_list ')' ohidden_funres
- ohidden_funarg_list: . (296)
-
- LNAME shift 10
- '?' shift 12
- '@' shift 13
- . reduce 296 (src line 1979)
-
- sym goto 357
- hidden_importsym goto 11
- hidden_funarg goto 356
- hidden_funarg_list goto 467
- ohidden_funarg_list goto 644
-
-state 615
- hidden_funarg: sym LDDD hidden_type oliteral. (331)
-
- . reduce 331 (src line 2156)
-
-
-state 616
- common_dcl: lconst '(' constdcl ';' constdcl_list osemi ')'. (33)
-
- . reduce 33 (src line 392)
-
-
-state 617
- constdcl_list: constdcl_list ';' constdcl1. (223)
-
- . reduce 223 (src line 1594)
-
-
-state 618
- fndcl: '(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma.')' fnres
-
- ')' shift 645
- . error
-
-
-state 619
- fnres: '(' oarg_type_list_ocomma ')'. (214)
-
- . reduce 214 (src line 1540)
-
-
-state 620
- loop_body: LBODY $$65 stmt_list '}'. (66)
-
- . reduce 66 (src line 666)
-
-
-state 621
- for_header: osimple_stmt ';' osimple_stmt ';' osimple_stmt. (70)
-
- . reduce 70 (src line 692)
-
-
-state 622
- switch_stmt: LSWITCH $$88 if_header $$89 LBODY caseblock_list '}'. (90)
-
- . reduce 90 (src line 830)
-
-
-state 623
- caseblock: case $$61 stmt_list. (62)
- stmt_list: stmt_list.';' stmt
-
- ';' shift 416
- . reduce 62 (src line 633)
-
-
-state 624
- case: LCASE expr_or_type_list ':'. (55)
-
- . reduce 55 (src line 535)
-
-
-state 625
- case: LCASE expr_or_type_list '='.expr ':'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 646
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 626
- case: LCASE expr_or_type_list LCOLAS.expr ':'
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 647
- fnliteral goto 73
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 627
- expr_or_type_list: expr_or_type_list ','.expr_or_type
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 179
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 178
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . error
-
- sym goto 123
- expr goto 173
- expr_or_type goto 511
- fnliteral goto 73
- name goto 69
- non_expr_type goto 174
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- recvchantype goto 175
- othertype goto 177
- fntype goto 176
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 628
- if_stmt: LIF $$78 if_header $$79 loop_body $$80 elseif_list.else
- elseif_list: elseif_list.elseif
- else: . (86)
-
- LELSE shift 650
- . reduce 86 (src line 805)
-
- elseif goto 649
- else goto 648
-
-state 629
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr ':' oexpr.']'
-
- ']' shift 651
- . error
-
-
-state 630
- complitexpr: '{' start_complit.braced_keyval_list '}'
- braced_keyval_list: . (284)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '{' shift 403
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 284 (src line 1943)
-
- sym goto 123
- expr goto 402
- bare_complitexpr goto 401
- fnliteral goto 73
- keyval goto 400
- name goto 69
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- uexpr goto 55
- keyval_list goto 399
- braced_keyval_list goto 652
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 631
- bare_complitexpr: '{' start_complit braced_keyval_list '}'. (143)
-
- . reduce 143 (src line 1102)
-
-
-state 632
- pexpr_no_paren: '(' expr_or_type ')' '{' start_complit braced_keyval_list '}'. (138)
-
- . reduce 138 (src line 1066)
-
-
-state 633
- structdcl: '(' '*' embed ')' oliteral. (234)
-
- . reduce 234 (src line 1668)
-
-
-state 634
- structdcl: '*' '(' embed ')' oliteral. (235)
-
- . reduce 235 (src line 1675)
-
-
-state 635
- indcl: '(' oarg_type_list_ocomma ')' fnres. (242)
-
- . reduce 242 (src line 1730)
-
-
-state 636
- hidden_type_misc: LMAP '[' hidden_type ']' hidden_type. (321)
-
- . reduce 321 (src line 2098)
-
-
-state 637
- hidden_structdcl_list: hidden_structdcl_list ';' hidden_structdcl. (349)
-
- . reduce 349 (src line 2289)
-
-
-state 638
- hidden_structdcl: sym hidden_type oliteral. (332)
-
- . reduce 332 (src line 2172)
-
-
-state 639
- hidden_interfacedcl_list: hidden_interfacedcl_list ';' hidden_interfacedcl. (351)
-
- . reduce 351 (src line 2299)
-
-
-state 640
- hidden_interfacedcl: sym '(' ohidden_funarg_list.')' ohidden_funres
-
- ')' shift 653
- . error
-
-
-state 641
- hidden_type_func: LFUNC '(' ohidden_funarg_list ')' ohidden_funres. (329)
-
- . reduce 329 (src line 2141)
-
-
-state 642
- hidden_constant: '(' hidden_literal '+' hidden_literal.')'
-
- ')' shift 654
- . error
-
-
-state 643
- hidden_funres: '(' ohidden_funarg_list.')'
-
- ')' shift 655
- . error
-
-
-state 644
- hidden_fndcl: '(' hidden_funarg_list ')' sym '(' ohidden_funarg_list.')' ohidden_funres
-
- ')' shift 656
- . error
-
-
-state 645
- fndcl: '(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')'.fnres
- fnres: . (212)
-
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 232
- '*' shift 196
- '(' shift 488
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 212 (src line 1531)
-
- sym goto 123
- dotname goto 493
- name goto 197
- fnres goto 657
- interfacetype goto 81
- structtype goto 80
- ptrtype goto 492
- recvchantype goto 489
- othertype goto 491
- fnret_type goto 487
- fntype goto 490
- hidden_importsym goto 11
-
-state 646
- case: LCASE expr_or_type_list '=' expr.':'
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- ':' shift 658
- . error
-
-
-state 647
- case: LCASE expr_or_type_list LCOLAS expr.':'
- expr: expr.LOROR expr
- expr: expr.LANDAND expr
- expr: expr.LEQ expr
- expr: expr.LNE expr
- expr: expr.LLT expr
- expr: expr.LLE expr
- expr: expr.LGE expr
- expr: expr.LGT expr
- expr: expr.'+' expr
- expr: expr.'-' expr
- expr: expr.'|' expr
- expr: expr.'^' expr
- expr: expr.'*' expr
- expr: expr.'/' expr
- expr: expr.'%' expr
- expr: expr.'&' expr
- expr: expr.LANDNOT expr
- expr: expr.LLSH expr
- expr: expr.LRSH expr
- expr: expr.LCOMM expr
-
- LANDAND shift 134
- LANDNOT shift 149
- LCOMM shift 152
- LEQ shift 135
- LGE shift 139
- LGT shift 140
- LLE shift 138
- LLSH shift 150
- LLT shift 137
- LNE shift 136
- LOROR shift 133
- LRSH shift 151
- '+' shift 141
- '-' shift 142
- '|' shift 143
- '^' shift 144
- '*' shift 145
- '/' shift 146
- '%' shift 147
- '&' shift 148
- ':' shift 659
- . error
-
-
-state 648
- if_stmt: LIF $$78 if_header $$79 loop_body $$80 elseif_list else. (81)
-
- . reduce 81 (src line 765)
-
-
-state 649
- elseif_list: elseif_list elseif. (85)
-
- . reduce 85 (src line 800)
-
-
-state 650
- elseif: LELSE.LIF $$82 if_header loop_body
- else: LELSE.compound_stmt
-
- LIF shift 660
- '{' shift 308
- . error
-
- compound_stmt goto 661
-
-state 651
- pexpr_no_paren: pexpr '[' oexpr ':' oexpr ':' oexpr ']'. (133)
-
- . reduce 133 (src line 1036)
-
-
-state 652
- complitexpr: '{' start_complit braced_keyval_list.'}'
-
- '}' shift 662
- . error
-
-
-state 653
- hidden_interfacedcl: sym '(' ohidden_funarg_list ')'.ohidden_funres
- ohidden_funres: . (335)
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '(' shift 612
- '[' shift 342
- '@' shift 13
- . reduce 335 (src line 2206)
-
- hidden_importsym goto 340
- hidden_funres goto 611
- ohidden_funres goto 663
- hidden_type goto 613
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 654
- hidden_constant: '(' hidden_literal '+' hidden_literal ')'. (343)
-
- . reduce 343 (src line 2259)
-
-
-state 655
- hidden_funres: '(' ohidden_funarg_list ')'. (337)
-
- . reduce 337 (src line 2212)
-
-
-state 656
- hidden_fndcl: '(' hidden_funarg_list ')' sym '(' ohidden_funarg_list ')'.ohidden_funres
- ohidden_funres: . (335)
-
- LCHAN shift 347
- LFUNC shift 349
- LINTERFACE shift 345
- LMAP shift 343
- LNAME shift 341
- LSTRUCT shift 344
- LCOMM shift 348
- '*' shift 346
- '(' shift 612
- '[' shift 342
- '@' shift 13
- . reduce 335 (src line 2206)
-
- hidden_importsym goto 340
- hidden_funres goto 611
- ohidden_funres goto 664
- hidden_type goto 613
- hidden_type_misc goto 337
- hidden_type_func goto 339
- hidden_type_recv_chan goto 338
-
-state 657
- fndcl: '(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')' fnres. (206)
-
- . reduce 206 (src line 1430)
-
-
-state 658
- case: LCASE expr_or_type_list '=' expr ':'. (56)
-
- . reduce 56 (src line 559)
-
-
-state 659
- case: LCASE expr_or_type_list LCOLAS expr ':'. (57)
-
- . reduce 57 (src line 577)
-
-
-state 660
- elseif: LELSE LIF.$$82 if_header loop_body
- $$82: . (82)
-
- . reduce 82 (src line 782)
-
- $$82 goto 665
-
-state 661
- else: LELSE compound_stmt. (87)
-
- . reduce 87 (src line 809)
-
-
-state 662
- complitexpr: '{' start_complit braced_keyval_list '}'. (145)
-
- . reduce 145 (src line 1110)
-
-
-state 663
- hidden_interfacedcl: sym '(' ohidden_funarg_list ')' ohidden_funres. (333)
-
- . reduce 333 (src line 2196)
-
-
-state 664
- hidden_fndcl: '(' hidden_funarg_list ')' sym '(' ohidden_funarg_list ')' ohidden_funres. (208)
-
- . reduce 208 (src line 1493)
-
-
-state 665
- elseif: LELSE LIF $$82.if_header loop_body
- osimple_stmt: . (294)
-
- LLITERAL shift 68
- LCHAN shift 78
- LFUNC shift 124
- LINTERFACE shift 83
- LMAP shift 79
- LNAME shift 10
- LSTRUCT shift 82
- LCOMM shift 65
- '+' shift 60
- '-' shift 61
- '^' shift 64
- '*' shift 58
- '&' shift 59
- '(' shift 67
- '!' shift 62
- '~' shift 63
- '[' shift 77
- '?' shift 12
- '@' shift 13
- . reduce 294 (src line 1973)
-
- sym goto 123
- expr goto 48
- fnliteral goto 73
- if_header goto 666
- name goto 69
- osimple_stmt goto 286
- pexpr goto 57
- pexpr_no_paren goto 66
- pseudocall goto 70
- simple_stmt goto 282
- uexpr goto 55
- expr_list goto 49
- convtype goto 71
- comptype goto 72
- interfacetype goto 81
- structtype goto 80
- othertype goto 75
- fntype goto 74
- hidden_importsym goto 11
- fnlitdcl goto 76
-
-state 666
- elseif: LELSE LIF $$82 if_header.loop_body
-
- LBODY shift 382
- . error
-
- loop_body goto 667
-
-state 667
- elseif: LELSE LIF $$82 if_header loop_body. (83)
-
- . reduce 83 (src line 787)
-
-
-76 terminals, 142 nonterminals
-352 grammar rules, 668/2000 states
-0 shift/reduce, 0 reduce/reduce conflicts reported
-191 working sets used
-memory: parser 3749/30000
-446 extra closures
-3093 shift entries, 64 exceptions
-603 goto entries
-1650 entries saved by goto default
-Optimizer space used: output 2282/30000
-2282 table entries, 722 zero
-maximum spread: 76, maximum offset: 666