[parenscript-devel] bug with lambda, with-slots, and if
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
On Sun, May 6, 2012 at 10:06 AM, Andy Peterson <andy.arvid@gmail.com> wrote:
Control stack guard page temporarily disabled: proceed with caution ; Evaluation aborted on #<SB-KERNEL::CONTROL-STACK-EXHAUSTED {10050DD133}>.
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)
That reminds me that I forgot to report a similar problem with symbol macros, for example in (define-symbol-macro foo (ps:@ a foo)) (lambda () (when (> foo 1) 2)) I think the patch at https://github.com/3b/parenscript/commit/cb4a605ef0ac4fcea1e0ccec23d5748cee6... should fix both cases. -- 3b
Yes, I tested 3b's patch with current git version and the bug goes away andy On Sun, May 6, 2012 at 2:02 PM, Bart Botta <00003b@gmail.com> wrote:
On Sun, May 6, 2012 at 10:06 AM, Andy Peterson <andy.arvid@gmail.com> wrote:
Control stack guard page temporarily disabled: proceed with caution ; Evaluation aborted on #<SB-KERNEL::CONTROL-STACK-EXHAUSTED {10050DD133}>.
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)
That reminds me that I forgot to report a similar problem with symbol macros, for example in
(define-symbol-macro foo (ps:@ a foo)) (lambda () (when (> foo 1) 2))
I think the patch at
https://github.com/3b/parenscript/commit/cb4a605ef0ac4fcea1e0ccec23d5748cee6... should fix both cases.
-- 3b
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
Thanks a lot for the bug report and the patch! It's pushed to the official Parenscript repository and will be in the next release. Vladimir On Mon, May 7, 2012 at 8:34 AM, Andy Peterson <andy.arvid@gmail.com> wrote:
Yes, I tested 3b's patch with current git version and the bug goes away
andy
On Sun, May 6, 2012 at 2:02 PM, Bart Botta <00003b@gmail.com> wrote:
On Sun, May 6, 2012 at 10:06 AM, Andy Peterson <andy.arvid@gmail.com> wrote:
Control stack guard page temporarily disabled: proceed with caution ; Evaluation aborted on #<SB-KERNEL::CONTROL-STACK-EXHAUSTED {10050DD133}>.
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)
That reminds me that I forgot to report a similar problem with symbol macros, for example in
(define-symbol-macro foo (ps:@ a foo)) (lambda () (when (> foo 1) 2))
I think the patch at
https://github.com/3b/parenscript/commit/cb4a605ef0ac4fcea1e0ccec23d5748cee6... should fix both cases.
-- 3b
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
participants (3)
-
Andy Peterson
-
Bart Botta
-
Vladimir Sedach