protected override void TranslateToILWithDupOfThisOb(ILGenerator il) { Call expression = this.expression as Call; if ((expression == null) || !expression.inBrackets) { this.TranslateToILObject(il, null, false); } else { if (expression.isConstructor && expression.inBrackets) { expression.TranslateToIL(il, Typeob.Object); il.Emit(OpCodes.Dup); return; } expression.func.TranslateToIL(il, Typeob.Object); } this.expression.TranslateToIL(il, Typeob.Object); }
//Called when a late bound call is being made protected override void TranslateToILWithDupOfThisOb(ILGenerator il) { Call c = this.expression as Call; if (c == null || !c.inBrackets) { this.TranslateToILObject(il, null, false); } else if (c.isConstructor && c.inBrackets) { //Dealing with (new T[x])[..] or (new T[x])(...), being handled late bound because it is an edge case c.TranslateToIL(il, Typeob.Object); il.Emit(OpCodes.Dup); return; } else { c.func.TranslateToIL(il, Typeob.Object); } this.expression.TranslateToIL(il, Typeob.Object); }