@@ -219,16 +219,16 @@ public int[] TraceArguments(Instruction instr) {
219
219
int index = working . Dequeue ( ) ;
220
220
while ( index >= 0 ) {
221
221
if ( BeforeStackDepths [ index ] == targetStack ) {
222
- var currentInstr = method . Body . Instructions [ index ] ;
222
+ var currentInstr = Instructions [ index ] ;
223
223
currentInstr . CalculateStackUsage ( Method . HasReturnType , out int push , out pop ) ;
224
224
if ( push == 0 && pop == 0 ) {
225
225
// This instruction isn't doing anything to the stack. Could be a nop or some prefix.
226
226
// Ignore it and move on to the next.
227
- } else if ( method . Body . Instructions [ index ] . OpCode . Code != Code . Dup ) {
227
+ } else if ( Instructions [ index ] . OpCode . Code != Code . Dup ) {
228
228
// It's not a duplicate instruction, this is an acceptable start point.
229
229
break ;
230
230
} else {
231
- var prevInstr = method . Body . Instructions [ index - 1 ] ;
231
+ var prevInstr = Instructions [ index - 1 ] ;
232
232
prevInstr . CalculateStackUsage ( Method . HasReturnType , out push , out _ ) ;
233
233
if ( push > 0 ) {
234
234
// A duplicate instruction is an acceptable start point in case the preceeding instruction
@@ -256,7 +256,7 @@ public int[] TraceArguments(Instruction instr) {
256
256
return null ;
257
257
}
258
258
259
- while ( method . Body . Instructions [ beginInstrIndex ] . OpCode . Code == Code . Dup )
259
+ while ( Instructions [ beginInstrIndex ] . OpCode . Code == Code . Dup )
260
260
beginInstrIndex -- ;
261
261
262
262
// Trace the index of arguments
@@ -270,7 +270,7 @@ public int[] TraceArguments(Instruction instr) {
270
270
int index = tuple . Item1 ;
271
271
Stack < int > evalStack = tuple . Item2 ;
272
272
273
- while ( index != instrIndex && index < method . Body . Instructions . Count ) {
273
+ while ( index != instrIndex && index < Instructions . Length ) {
274
274
Instruction currentInstr = Instructions [ index ] ;
275
275
currentInstr . CalculateStackUsage ( Method . HasReturnType , out int push , out pop ) ;
276
276
if ( currentInstr . OpCode . Code == Code . Dup ) {
0 commit comments