That question re: primitive numbers.

Andres Valloud sqrmax at prodigy.net
Sun Jul 29 20:17:40 UTC 2001


Hi.

Ok, I found it... it's in an update (#3792 if memory serves correctly)
regarding exceptions, and improvements so that in a jitter vm the
contexts are not realized when handling exceptions.  It reads:

> For this version, the methods are marked by using two primitives (198 for unwind and 199 for handler) since there is only one 'spare' bit in the method header. The two prims are left unimplemented for the normal vm since that leaves them as simple failure cases that let the bytecodes do the work as before (actually, empty macros are used in the hoe of making it simpler for Ian as well as stamping on the prim table entries to claim them). For the jitter we can use the prims to do real frame marking.

Now, this means that for a normal VM, if the methods use prims 198 and
199 instead of 186 and 187, exception handling via on:do:, ensure: and
ifCurtailed: will not work (as I have experienced).  Wouldn't it be less
confusing to claim primitive numbers 186 and 187, the ones used before,
and just have a different implementation at the VM level so no changes
are needed in the Smalltalk code when you change VMs?

Please correct me if I'm wrong...

Andres.




More information about the Squeak-dev mailing list