with latest quicklisp version.
PS> (ps (with-slots (x y) p (if (< x 0) y x))) "if (p.x < 0) { p.y; } else { p.x; };"
PS> (ps (lambda (p) (with-slots (x y) p (if (< x 0) y x)))) Control stack guard page temporarily disabled: proceed with caution ; Evaluation aborted on #<SB-KERNEL::CONTROL-STACK-EXHAUSTED {10050DD133}>.
Backtrace: 0: (sb-kernel::control-stack-exhausted-error) 1: ("foreign function: call_into_lisp") 2: ("foreign function: post_signal_tramp") 3: (sb-impl::gethash3 0 34360628242 0) 4: ((flet #:body-fun-224564 :in sb-impl::gethash3)) 5: (lookup-macro-def x (#<hash-table :TEST eq :COUNT 2 {100507F353}> #<hash-table :TEST eq :COUNT 4 {1004118C13}>)) 6: (ps-macroexpand-1 x) 7: (ps-macroexpand x) 8: (try-expressionizing-if? 'x 1) 9: (try-expressionizing-if? (%js-getprop p 'x) 1) 10: (try-expressionizing-if? 'x 1) 11: (try-expressionizing-if? (%js-getprop p 'x) 1) 12: (try-expressionizing-if? 'x 1) 13: (try-expressionizing-if? (%js-getprop p 'x) 1) 14: (try-expressionizing-if? 'x 1) 15: (try-expressionizing-if? (%js-getprop p 'x) 1) 16: (try-expressionizing-if? 'x 1) 17: (try-expressionizing-if? (%js-getprop p 'x) 1) 18: (try-expressionizing-if? 'x 1) 19: (try-expressionizing-if? (%js-getprop p 'x) 1)
The bug is not a show-stopper because I can do this: PS> (ps (lambda (p) (with-slots (x y) p (cond ((< x 0) y) (t x))))) "(function (p) { if (p.x < 0) { return p.y; } else { return p.x; }; });"
-- andy