Skip to content

Instantly share code, notes, and snippets.

@bacek
Created February 21, 2012 04:42
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 bacek/1873726 to your computer and use it in GitHub Desktop.
Save bacek/1873726 to your computer and use it in GitHub Desktop.
Rakudo's patch for cont_reuse Parrot's branch.
diff --git a/src/binder/multidispatch.c b/src/binder/multidispatch.c
index b1be465..4aa085e 100644
--- a/src/binder/multidispatch.c
+++ b/src/binder/multidispatch.c
@@ -545,7 +545,6 @@ static PMC* find_best_candidate(PARROT_INTERP, Rakudo_md_candidate_info **candid
INTVAL i;
for (i = 0; i < possibles_count; i++) {
- interp->current_cont = (PMC *)NEED_CONTINUATION;
Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), NULL);
/* First, if there's a required named parameter and it was
@@ -579,6 +578,8 @@ static PMC* find_best_candidate(PARROT_INTERP, Rakudo_md_candidate_info **candid
* Get it compiled. */
Parrot_ext_call(interp, cthunk, "->");
}
+
+ Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
where = VTABLE_invoke(interp, possibles[i]->sub, next);
lexpad = Parrot_pcc_get_lex_pad(interp, CURRENT_CONTEXT(interp));
sig = possibles[i]->signature;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment