pseudo-code for runops_args:

  runops_args(PMC* sub, char* sig, va_list ap) {
    dest = VTABLE_invoke(interpreter, sub, NULL);
    REG_*[*] = ap[*], as appropriate
    if (dest) runops
  }

However, VTABLE_invoke on NCI methods is where the "real work" is done (including reading from and writing to registers), and a null dest is returned.

The net effect is that if you try to invoke a NCI with a signature of "PP", the NCI method will be called with whatever happens to be in PMC_REG(5) at the time, and what it returns will be overwritten with your first argument.

Is there a reason why the invoke couldn't be done immediately prior to the call to runops?

- Sam Ruby




Reply via email to