jscl
jscl copied to clipboard
All too
SBCL
CL-USER> (let ((ii 0) xx yy)
(values (ash (progn (setf xx (incf ii)) 1)
(progn (setf yy (incf ii)) 2))
ii xx yy))
4
2
1
2
JSCL
CL-USER> (let ((ii 0) xx yy)
... (values (ash (progn (setf xx (incf ii)) 1)
... (progn (setf yy (incf ii)) 2))
... ii xx yy))
...
4
3
2
3
Workaround:
CL-USER> (defun %ash (x y) (ash x y))
%ASH
CL-USER> (let ((ii 0) xx yy)
... (values (%ash (progn (setf xx (incf ii)) 1)
... (progn (setf yy (incf ii)) 2))
... ii xx yy))
...
4
2
1
2
Looks like the code generator again is not using the right operator precedence? That would explain why the function call works but the inlined primitive fails.
In the table, the priorities for operations are set according to ...
The problem appears when compilation of the progn block is mixed into any local variable of the ash macro.
Intuitively I can say that this is a problem with the progn