[svn:parrot] r43020 - in branches/context_unify3: include/parrot src/call

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Dec 12 19:51:05 UTC 2009


Author: bacek
Date: Sat Dec 12 19:51:05 2009
New Revision: 43020
URL: https://trac.parrot.org/parrot/changeset/43020

Log:
Expose init_context function.

Modified:
   branches/context_unify3/include/parrot/call.h
   branches/context_unify3/src/call/context.c

Modified: branches/context_unify3/include/parrot/call.h
==============================================================================
--- branches/context_unify3/include/parrot/call.h	Sat Dec 12 19:50:40 2009	(r43019)
+++ branches/context_unify3/include/parrot/call.h	Sat Dec 12 19:51:05 2009	(r43020)
@@ -483,6 +483,14 @@
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
+PMC * Parrot_pcc_init_context(PARROT_INTERP,
+    ARGIN(PMC *ctx),
+    ARGIN_NULLOK(PMC *old))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
 PMC * Parrot_set_new_context(PARROT_INTERP,
     ARGIN(const INTVAL *number_regs_used))
         __attribute__nonnull__(1)
@@ -554,6 +562,9 @@
 #define ASSERT_ARGS_Parrot_pcc_free_registers __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmcctx))
+#define ASSERT_ARGS_Parrot_pcc_init_context __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(ctx))
 #define ASSERT_ARGS_Parrot_set_new_context __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(number_regs_used))

Modified: branches/context_unify3/src/call/context.c
==============================================================================
--- branches/context_unify3/src/call/context.c	Sat Dec 12 19:50:40 2009	(r43019)
+++ branches/context_unify3/src/call/context.c	Sat Dec 12 19:51:05 2009	(r43020)
@@ -591,6 +591,28 @@
 
 /*
 
+=item C<PMC * Parrot_pcc_init_context(PARROT_INTERP, PMC *ctx, PMC *old)>
+
+Initialise new context from old.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PMC *
+Parrot_pcc_init_context(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *old))
+{
+    ASSERT_ARGS(Parrot_pcc_init_context)
+
+    init_context(interp, ctx, old);
+
+    return ctx;
+}
+
+/*
+
 =item C<PMC * Parrot_set_new_context(PARROT_INTERP, const INTVAL
 *number_regs_used)>
 


More information about the parrot-commits mailing list