shithub: sl

Download patch

ref: 7ff18f7668116d3b7d6e4346ec601f83529a77d1
parent: 1532ee600d35a23b8ec968871ad349fdc7f7c5cf
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Feb 4 23:37:54 EST 2025

a fixup: gensyms are not self-evaluating

--- a/boot/flisp.boot
+++ b/boot/flisp.boot
@@ -22,10 +22,10 @@
 	    *syntax-environment* #table(bcode:nconst #fn("7000n1200r2e3:" #(aref))  doc-for #fn("@000\x8710002000\x881000I60O?140B;35040<;I40402086510B;35040=88II087\\3?07122862353@30O@F087\\360O@<071228624534252686e2261e22688e2e4:" #(#fn(top-level-value)
   error "docs: " ": no funvars specified" ": funvars set but isn't a function" symbol-set-doc quote))  with-input-from #fn("<000z12021e1220e2e1e12315163:" #(#fn(nconc)
   with-bindings *input-stream* #fn(copy-list)))  unless #fn("<000z1200O211Pe4:" #(if begin))  time #fn("=000n1202122e1e2e123024252622e121e32728e5e3e3:" #(let
-  #:g357 time-now prog1 princ "Elapsed time: " - " seconds" *linefeed*))  cond #fn(";000z0\x8d\x8a520852185>1_51485<061:" #(#0=#fn("7000z0\x8d:" #() void)
+  #:g358 time-now prog1 princ "Elapsed time: " - " seconds" *linefeed*))  cond #fn(";000z0\x8d\x8a520852185>1_51485<061:" #(#0=#fn("7000z0\x8d:" #() void)
   #fn(">000n10H340O:0<85<20Q;I80485<DQ3C085=J6085<:2185=P:85=J@02285<A<0=51e3:85T23C\x94074758551513c07675855151278685<e2e12886217975855151PA<0=51e4e3:272:85<e2e1282:7585512:e2A<0=51e4e3:2885<2185=PA<0=51e4:" #(else
   begin or => 1arg-lambda? caddr caadr let if cddr #:g26) cond-clauses->if)))  do #fn("I000z21<2071052207205220230522425268827872829e12:1=51522829e12:82512825e18:52e153e4e3e2e12825e18952e3:" #(#fn(map)
-  car cadr #fn("6000n170051B38071061:0<:" #(cddr caddr)) letrec #:g327 λ if #fn(nconc) begin #fn(copy-list)))  mark-label #fn("8000n22002122e21e4:" #(emit
+  car cadr #fn("6000n170051B38071061:0<:" #(cddr caddr)) letrec #:g328 λ if #fn(nconc) begin #fn(copy-list)))  mark-label #fn("8000n22002122e21e4:" #(emit
   quote label))  with-bindings #fn("G000z12071052207205220230522425e12076888653e12720288687535129242:e12715152242:e127202;8688535152e3e164:" #(#fn(map)
   car cadr #fn("5000n12060:" #(#fn(gensym))) #fn(nconc) let list #fn(copy-list)
   #fn("7000n22001e3:" #(set!)) unwind-protect begin #fn("7000n22001e3:" #(set!))))  let #fn(">000z1O0R3B00?641<?041=?1@30O42021e12223052e124151532225052863C0268687e2e186e3@408788P:" #(#fn(nconc)
@@ -37,7 +37,7 @@
   *doc* princ newline #fn(for-each) #fn("7000n17050471A0P61:" #(newline print)) *funvars* "no help for "
   #fn(string) void))  bcode:ctable #fn("7000n1200Ke3:" #(aref))  with-output-to #fn("<000z12021e1220e2e1e12315163:" #(#fn(nconc)
   with-bindings *output-stream* #fn(copy-list)))  catch #fn("?000n22012122e123242522e2262722e22829e2e3262:22e20e3e42;22e22<22e2e4e3e3:" #(trycatch
-  λ #:g352 if and cons? eq? car quote thrown-value cadr caddr raise))  let* #fn("@000z10H3E02021e1qe12215153e1:2021e173051e1e1220=B3H02024e10=e12215153e1@301515375051e2:" #(#fn(nconc)
+  λ #:g353 if and cons? eq? car quote thrown-value cadr caddr raise))  let* #fn("@000z10H3E02021e1qe12215153e1:2021e173051e1e1220=B3H02024e10=e12215153e1@301515375051e2:" #(#fn(nconc)
   λ #fn(copy-list) caar let* cadar))  letrec #fn(">000z1202021e12273052e122240522515154e1227605262:" #(#fn(nconc)
   λ #fn(map) car #fn("8000n12021e12205162:" #(#fn(nconc) set! #fn(copy-list)))
   #fn(copy-list) void))  /= #fn("=000z1202122e10e12315153e2:" #(not #fn(nconc) = #fn(copy-list)))  bcode:sp #fn("7000n1200r4e3:" #(aref))  bcode:stack #fn(":000n2200r421220e21e3e4:" #(aset!
@@ -46,7 +46,7 @@
   eq? quote-value eqv? every symbol? memq quote memv) vals->cond)
   #fn(gensym) let #fn(nconc) cond #fn(map) #fn("7000n1A<F0<520=P:" #())))  receive #fn("?000z22021q1e32221e10e123825153e3:" #(call-with-values
   λ #fn(nconc) #fn(copy-list)))  unwind-protect #fn("?000n2202122q1e3e2e1232402225e12621e12725e2e3e3e321e1e3e3:" #(let
-  #:g353 λ prog1 trycatch #:g354 begin raise))  dotimes #fn("A000z10<0T20E2187Ke32223e186e1e12415153e4:" #(for
+  #:g354 λ prog1 trycatch #:g355 begin raise))  dotimes #fn("A000z10<0T20E2187Ke32223e186e1e12415153e4:" #(for
   - #fn(nconc) λ #fn(copy-list)))  throw #fn("9000n220212223e201e4e2:" #(raise list quote
 									 thrown-value)))
 	    1+ #fn("6000n10KM:" #() 1+) 1-
@@ -376,8 +376,8 @@
 	    revappend #fn("7000n2701062:" #(reverse-) revappend) reverse
 	    #fn("7000n170q062:" #(reverse-) reverse) reverse! #fn("7000n170q062:" #(reverse!-) reverse!)
 	    reverse!- #fn("8000n2\x8d1B3B041=101?04N4?1@\x1d/40:" #() reverse!-) reverse-
-	    #fn("7000n21J400:701<0P1=62:" #(reverse-) reverse-) self-evaluating? #fn("7000n10H;36040RS;IK0420051;3A040R;3:04021051Q:" #(#fn(constant?)
-  #fn(top-level-value)) self-evaluating?)
+	    #fn("7000n21J400:701<0P1=62:" #(reverse-) reverse-) self-evaluating? #fn("7000n120051S;3Z040H;36040RS;IK0421051;3A040R;3:04022051Q:" #(#fn(gensym?)
+  #fn(constant?) #fn(top-level-value)) self-evaluating?)
 	    set-syntax! #fn("8000n220710163:" #(#fn(put!)
 						*syntax-environment*) set-syntax!)
 	    simple-sort #fn("9000n10V;I6040=V3400:0<7021850>22285>162:" #(call-with-values #fn("7000n07021A>1F=62:" #(partition
@@ -426,7 +426,7 @@
 											#fn(stacktrace)))
 							  #fn("6000n1A50420061:" #(#fn(raise)))) top-level-exception-handler)
 	    trace #fn("@000n120051718551Ig0220732425262728290e225e3e22:e12;2985e225e3e4e35152@30O^147<60:" #(#fn(top-level-value)
-  traced? #fn(set-top-level-value!) eval λ #:g355 begin write cons quote newline apply void) trace)
+  traced? #fn(set-top-level-value!) eval λ #:g356 begin write cons quote newline apply void) trace)
 	    traced? #fn("7000n170051;3?042105121A<51d:" #(closure? #fn(function:code)) #((#fn("9000z020210P51472504230}2:" #(#fn(write)
   x newline #.apply)))))
 	    untrace #fn("9000n1200517185513C0220238551r3G52@30O^147460:" #(#fn(top-level-value)
binary files a/boot/flisp.boot.builtin b/boot/flisp.boot.builtin differ
--- a/src/system.lsp
+++ b/src/system.lsp
@@ -430,11 +430,12 @@
 (define (nreconc   l1 l2) (reverse!- l2 l1))
 
 (define (self-evaluating? x)
-  (or (and (atom? x)
-           (not (symbol? x)))
-      (and (constant? x)
-           (symbol? x)
-           (eq? x (top-level-value x)))))
+  (and (not (gensym? x))
+       (or (and (atom? x)
+                (not (symbol? x)))
+           (and (constant? x)
+                (symbol? x)
+                (eq? x (top-level-value x))))))
 
 (define-macro (quasiquote x) (bq-process x 0))