Commit 1f57d7e2 authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

cmp: add type checks to boole compiler macro

parent 9391a2bf
......@@ -23,12 +23,12 @@
(define-compiler-macro boole (&whole form op-code op1 op2)
(or (and (constantp op-code *cmp-env*)
(case (ext:constant-form-value op-code *cmp-env*)
(#. boole-clr `(progn ,op1 ,op2 0))
(#. boole-set `(progn ,op1 ,op2 -1))
(#. boole-1 `(prog1 ,op1 ,op2))
(#. boole-2 `(progn ,op1 ,op2))
(#. boole-c1 `(prog1 (lognot ,op1) ,op2))
(#. boole-c2 `(progn ,op1 (lognot ,op2)))
(#. boole-clr `(progn (checked-value integer ,op1) (checked-value integer ,op2) 0))
(#. boole-set `(progn (checked-value integer ,op1) (checked-value integer ,op2) -1))
(#. boole-1 `(prog1 (checked-value integer ,op1) (checked-value integer ,op2)))
(#. boole-2 `(progn (checked-value integer ,op1) (checked-value integer ,op2)))
(#. boole-c1 `(prog1 (lognot ,op1) (checked-value integer ,op2)))
(#. boole-c2 `(progn (checked-value integer ,op1) (lognot ,op2)))
(#. boole-and `(logand ,op1 ,op2))
(#. boole-ior `(logior ,op1 ,op2))
(#. boole-xor `(logxor ,op1 ,op2))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment