Author: allison
Date: Wed Aug 20 14:55:32 2008
New Revision: 30405
Modified:
trunk/src/ops/core.ops
trunk/src/pmc/exception.pmc
trunk/t/op/exceptions.t
Log:
[exceptions] Renaming the new attribute for a resume continuation in the
Exception PMC to 'resume' instead of 'retcont', for clarity.
Modified: trunk/src/ops/core.ops
==============================================================================
--- trunk/src/ops/core.ops (original)
+++ trunk/src/ops/core.ops Wed Aug 20 14:55:32 2008
@@ -818,7 +818,7 @@
opcode_t * dest;
opcode_t * const ret = expr NEXT();
PMC * resume = new_ret_continuation_pmc(interp, ret);
- VTABLE_set_attr_str(interp, $1, const_string(interp, "retcont"), resume);
+ VTABLE_set_attr_str(interp, $1, const_string(interp, "resume"), resume);
dest = Parrot_ex_throw_from_op(interp, $1, resume);
goto ADDRESS(dest);
}
Modified: trunk/src/pmc/exception.pmc
==============================================================================
--- trunk/src/pmc/exception.pmc (original)
+++ trunk/src/pmc/exception.pmc Wed Aug 20 14:55:32 2008
@@ -57,7 +57,7 @@
ATTR FLOATVAL birthtime; /* The creation time stamp of the exception.
*/
ATTR STRING *message; /* The exception message. */
ATTR PMC *payload; /* The payload for the exception. */
- ATTR PMC *retcont; /* The return continuation for the exception.
*/
+ ATTR PMC *resume; /* A continuation for resuming after handling
the exception. */
ATTR INTVAL severity; /* The severity of the exception. */
ATTR INTVAL type; /* The type of the exception. */
ATTR INTVAL exit_code; /* The exit code of the exception. */
@@ -94,7 +94,7 @@
core_struct->handled = 0;
core_struct->message = CONST_STRING(interp, "");
core_struct->payload = PMCNULL;
- core_struct->retcont = PMCNULL;
+ core_struct->resume = PMCNULL;
core_struct->stacktrace = PMCNULL;
core_struct->handler_iter = PMCNULL;
}
@@ -115,8 +115,8 @@
pobject_lives(interp, (PObj *)core_struct->message);
if (core_struct->payload)
pobject_lives(interp, (PObj *)core_struct->payload);
- if (core_struct->retcont)
- pobject_lives(interp, (PObj *)core_struct->retcont);
+ if (core_struct->resume)
+ pobject_lives(interp, (PObj *)core_struct->resume);
if (core_struct->stacktrace)
pobject_lives(interp, (PObj *)core_struct->stacktrace);
if (core_struct->handler_iter)
@@ -539,8 +539,8 @@
else if (string_equal(INTERP, name, CONST_STRING(INTERP, "payload"))
== 0) {
GET_ATTR_payload(interp, SELF, value);
}
- else if (string_equal(INTERP, name, CONST_STRING(INTERP, "retcont"))
== 0) {
- GET_ATTR_retcont(interp, SELF, value);
+ else if (string_equal(INTERP, name, CONST_STRING(INTERP, "resume")) ==
0) {
+ GET_ATTR_resume(interp, SELF, value);
}
else if (string_equal(INTERP, name, CONST_STRING(INTERP,
"stacktrace")) == 0) {
GET_ATTR_stacktrace(interp, SELF, value);
@@ -591,8 +591,8 @@
else if (string_equal(INTERP, name, CONST_STRING(INTERP, "payload"))
== 0) {
SET_ATTR_payload(interp, SELF, value);
}
- else if (string_equal(INTERP, name, CONST_STRING(INTERP, "retcont"))
== 0) {
- SET_ATTR_retcont(interp, SELF, value);
+ else if (string_equal(INTERP, name, CONST_STRING(INTERP, "resume")) ==
0) {
+ SET_ATTR_resume(interp, SELF, value);
}
else if (string_equal(INTERP, name, CONST_STRING(INTERP,
"stacktrace")) == 0) {
SET_ATTR_stacktrace(interp, SELF, value);
Modified: trunk/t/op/exceptions.t
==============================================================================
--- trunk/t/op/exceptions.t (original)
+++ trunk/t/op/exceptions.t Wed Aug 20 14:55:32 2008
@@ -622,7 +622,7 @@
.local pmc c
.get_results (e, s)
say 'In the exception handler'
- c = e['retcont']
+ c = e['resume']
c()
.end
CODE