Done. All tests pass for tcl in leo-ctx5. (And with leo's recent fixes, hopefully this means on all platforms for real this time. =-)

This should also fix the problem on windows, as the missing functions have been uncommented, and are now available.

Please svn up and retest.

On Sep 15, 2005, at 11:27 AM, Will Coleda wrote:

Minor change to the exception PMC in the leo-ct5 branch - all exception class tests pass, but this version allows HLLs to use two slots in the exception object as a stopgap.

This came up as I'm in near the end of converting tcl in leo-ctx5: versions to date have used two return codes to indicate their return status: something like "TCL_OK", "5"... now OK will simply be a parrot '.return()', but any other type (i.e., TCL_CONTINUE, TCL_RETURN, TCL_BREAK, TCL_ERROR) will be handled with 'throw'.

This should
- improve future interoperability in some ways (no longer odd two- value return system; [error]s are now exceptions) - simplify quite a few cases where I can now simply let an exception propagate instead of checking and branching; - break future interoperability in other ways (what do you mean, return is an exception?)

All in all, I think it's a step in the right direction.

(Also, just an FYI: I have enough modified tcl code in the leo-ctx5 branch that I am now primarily developing off this branch. I had wanted to keep it separate, but it's the most practical solution until the merge back.)

Once I get all tests passing locally again, I'll commit and have every one retest on the various platforms.

Regards.

On Sep 15, 2005, at 11:13 AM, [EMAIL PROTECTED] wrote:



Author: coke
Date: Thu Sep 15 08:13:44 2005
New Revision: 9197

Modified:
   branches/leo-ctx5/classes/exception.pmc
Log:
Whoops. 3 and 4 *are* used. Add enough slots for all the documented slots,
plus 2 for HLL's to use for now.



Modified: branches/leo-ctx5/classes/exception.pmc
===================================================================== =========
--- branches/leo-ctx5/classes/exception.pmc    (original)
+++ branches/leo-ctx5/classes/exception.pmc Thu Sep 15 08:13:44 2005
@@ -66,8 +66,8 @@ Any information attached by the HL. This
 underscore (that is reserved for Parrot's internal usage. These are
 stored as properties.

-Note: currently, HLL information must be indexed by number. Slots 3 and
-4 are available. This is subject to change.
+Note: currently, HLL information must be indexed by number. Slots 9 and 10
+are available for the HLL - This is subject to change.

 =back

@@ -103,12 +103,18 @@ Initializes the exception with default v

     void init() {
         SUPER();
-        DYNSELF.set_integer_native(5);
+        DYNSELF.set_integer_native(11);
         DYNSELF.set_string_keyed_int(0, NULL);
         DYNSELF.set_integer_keyed_int(1, 0);
         DYNSELF.set_integer_keyed_int(2, 0);
         DYNSELF.set_pmc_keyed_int(3, NULL);
         DYNSELF.set_pmc_keyed_int(4, NULL);
+        DYNSELF.set_pmc_keyed_int(5, NULL);
+        DYNSELF.set_pmc_keyed_int(6, NULL);
+        DYNSELF.set_pmc_keyed_int(7, NULL);
+        DYNSELF.set_pmc_keyed_int(8, NULL);
+        DYNSELF.set_pmc_keyed_int(9, NULL);
+        DYNSELF.set_pmc_keyed_int(10, NULL);
     }

 /*









Reply via email to