Hello Joseph. I can provide more informations, but unfortunately it is like a ball of whool that never ends. That’s why I am more asking for a way to debug on my side …
There is no Error reported by the compiler, but it fails when running: I get: *** ERROR:pvt-maker:dump Type "procedure" expected, "bint" provided – 11130932 %hashtable is a “custom hashtable” so it is a function not a bigloo hash. To go futher: The “ (something that pass get-key in argument) “ Is something like: (for-each (lambda (the-pvt) (print-pvt the-pvt get-key)) lpvts) print-pvt is a function that will do: (the-pvt :dump get-key) Finaly the-pvt is a lambda that will also call another lambda with the “get-key” function. In this final function the get-key is an int instead of a function. Note that if for example, just before the for-each I put a “(print get-key)” Everything works. It is like Bigloo assume that get-key is not used and remove the computation of it. If I add the print, get-key is correctly computed (ie not replaced by the make-el-procedure 1) and the print-pvt function can use it correctly. Thanks for your Help, Pierre-Francois From: Joseph Donaldson [mailto:[email protected]] Sent: Friday, March 09, 2018 5:44 PM To: Ollagnon, Pierre-Francois <[email protected]>; [email protected] Subject: Re: [bigloo] Dataflow+ debuging Hello, Pierre-Francois, Can you provide some more information? For example, what is the actual error reported by the compiler and what is the definition of %hashtable? I assume from its use that it is either a function or macro, but it's name suggests it is a hashtable, which is problematic since they are not funcallable. Best Regards, Joseph Donaldson On Fri, Mar 9, 2018 at 8:16 AM, Ollagnon, Pierre-Francois <[email protected]<mailto:[email protected]>> ====================== (let* (((get-key (lambda (obj) (let* ((key (obj :get-key)) (stuff (%hashtable :get key))) (if stuff stuff "unknown")))) (something that pass get-key in argument) =================== -Note that “stuff” is a lambda After Dataflow it becomes: ================== (get-key (obj) (let ((key (funcall obj obj :get-key))) (let ((stuff (funcall %hashtable %hashtable :get key))) (let () (if stuff stuff "unknown"))))) ================== After the Dataflow+ it becomes: ================== Top of file: ----- ;; &get-key ;; procedure-el x obj -> obj ;; [static side-effect: #t occ: 1 rm: now loc: #{location src/pvtsc_rdb.scm 46059 973} user?: #t removable: now] (define (&get-key env obj) (let ((%hashtable (procedure-el-ref env 0))) (labels ((get-key (obj) (let ((key (funcall obj obj :get-key-pvtsc))) (let ((stuff (funcall %hashtable %hashtable :get key))) (let () (if stuff stuff "unknown")))))) (get-key obj)))) In the “normal code”: ------- (let ((get-key (make-el-procedure 1))) (begin (begin (procedure-el-set! get-key 0 %hashtable)) ================== Do you have any advice on how I can debug this ??? Best regards, Pierre-Francois
