SetCallArg() public method

Sets argument for an upcoming call.
public SetCallArg ( int argumentNumber, object value ) : void
argumentNumber int Index of the argument (0=first, 1=second, etc.)
value object Value of the argument
return void
Esempio n. 1
0
 private void PushCallArgs(PrologContext context, int framePointer, int arity, ref ushort pc)
 {
     for (int i = 0; i < arity; i++)
     {
         byte   maybeReg      = code[pc++];
         object argumentValue = (maybeReg < 0x80) ?
                                context.GetStack(framePointer, maybeReg & 0x7f)
                                   : GlobalLiteralTable[((maybeReg & 0x7f) << 8) + code[pc++]];
         context.SetCallArg(i, argumentValue);
     }
 }