void GenenrateSubject(EmitExpContext context) { ILGenerator il = context.ILout; bool isgen = false; if ((ListExp is VarExp)) { VarExp varexp = ListExp as VarExp; if (ReflectionUtil.IsStruct(varexp.RetType)) { if (varexp.VarSymbol is SymbolVar) { il.Emit(OpCodes.Ldloca, (varexp.VarSymbol as SymbolVar).VarBuilder); isgen = true; } else if (varexp.VarSymbol is SymbolArg) { il.Emit(OpCodes.Ldarga, (varexp.VarSymbol as SymbolArg).ArgIndex); isgen = true; } } } if (!isgen) { ListExp.Generate(context); } }
void generateList(EmitStmtContext context) { ILGenerator il = context.ILout; EmitExpContext expContext = new EmitExpContext(context); ListExp.Generate(expContext); EmitHelper.StormVar(il, listSymbol.VarBuilder); }