libera/#clasp - IRC Chatlog
Search
2:41:25
drmeister
I do say this though: static constexpr size_t MaxStackWords = 16384; // 16K words for now.
3:41:03
drmeister
I evaluate (fib 33) and print the stack for every instruction and there's no problem.
4:16:32
drmeister
I evaluate (fib 33) and the stack stays at 1000 bytes or so all the way except at the end it balloons.
5:28:33
drmeister
::notify Bike There is something deeply wrong. When I evaluate (fib 31) the evaluation goes off the rails at some point. So I'm trying to compile the following but the compiler isn't ready for it yet. I want to ID where it goes off the rails and then get udb in there to figure it out.
5:28:35
drmeister
(setf (fdefinition 'fib) (compile-to-vm::bcompile '(lambda (n cn) (setf (car cn) (+ (car cn) 1)) (format t "cn ~a~%" (car cn)) (if (eql n 1) 0 (if (eql n 2) 1 (+ (fib (- n 1) cn) (fib (- n 2) cn)))))))
9:23:38
karlosz
Bike, drmeister: i just implemented cell elision so now we don't make any unnecessary cells and no longer cons for stuff like fib. its pretty much as optimal as we can get for 1 pass at least (though the fixup logic may not be so good asymptotically speaking at the moment)
9:24:00
karlosz
also Bike i changed the order of CELL-SET's arguments in order to facilitate this, so the c++ vm will need to be modified.
12:43:28
drmeister
I print the height of the stack just inside the while (1) loop and just before the switch statement.
12:43:46
drmeister
(setf (fdefinition 'fib) (compile-to-vm::bcompile '(lambda (n) (if (eql n 1) 0 (if (eql n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))))))
13:03:27
Colleen
Bike: drmeister said 7 hours, 34 minutes ago: There is something deeply wrong. When I evaluate (fib 31) the evaluation goes off the rails at some point. So I'm trying to compile the following but the compiler isn't ready for it yet. I want to ID where it goes off the rails and then get udb in there to figure it out.
13:22:21
Bike
(lambda (x) (setq x 3) x) puts x in a cell, and does ref 0 const 0 cell-set, with the old order
13:29:04
drmeister
I wonder if your musing about problems is relevant to the (fib 31) blowing up but (fib 30) working
13:39:28
drmeister
The stack pointer just takes off at some point until it points into what I presume is boehm memory and pushes values into it and only then does it crash.
14:20:37
drmeister
I could buffer this and search for that different sequence and then get to where it goes bad.
14:21:06
drmeister
I'm worried the code may be getting modified, or a key datastructure is getting modified and then it breaks.