[svn:parrot] r47119 - in trunk/src: . pmc
jonathan at svn.parrot.org
jonathan at svn.parrot.org
Sun May 30 00:13:16 UTC 2010
Author: jonathan
Date: Sun May 30 00:13:16 2010
New Revision: 47119
URL: https://trac.parrot.org/parrot/changeset/47119
Log:
[core] A little cleanup now we have GC-able contexts.
Modified:
trunk/src/exceptions.c
trunk/src/pmc/exception.pmc
Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c Sun May 30 00:09:10 2010 (r47118)
+++ trunk/src/exceptions.c Sun May 30 00:13:16 2010 (r47119)
@@ -354,10 +354,8 @@
}
/* Note the thrower.
- * XXX TT #596 - pass in current context instead when we have context PMCs. */
- /* Don't split line. It will break CONST_STRING handling */
- VTABLE_set_attr_str(interp, exception, CONST_STRING(interp, "thrower"), Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp)));
-
+ * Don't split line. It will break CONST_STRING handling. */
+ VTABLE_set_attr_str(interp, exception, CONST_STRING(interp, "thrower"), CURRENT_CONTEXT(interp));
/* it's a C exception handler */
if (PObj_get_FLAGS(handler) & SUB_FLAG_C_HANDLER) {
Modified: trunk/src/pmc/exception.pmc
==============================================================================
--- trunk/src/pmc/exception.pmc Sun May 30 00:09:10 2010 (r47118)
+++ trunk/src/pmc/exception.pmc Sun May 30 00:13:16 2010 (r47119)
@@ -689,13 +689,7 @@
SET_ATTR_handler_iter(INTERP, SELF, value);
break;
case attr_thrower:
- /* Ensure it's a ret cont, and extract the from_ctx.
- * XXX TT #596 - when we have Context PMCs, just take and set that. */
- if (!PMC_IS_NULL(value) && VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Continuation"))) {
- PMC * const ctx = PMC_cont(value)->from_ctx;
- if (!PMC_IS_NULL(ctx))
- SET_ATTR_thrower(INTERP, SELF, ctx);
- }
+ SET_ATTR_thrower(INTERP, SELF, value);
break;
case attr_NONE:
/* If unknown attribute name, throw an exception. */
More information about the parrot-commits
mailing list