Skip to content

Instantly share code, notes, and snippets.

@mlschroe
Created August 30, 2011 15: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 mlschroe/1181233 to your computer and use it in GitHub Desktop.
Save mlschroe/1181233 to your computer and use it in GitHub Desktop.
--- ./src/pmc/sub.pmc.orig 2011-08-30 15:52:12.000000000 +0000
+++ ./src/pmc/sub.pmc 2011-08-30 15:56:05.000000000 +0000
@@ -428,6 +428,9 @@ Invokes the subroutine.
Parrot_pcc_set_context(INTERP, context);
Parrot_pcc_set_caller_ctx(INTERP, context, caller_ctx);
+ /* support callcontext reuse */
+ if (context == caller_ctx)
+ Parrot_pcc_free_registers(INTERP, context);
Parrot_pcc_allocate_registers(INTERP, context, sub->n_regs_used);
/* Preserve object */
object = Parrot_pcc_get_object(INTERP, context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment