Skip to content

Commit

Permalink
Make wrap dispatch fall back on outer dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 28, 2021
1 parent 75a9cb6 commit 5258713
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/vm/moar/dispatchers.nqp
Expand Up @@ -1343,9 +1343,13 @@ nqp::dispatch('boot-syscall', 'dispatcher-register', 'raku-invoke-wrapped',
}
}
else {
# Nowhere to defer to, so give back Nil.
nqp::dispatch('boot-syscall', 'dispatcher-delegate', 'boot-constant',
nqp::dispatch('boot-syscall', 'dispatcher-insert-arg-literal-obj',
$capture, 0, Nil));
# This dispatcher is exhausted. However, there may be another one
# we can try (for example, in a wrapped method). Only do this if
# it's not lastcall. Failing that, give back Nil.
if $kind == 2 || !nqp::dispatch('boot-syscall', 'dispatcher-next-resumption') {
nqp::dispatch('boot-syscall', 'dispatcher-delegate', 'boot-constant',
nqp::dispatch('boot-syscall', 'dispatcher-insert-arg-literal-obj',
$capture, 0, Nil));
}
}
});

0 comments on commit 5258713

Please sign in to comment.