Ivan Boldyrev <[EMAIL PROTECTED]> writes:

> On 8689 day of my life Raymond Toy wrote:
> > If you really MUST have fast fixnum, here is one way to do it in
> > cmucl.
> >
> > (in-package :vm)
> > (defknown fixnum+ (fixnum fixnum)
> >   fixnum
> >   (movable foldable flushable))
> >
> > (define-vop (fixnum-add fast-+/fixnum=>fixnum)
> >   (:translate fixnum+))
> >
> > (defun fixnum+ (x y)
> >   (declare (fixnum x y))
> >   (fixnum+ x y))
> >
> > Then
> >
> > (vm:fixnum+ most-positive-fixnum 1) => -536870912
> 
> It's exactly what I want!  But when I try (fixnum+ anything1
> anything2), it just loops and cons a memory...  I can't fix it without
> your help, because I don't understand anyting here :(

Wrap (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) ...)
around DEFKNOWN and DEFINE-VOP. If it does not help, replace DEFUN
with (SETF FDEFINITION).

-- 
Regards,
Alexey Dejneka

"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer

Reply via email to