[svn:parrot] r43173 - branches/context_unify3_simple/src/call

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Dec 20 05:43:10 UTC 2009


Author: bacek
Date: Sun Dec 20 05:43:10 2009
New Revision: 43173
URL: https://trac.parrot.org/parrot/changeset/43173

Log:
Remove trailing spaces.

Modified:
   branches/context_unify3_simple/src/call/context.c

Modified: branches/context_unify3_simple/src/call/context.c
==============================================================================
--- branches/context_unify3_simple/src/call/context.c	Sun Dec 20 05:42:16 2009	(r43172)
+++ branches/context_unify3_simple/src/call/context.c	Sun Dec 20 05:43:10 2009	(r43173)
@@ -306,6 +306,15 @@
                            ? NULL
                            : get_context_struct_fast(interp, pmcold);
 
+    PARROT_ASSERT(!PMC_IS_NULL(pmcctx) || !"Can't initialise Null CallContext");
+
+    /*
+     * FIXME Invoking corotine shouldn't initialise context. So just
+     * check ctx->current_sub. If it's not null return from here
+     */
+    if (!PMC_IS_NULL(ctx->current_sub))
+        return;
+
     ctx->current_results   = NULL;
     ctx->results_signature = NULL;
     ctx->lex_pad           = PMCNULL;
@@ -480,6 +489,8 @@
 
     /* ctx.bp_ps points to S0, which has Px on the left */
     ctx->bp_ps.regs_s = (STRING **)((char *)ctx->registers + size_nip);
+
+    clear_regs(interp, pmcctx);
 }
 
 
@@ -570,7 +581,7 @@
 =item C<PMC * Parrot_pcc_allocate_empty_context(PARROT_INTERP, PMC *old)>
 
 Allocates and returns a new context.  Does not set this new context as the
-current context. 
+current context.
 
 =cut
 
@@ -600,7 +611,6 @@
 */
 
 PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
 PMC *
 Parrot_pcc_init_context(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *old))
 {


More information about the parrot-commits mailing list