[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using EQ instead of EQL to compare catch tags



    From: Kent M Pitman <KMP%MIT-OZ at MIT-MC.ARPA>

    Is there a reason why EQ was chosen instead of EQL for comparing CATCH
    tags? It seems to me that signalling errors isn't likely to be so
    blindingly fast that using EQL instead of EQ would slow it down enough to
    matter, and it would simplify the definition (top of p140) to use EQL,
    wouldn't it?  This would be an upward compatible change.

Spice Lisp (and perhaps other implementations) would have trouble with that
change of definition.  In our case, the microcode knows only about fixnums and
short floats (immediate numbers for us), and escapes to macrocode routines for
arithmetic (and comparison) operations involving other sorts of numbers.  Throw
is implemented in microcode on the Perq, so if the Throw instruction was given
a bignum tag and ran into a bignum tag on the stack, it would have to escape to
macrocode to do the comparison.

But our macrocode escape machanism is designed to work only on instruction
boundaries, so there wouldn't be any clean way to get back into microcode to
continue the throw.  I could certainly add some kludge to the Perq microcode to
deal with the EQL test, but since there are other imlementations out there with
tense EQ'ing loops in microcode, assembly code, Bliss, or whatever, I don't
think the change is worth the trouble.  Also, there would be some loss of
performance on stock hardware by putting the EQL into the inner loop of throw.

--Skef