ref: f13f110f2d09c959fee5abe27d3cee3c7dfeddef
parent: ab876b803ac6efb812fddc8a154202b80632eb5e
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Oct 23 11:11:54 EDT 2024
print-stack-trace: fix when boot logic fails
--- a/flisp.boot
+++ b/flisp.boot
@@ -157,7 +157,7 @@
largc lvargc vargc argc compile-in ret values #fn(function) encode-byte-code
bcode:code const-to-idx-vec)) filter keyword-arg?))
#fn(length))) #fn(length))) make-code-emitter lastcdr lambda-vars filter #.pair?
- lambda))) #0=#(#:g724 ()))
+ lambda))) #0=#(#:g726 ()))
compile-for #fn(":000n57084513X07101O825447101O835447101O845447202362:742561:" #(1arg-lambda?
compile-in emit for error "for: third form must be a 1-argument lambda") compile-for)
compile-if #fn("<000n420>710517105183T728351738351B3;0748351@60755065:" #(#fn(";000n582DC>070AF9028364:82OC>070AF9028464:70AFO8254471A22053470AF902835449023<071A2352@:071A24153475A052470AF9028454475A162:" #(compile-in
@@ -364,7 +364,7 @@
" has no value" error "error: " load-error print-exception "in file " list?
": " #fn("8000n120051;I5040R37071@4072061:" #(#fn(string?) princ print))
"*** Unhandled exception: " *linefeed*) print-exception)
- print-stack-trace #fn("8000n120>DD62:" #(#fn("=000n220>?0421>?1422>7374A75370r5@40r45251767728292:505252E63:" #(#fn("8000n320>2105182P61:" #(#fn("9000n120A5120F51C>02122230e361:24>25A5161:" #(#fn(function:code)
+ print-stack-trace #fn("8000n120>DD62:" #(#fn(">000n220>?0421>?1422>7374Ar3523F075A76370r5@40r452@30A517778292:2;505252E63:" #(#fn("8000n320>2105182P61:" #(#fn("9000n120A5120F51C>02122230e361:24>25A5161:" #(#fn(function:code)
#fn(raise) thrown-value ffound #fn(":000n1E70210515122>~:" #(1- #fn(length)
#fn("9000n170A0G513A0930A0G92191063:D:" #(closure?))))
#fn(function:vals))) #fn(function:name)) find-in-f)
@@ -373,8 +373,8 @@
#fn("8000n07021>F524O:" #(for-each #fn("9000n19100Aq63:" #())))
#fn("7000n10B;3B040<20Q;38040T21Q38072061:23061:" #(thrown-value
ffound caddr #fn(raise)))) fn-name) #fn("8000n37021>062:" #(for-each #fn("9000n1702190222534739110EGF5274051=P51475504902KMz02:" #(princ
- "#" " " print vector->list newline)))) reverse! list-tail *interactive*
- filter closure? #fn(map) #fn("7000n10Z;380420061:" #(#fn(top-level-value)))
+ "#" " " print vector->list newline)))) reverse! length> list-tail
+ *interactive* filter closure? #fn(map) #fn("7000n10Z;380420061:" #(#fn(top-level-value)))
#fn(environment)))) print-stack-trace)
print-to-string #fn("7000n120>215061:" #(#fn("8000n120A052421061:" #(#fn(write)
#fn(io.tostring!))) #fn(buffer)) print-to-string)
--- a/system.lsp
+++ b/system.lsp
@@ -939,7 +939,9 @@
(if p
(symbol (string.join (map string (reverse! p)) "/"))
'λ)))
- (let ((st (reverse! (list-tail st (if *interactive* 5 4))))
+ (let ((st (reverse! (if (length> st 3)
+ (list-tail st (if *interactive* 5 4))
+ st)))
(e (filter closure? (map (λ (s) (and (bound? s)
(top-level-value s)))
(environment))))