Skip to content

Instantly share code, notes, and snippets.

@niner
Created October 5, 2021 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niner/89b2a8996f0c6b7e8e8a735a59ad0e28 to your computer and use it in GitHub Desktop.
Save niner/89b2a8996f0c6b7e8e8a735a59ad0e28 to your computer and use it in GitHub Desktop.
nqp::dispatch('boot-syscall', 'dispatcher-register', 'raku-nativecall', nqp::getattr(-> $capture is raw {
my $track_callee := nqp::dispatch('boot-syscall', 'dispatcher-track-arg', $capture, 0);
my $callee := nqp::captureposarg($capture, 0);
$callee.setup; #FIXME need to track callee literal
my $new_capture := nqp::dispatch('boot-syscall',
'dispatcher-insert-arg-literal-obj',
nqp::dispatch('boot-syscall', 'dispatcher-drop-arg', $capture, 0),
0, $callee.rettype);
nqp::dispatch('boot-foreign-code', $callee.call, $new_capture);
note "dispatch ended";
}, Code, '$!do'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment