The refactor has either caught up, or is close, and is much faster.
Need to make partial_eval_helper able to fail though, so that it can fail in the now fallible compiler. Squashed commit of the following: commit 283150d1e19cf9f74bc32e9c554f5e041d53582d Author: Nathan Braswell <miloignis@gmail.com> Date: Tue Jan 18 00:14:51 2022 -0500 Another bugfix, I think now we're truely running into the partial-eval needs to be able to fail part commit c62c228a1e89e7922850d2070bc046e5f80af5a5 Author: Nathan Braswell <miloignis@gmail.com> Date: Mon Jan 17 23:34:19 2022 -0500 Fixed needed check, added note on needing to support failing partial eval commit d480e486210dd5c7c4842e3a3d3e447dc7a5274e Author: Nathan Braswell <miloignis@gmail.com> Date: Mon Jan 17 22:14:58 2022 -0500 Fixed compilation bugs, added debugging prints to running. commit fc4dc4d3170bf1ceb4cd934cff54dd9ce6c8713a Author: Nathan Braswell <miloignis@gmail.com> Date: Mon Jan 17 17:28:29 2022 -0500 The unique id / ctx refactor is starting to work, with all basic test cases compiling & partial evaling, but mis-compile bugs remaining
This commit is contained in:
1135
partial_eval.csc
1135
partial_eval.csc
File diff suppressed because it is too large
Load Diff
@@ -12,22 +12,23 @@
|
|||||||
(let1 Y (lambda (f)
|
(let1 Y (lambda (f)
|
||||||
((lambda (x1) (x1 x1))
|
((lambda (x1) (x1 x1))
|
||||||
(lambda (x2) (f (lambda (& y) (lapply (x2 x2) y))))))
|
(lambda (x2) (f (lambda (& y) (lapply (x2 x2) y))))))
|
||||||
(let1 vY (lambda (f)
|
;(let1 vY (lambda (f)
|
||||||
((lambda (x3) (x3 x3))
|
; ((lambda (x3) (x3 x3))
|
||||||
(lambda (x4) (f (vau de (& y) (vapply (x4 x4) y de))))))
|
; (lambda (x4) (f (vau de (& y) (vapply (x4 x4) y de))))))
|
||||||
;(let1 let (vY (lambda (recurse) (vau de (vs b) (cond (= (len vs) 0) (eval b de)
|
;(let1 let (vY (lambda (recurse) (vau de (vs b) (cond (= (len vs) 0) (eval b de)
|
||||||
; true (vapply let1 (array (idx vs 0) (idx vs 1) (array recurse (slice vs 2 -1) b)) de)))))
|
; true (vapply let1 (array (idx vs 0) (idx vs 1) (array recurse (slice vs 2 -1) b)) de)))))
|
||||||
|
|
||||||
|
|
||||||
(array 'open 3 "test_self_out" (lambda (fd code)
|
(array 'open 3 "test_self_out" (lambda (fd code)
|
||||||
(array 'write fd "wabcde" (lambda (written code)
|
(array 'write fd "wabcdefge" (lambda (written code)
|
||||||
(array 'exit written)))))
|
(array 'exit written)))))
|
||||||
|
|
||||||
|
;(array 'write 1 "test_self_out2" (vau (written code) 1))
|
||||||
|
|
||||||
|
|
||||||
; end of all lets
|
; end of all lets
|
||||||
|
)))));))
|
||||||
)
|
)
|
||||||
;)
|
|
||||||
))))))
|
|
||||||
|
|
||||||
; impl of let1
|
; impl of let1
|
||||||
; this would be the macro style version (((;)) (vau de (s v b) (eval (array (array wrap (array vau (array s) b)) v) de)))
|
; this would be the macro style version (((;)) (vau de (s v b) (eval (array (array wrap (array vau (array s) b)) v) de)))
|
||||||
|
|||||||
Reference in New Issue
Block a user