News for hackers. Stuff that matters.
Re:Neat Rust Tricks: Passing Closures to C by a1369209993 on Monday November 25, 2019 @10:58PM (#21635551)
Nope! You'd do something to the effect of:

  clo_code:
  4C8B1501100000  mov r10 [rel clo_code+0x1008]
  FF25F30F0000    jmp [rel clo_code+0x1000]
  0F1F00          nop3
  # one page away...
  struct clo_slot {
    void (*func)(void* _R10,...);
    void* data;
    };
Edit: to use r10 rather than rotating all the argument registers.

There are no comments on this comment yet.