Beispiel #1
0
 /// <summary>
 /// Returns the frame entry for the given operand for the current instruction
 /// </summary>
 /// <param name="index">The index of the operand</param>
 public StackFrameEntry GetStackOperand(int index)
 {
     return(new StackFrameEntry(
                NativeHelpers.AddOffsetToIntPointer(
                    this.BasePointer,
                    -8 * (1 + this.Function.Definition.Parameters.Count + this.Function.Locals.Count + index)),
                this.OperandTypes[this.OperandTypes.Count - 1 - index]));
 }
Beispiel #2
0
 /// <summary>
 /// Returns a pointer to the given element
 /// </summary>
 /// <param name="index">The index of the element</param>
 public IntPtr GetElement(int index)
 {
     return(NativeHelpers.AddOffsetToIntPointer(this.ElementsPointer, index * this.elementSize));
 }
Beispiel #3
0
 /// <summary>
 /// Returns the frame entry for the given function argument
 /// </summary>
 /// <param name="index">The index of the argument</param>
 public StackFrameEntry GetArgument(int index)
 {
     return(new StackFrameEntry(
                NativeHelpers.AddOffsetToIntPointer(this.BasePointer, -8 * (1 + index)),
                this.Function.Definition.Parameters[index]));
 }