shithub: sl

Download patch

ref: 1ea9664460635b828a50505b4af258b676442e76
parent: 63aa49982f625f02b729c1a447bb4dd0f96ff03b
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Mar 26 01:24:10 EDT 2025

SMALL_STR_LEN: 20 to 24 (workaround for long sym names wrap lines)

--- a/boot/sl.boot
+++ b/boot/sl.boot
@@ -83,10 +83,9 @@
                                                           #fn("n17002152340q:722324A<25F2605661:" #(member
   (:read-only) error #fn(str) "invalid option in slot " " of struct " ": "))) slot-opts)
   #fn("n17021062:" #(map! #fn("n10B;35040<85;J404085;35040=;J604qe186RS;J9042086513=071228652@30q423242586522087<51390q87P@408762:" #(#fn(keyword?)
-  error "invalid slot name: " #fn(list*) #fn(sym) #\:))) tokw)
-  separate-doc-from-body #fn(length) #fn(map) #fn("n10B3500<:0:")
-  #fn(sym) #\? "make-" #fn(str) "-" sym-set-doc #fn(nconc) begin def s and or not quote eq? aref =
-  length #fn(copy-list) map-int #fn("n1A<70F0525170920522193865222872324Ie2e3259423e2e2262724e228232995510Me37:2;85523O02<2=2>2?86e22@2?96e22Ae6e2@B02B232995510M24e4e4e4:" #(list-ref
+  error "invalid slot name: " #fn(list*) #fn(sym) #\:))) tokw) separate-doc-from-body #fn(length)
+  #fn(map) #fn("n10B3500<:0:") #fn(sym) #\? "make-" #fn(str) "-" sym-set-doc #fn(nconc) begin def
+  s and or not quote eq? aref = length #fn(copy-list) map-int #fn("n1A<70F0525170920522193865222872324Ie2e3259423e2e2262724e228232995510Me37:2;85523O02<2=2>2?86e22@2?96e22Ae6e2@B02B232995510M24e4e4e4:" #(list-ref
   #fn(sym) def s v assert if void? aref #fn(length) member :read-only error str "slot " quote " in struct "
   " is :read-only" aset!))))  bcode:ctable #fn("n1200Ke3:" #(aref))  with-output-to #fn("z12021e1220e2e1e12315163:" #(#fn(nconc)
   with-bindings *io-out* #fn(copy-list)))  catch #fn("n22012122e123242522e2262722e22829e2e3262:22e20e3e42;22e22<22e2e4e3e3:" #(trycatch
@@ -185,10 +184,9 @@
             compile-f- #fn("n2Ib620862186>1_51472501T731T517415175761T52731518<J7027@408<88H360E@802888518>288;51~75798;5286<8@518A3=07:2;8A52@30q48;3\xa208@JL07<872=8?893808>U@408>54@r07>877?2@7A2@7B8@527C288@515153515247<872D8?288@51893808>U@408>5547E8708;8:8?55@30q42F8>L23I07<87893702G@402H8>53@W0893?07<872I8>53@E08;J?07<872J8>53@30q47K08:7L7M1518:52537N878B<52487r4288:51r4Mp47O878BD7M1515447<872P5247Q2R7S87EG517T87518=5387r3G62:" #(#1=#fn("z0I:" #() void)
   #fn("n1700510=863J0712285>18652;J904A<8661:q:" #(caar any #fn("n1A0<Q;3404A:")) any-duplicate-kw)
   make-code-emitter lastcdr lambda:vars filter cons? λ #fn(length) keyword-arg? error "compile error: duplicate keyword "
-  emit optargs bcode:indexfor make-perfect-hash-table
-  #fn(map) cons car iota keyargs emit-optional-arg-inits 255 vargc.l argc.l vargc argc extend-env
-  complex-bindings lambda:body box-vars compile-in ret values #fn(fn) encode-byte-code
-  const-to-idx-vec) compile-f-)
+  emit optargs bcode:indexfor make-perfect-hash-table #fn(map) cons car iota keyargs
+  emit-optional-arg-inits 255 vargc.l argc.l vargc argc extend-env complex-bindings lambda:body
+  box-vars compile-in ret values #fn(fn) encode-byte-code const-to-idx-vec) compile-f-)
             compile-if #fn("n420502050205083T718351728351B3;0738351@30q8;DC=07401828<64:8;J=07401828=64:7401q8;89554750268953475027885347401828<544823<07502852@;0750298:53475027895347401828=544750278:63:" #(#fn(gensym)
   caddr cdddr cadddr compile-in emit brn label ret jmp) compile-if)
             compile-in #fn("\x8740005000W4000J60q?4483R3<0700183D64:83H3\x97083EC:07102262:83KC:07102362:83DC:07102462:83J:07102562:7683513:07102762:7883513<0710298363:7102:8363:83<2;C<07<0183=63:83<RS;JD0483<Z;J;047=83<1523=07>01828364:83<892?CS07@83T513>07A018283T64:7102:83T63:892BC=07C01828364:892DC>07E018283=64:892FC;07G018363:892HCD07I2J183>22K01>262:892LC@07M018283=8465:892NC>07O018283=64:892PCE07Q0183T2D7R8351P64:892SCE07A01D83T5447102T62:892UC\x91083T7V7R8351518;<<8;=8:R360q@807W2X5148<3Y07Y8:8<8=<B;3F048=<<2HQ;3:047Z8=<5153@30q47[018:8=<64:892\\Cp07A01q2Hq83Te35447]7^835151360q@807W2_5147A01q7^83515447102\\62:7>01828364:" #(compile-sym
@@ -281,10 +279,8 @@
             foldl #fn("n382J401:700082<15282=63:" #(foldl) foldl) foldr
             #fn("n382J401:082<700182=5362:" #(foldr) foldr) get-defined-vars #fn("n170A<05161:" #(delete-duplicates) #(#2=(#fn("n10H340q:0<20Cd00=B3^00TR;37040Te1;JM040TB;3E0471051R;3:0471051e1:0<22C?07324A<0=52}2:q:" #(def
   caadr begin nconc #fn(map)) #(#2#)))))
-            get-syntax #fn("n120710q63:" #(#fn(get)
-                                           *syntax-environment*) get-syntax)
-            getprop #fn("\x8720003000W2000J60q?2420711q5387;3<04208708253;J50482:" #(#fn(get)
-                                                                                     *properties*) getprop)
+            get-syntax #fn("n120710q63:" #(#fn(get) *syntax-environment*) get-syntax) getprop
+            #fn("\x8720003000W2000J60q?2420711q5387;3<04208708253;J50482:" #(#fn(get) *properties*) getprop)
             help-print-header #fn("O200020004000W2000J60q?24W3000J7021?3413A02223830>2152@V07483514823@074750512652@70770514785047860:" #(#(:kind
   0 NIL NIL :lpad 1 NIL NIL) "" #fn(for-each) #fn("n170A51471F0P5147260:" #(princ print newline))
   princ caddr " (group)" print newline) help-print-header)
@@ -359,8 +355,8 @@
   cdar)))) #fn(length)) make-perfect-hash-table)
             make-system-image #fn("n120021222354247576Dw54Dw64278788>2288685>22989>1{89504:" #(#fn(file)
   :write :create :truncate (*linefeed* *directory-separator* *argv* that *exit-hooks*
-                                       *print-pretty* *print-width* *print-readably* *print-level*
-                                       *print-length* *os-name* *interactive* *prompt* *os-version*)
+                            *print-pretty* *print-width* *print-readably* *print-level*
+                            *print-length* *os-name* *interactive* *prompt* *os-version*)
   *print-pretty* *print-readably* #fn("n0Aw04Fw1:" #(*print-pretty* *print-readably*))
   #fn("n07021A>1722350245252752677842678845253f22985F5242:F7;52^1^142<F61:" #(filter #fn("n10Z;3u0420051S;3j0421051[S;JC0422051222105151dS;3I04230A52S;3=04242105151S:" #(#fn(const?)
   #fn(top-level-value) #fn(str) #fn(memq) #fn(io?))) sort #fn(environment) #.< nconc #fn(map) list
@@ -441,12 +437,9 @@
   #fn("n1r520051L2;3a040KG21l2;3U040r2G22l2;3H040r3G23l2;3;040r4G24l2:" #(#fn(length) #\d #\o #\c
                                                                           #\-) doc?)
   #fn(str?) separate-doc-from-body #fn(keyword?) #fn(str) reverse) separate-doc-from-body)
-            set-syntax! #fn("n220710163:" #(#fn(put!)
-                                            *syntax-environment*) set-syntax!)
-            sort #fn("O200010003000W2000J7071?240=J400:0<7223182870>42418287>362:" #(#(:key 0)
-                                                                                     identity
-                                                                                     call-with-values
-                                                                                     #fn("n07021AF92>393=62:" #(partition
+            set-syntax! #fn("n220710163:" #(#fn(put!) *syntax-environment*) set-syntax!) sort
+            #fn("O200010003000W2000J7071?240=J400:0<7223182870>42418287>362:" #(#(:key 0) identity
+                                                                                call-with-values #fn("n07021AF92>393=62:" #(partition
   #fn("n1AF051F925162:"))) #fn("n220710A22F5492e1711A22F5463:" #(#fn(nconc) sort :key))) sort)
             splice-form? #fn("n10B;3X040<20Q;JN040<21Q;JD040<22Q;3:04730r252;J704022Q:" #(unquote-splicing
   unquote-nsplicing unquote length>) splice-form?)
--- a/src/print.c
+++ b/src/print.c
@@ -176,7 +176,7 @@
   pathological or deeply-nested expressions, but those are difficult
   to print anyway.
 */
-#define SMALL_STR_LEN 20
+#define SMALL_STR_LEN 24
 static inline int
 tinyp(sl_v v)
 {