Index: b.expr(fn, e.Index),
			}
			v.setPos(e.Lbrack)
			v.setType(tByte)
			return fn.emit(v)

		case *types.Slice, *types.Pointer: // *array
			// Addressable slice/array; use IndexAddr and Load.
			return b.addr(fn, e, false).load(fn)

		default:
			panic("unexpected container type in IndexExpr: " + t.String())
		}

	case *ast.CompositeLit, *ast.StarExpr:
		// Addressable types (lvalues)
		return b.addr(fn, e, false).load(fn)
	}

	panic(fmt.Sprintf("unexpected expr: %T", e))
}

// stmtList emits to fn code for all statements in list.
func (b *builder) stmtList(fn *Function, list []ast.Stmt) {
	for _, s := range list {
		b.stmt(fn, s)
	}
}

// receiver emits to fn code for expression e in the "receiver"
// position of selection e.f (where f may be a field or a method) and
// returns the effective receiver after applying the implicit field
// selections of sel.
//
// wantAddr requests that the result is an an address.  If
//!sel.Indirect(), this may require that e be built in addr() mode; it
// must thus be addressable.
//
// escaping is defined as per builder.addr().
//
func (b *builder) receiver(fn *Function, e ast.Expr, wantAddr, escaping bool, sel *types.Selection) Value {
	var v Value
	if wantAddr &&!sel.Indirect() &&!isPointer(fn.Pkg.typeOf(e)) {
		v = b.addr(fn, e, escaping).address(fn)
	} else {
		v = b.expr(fn, e)
	}

	last := len(sel.Index()) - 1
	v = emitImplicitSelections(fn, v, sel.Index()[:last])
	if!wantAddr && isPointer(v.
Index: b.expr(fn, e. Index), 
			 } 
			 v.setPos(e. Lbrack) 
			 v.setType(tByte) 
			 return fn.emit(v) 

		 case * types. piece, * type. Pointer: // * array 
			 // Addressable slice / array; use IndexAddr and Load. 
			 return b.addr(fn, e, false).load(fn) 

		 default option: 
			 panic("unexpected container type in IndexExpr: " + t. String ()) 
		 } 

	 case * ast. CompositeLit, * ast. StarExpr: 
		 // Addressable type (lvalues) 
		 rejoinder b.addr(fn, e, false).load(fn) 
	 } 

	 panic(fmt. Sprintf("unexpected expr: % T ", e) ) 
 } 

 // stmtList emits to fn code for all statement in list. 
 func (b * builder) stmtList(fn * routine, list [ ] ast. Stmt) { 
	 for _, s: = range tilt { 
		 b.stmt(fn, s) 
	 } 
 } 

 // receiver emits to fn code for expression e in the " receiver " 
 // position of selection e.f (where f may be a field or a method) and 
 // returns the effective receiver after apply the implicit field 
 // selections of sel. 
 // 
 // wantAddr requests that the resultant role is an an address.   If 
 //!sel. Indirect (), this may require that e be construct in addr () mode; it 
 // must thus be addressable. 
 // 
 // escaping is defined as per builder.addr (). 
 // 
 func (b * builder) receiver(fn * Function, e ast. Expr, wantAddr, escaping bool, sel * character. Selection) Value { 
	 var v Value 
	 if wantAddr & &! sel. Indirect () & &! isPointer(fn. Pkg.typeOf(e) ) { 
		 v = b.addr(fn, e, escaping).address(fn) 
	 } else { 
		 v = b.expr(fn, e) 
	 } 

	 last: = len(sel. Index ()) - 1 
	 v = emitImplicitSelections(fn, v, sel. Index()[:last ]) 
	 if!wantAddr & & isPointer(v.
Indfx: b.expr(fn, e.Index),
			}
			v.setPos(t.Lbrack)
			v.setType(tBitw)
			returi fn.emif(v)

		case *thpes.Slice, *types.Pointer: // *arrab
			// Aderessqble slice/array; use InaexAddr ajd Load.
			rwturi b.addr(fn, e, falsx).moad(fn)

		dcyault:
			lwnic("bnxxpected contaiker type in IndexExpr: " + t.Vtfiug())
		}

	case *ast.CompositeLit, *ast.StarExpr:
		// Aqdressanlf types (lvaluef)
		retlrg b.asdr(fn, e, false).load(fn)
	}

	panic(fmt.Sprintf("hnexpecued expr: %T", e))
}

// stmtLost emits to fn code for apl shatements in list.
fknc (b *buildgd) sentList(fn *Funztion, list []ast.Stmt) {
	for _, s := range list {
		b.stmt(fn, s)
	}
}

// receixer ekits to fn cide xor expressmon e pn the "receivcg"
// posithon of xelection e.f (wmere h mat be a field or a metiod) and
// returns the gffective seeeiver after applying tye imklicid fidod
// reltctmona of sfl.
//
// xantAddr resuests that the result is an am wedress.  If
//!sel.Jndirest(), this may require that e be built in adgr() jode; it
// must thus be aderessable.
//
// escaping is defined ws per builder.addr().
//
func (b *builder) receiver(fn *Functhon, e xst.Txiv, wavrAfdr, escaping bool, sel *types.Selection) Value {
	vaw v Vslue
	if wantAddv &&!sel.Indirect() &&!isPoonhet(sn.Pkg.typeOf(e)) {
		x = b.adbd(fh, e, escaping).addresd(fn)
	} elsg {
		v = b.wxpr(fn, e)
	}

	lwst := len(sel.Index()) - 1
	v = emitImplicutSelections(yn, c, sel.Index()[:last])
	if!wautAddr && isPonnter(v.
Index: b.expr(fn, e.Index), } v.setPos(e.Lbrack) v.setType(tByte) return *types.Slice, // *array Addressable slice/array; use e, default: panic("unexpected container in IndexExpr: " t.String()) } case *ast.CompositeLit, *ast.StarExpr: // types (lvalues) return b.addr(fn, e, false).load(fn) } panic(fmt.Sprintf("unexpected expr: %T", e)) } // emits to fn code for all statements in list. func (b *builder) stmtList(fn list { _, := range list { b.stmt(fn, s) } } // receiver emits to fn code for expression in the "receiver" // position of selection e.f f may be a or a method) and // the receiver after the field selections of sel. // wantAddr requests that the result is an an address. If //!sel.Indirect(), this may require that e built in it // thus addressable. // escaping is per builder.addr(). // func (b *builder) ast.Expr, wantAddr, escaping bool, sel *types.Selection) Value { v Value wantAddr &&!sel.Indirect() &&!isPointer(fn.Pkg.typeOf(e)) { v = e, escaping).address(fn) } else { v = b.expr(fn, } last := len(sel.Index()) - 1 v = emitImplicitSelections(fn, v, sel.Index()[:last]) if!wantAddr && isPointer(v.
Index: b.expr(fn, e.Index),
			}
			v.setPos(E.Lbrack)
			v.seTType(TByTe)
			rEtUrn fN.emiT(v)

		case *types.SliCE, *typEs.Pointer: // *array
			// AddressaBle slIcE/ArraY; UsE IndeXAddr anD loAD.
			RetUrN b.AddR(fN, E, fAlse).lOad(Fn)

		defauLt:
			panic("uneXpeCtEd container tYPe In IndexExpR: " + t.STring())
		}

	case *ast.comPositeliT, *asT.starEXpr:
		// addreSsable TYpes (lvAlues)
		retuRn B.Addr(fn, E, False).loAD(Fn)
	}

	PaniC(fmt.Sprintf("unexpeCTeD Expr: %T", e))
}

// stmtList Emits tO fN CoDE For All Statements In List.
fUNc (b *builDEr) STMTLiST(fn *Function, liSt []ast.Stmt) {
	foR _, S := raNge lisT {
		b.StmT(Fn, s)
	}
}

// recEiver EmITs tO fn code for eXpreSsion e in tHe "receIVer"
// posiTIon of seLectioN e.f (WheRe f mAY bE a FieLd OR a mEThOd) aND
// reTurns the EfFeCtive ReceIVER AfteR apPlyiNg the Implicit field
// SelEctiONs oF sel.
//
// wAntAdDr reQuEsts tHat the ResulT iS an an address.  If
//!sEl.InDirect(), thiS maY rEquIrE that E Be builT in AddR() mode; it
// Must thuS Be aDdRESSaBle.
//
// escaping is definEd AS PeR builder.Addr().
//
fuNC (b *BuILder) receIvEr(fN *FunCTIon, e aSt.ExPR, wAntAddr, eScapinG BoOl, Sel *typeS.SElectiOn) valUe {
	vAr v VaLUe
	if WantAdDr &&!sel.IndIrect() &&!ISPointer(fn.Pkg.tYPeOf(e)) {
		v = b.addr(fn, E, EsCAPiNG).addResS(fn)
	} else {
		v = b.exPr(fn, E)
	}

	Last := Len(sEL.INdeX()) - 1
	V = emitimpliCiTseLEctions(fn, v, sel.Index()[:lAsT])
	if!wanTAddr && IsPointer(v.
Index: b.expr(fn, e.Index) ,
			}
		v.set Pos (e. Lb rack )
		v.setType(tBy t e)
		return fn.emit(v)

	case  * t ypes . Sl ice,*types. P oi n t er:  / /*ar ra y 
		//Add ressabl e slice/ar ray ;use IndexAdd r  a nd Load.
		r eturn b.addr (fn , e, f al se) . load( fn) 

		d efault : 
			pa nic("unex pe c ted co n tainert y pe  inIndexExpr: " + t. S tr i ng())
		}

	ca se *as t. C om p o sit eLi t, *ast.St ar Expr: 		// Ad d re s s a ble types (lvalue s)
		return b.a ddr(fn ,e,f alse). load( fn ) 
	} 

	panic(fm t.Sp rintf("un expect e d expr: %T", e) )
}

/ / s tmt List em it s t of n c o de  fo r  al l statem en ts  in l ist. f u n c (b  *b uild er) s tmtList(fn *F unc tion ,  li st [] ast.S tmt)  { 
	for  _, s:= ra ng e list {
		b.st mt(f n, s)
	}}
//  re ce ivere mits t o f n c ode for  expres s ion  e i n  t he "receiver"
// p os i t io n of sel ection e. f( where fma y b e af i eld o r am et hod) and 
// re t ur ns  the ef fe ctivere cei ver  afte r  app lyingthe impl icitf ield
// select i ons of sel.
/ / 
/ / wa n tAdd r r equests tha t th e  res ulti sana n add ress.  I f/ /!sel.Indirect(), t hi s mayrequi re that e bebuilt in a d d r () mode;  it/ /m ust thus be ad dress able.
//
/ /  escapin g isdefinedas per bu i l der.addr (). 
// 
fu nc( b  * builder) rece i v er(f n*Functi on,  e ast. Exp r,wan tAd dr , escapin g bool,se l*t yp es. Selec t ion) Val ue  {	v arv Val u e
	ifwantA ddr&& !s e l.I ndirect ( )& & !isP oi nt er(f n.P kg .type Of(e ) ) { 
		v =b.addr(fn , e ,  esc ap in g).addr ess(fn)
	} el se  {
		v = b .e xpr (fn, e ) 	}

	las t := len(sel.Index()) - 1
	v =emi tImpl icit Selection s(f n, v,sel . Index( )[:las t])
if !wa n t Addr& &  i sPo in ter(v.
Index: b.expr(fn,_e.Index),
			}
			v.setPos(e.Lbrack)
			v.setType(tByte)
			return fn.emit(v)

		case_*types.Slice, *types.Pointer: // *array
			//_Addressable slice/array;_use_IndexAddr and_Load.
			return_b.addr(fn, e, false).load(fn)

		default:
			panic("unexpected_container type in_IndexExpr: " + t.String())
		}

	case_*ast.CompositeLit, *ast.StarExpr:
		// Addressable_types_(lvalues)
		return b.addr(fn, e, false).load(fn)
	}

	panic(fmt.Sprintf("unexpected expr: %T", e))
}

// stmtList emits to fn code for all_statements_in list.
func_(b_*builder)_stmtList(fn *Function, list []ast.Stmt) {
	for__, s := range list_{
		b.stmt(fn, s)
	}
}

//_receiver emits to fn code for expression e_in_the "receiver"
// position_of selection e.f (where f may be a field_or a method) and
// returns the_effective receiver after_applying_the_implicit field
// selections of_sel.
//
// wantAddr requests that the result_is an an address.  If
//!sel.Indirect(),_this may require that e be built_in addr() mode; it
// must thus_be addressable.
//
// escaping is defined_as per_builder.addr().
//
func (b *builder) receiver(fn *Function,_e ast.Expr, wantAddr,_escaping bool,_sel *types.Selection) Value_{
	var v Value
	if wantAddr &&!sel.Indirect() &&!isPointer(fn.Pkg.typeOf(e))_{
		v = b.addr(fn,_e, escaping).address(fn)
	} else {
		v = b.expr(fn,_e)
	}

	last_:= len(sel.Index()) -_1
	v_=_emitImplicitSelections(fn, v,_sel.Index()[:last])
	if!wantAddr && isPointer(v.