ref: 6178d78e044bce829b492b6a1270dcd1fe54f3ee
parent: a62ff99e463e574da861e103eb90768658448086
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jan 5 23:48:12 EST 2025
compiler: redefine a few funcs as macros
--- a/compiler.lsp
+++ b/compiler.lsp
@@ -3,12 +3,12 @@
;; code generation state, constant tables, bytecode encoding
(define (make-code-emitter) (vector () (table) 0 () 0))
-(define (bcode:code b) (aref b 0))
-(define (bcode:ctable b) (aref b 1))
-(define (bcode:nconst b) (aref b 2))
-(define (bcode:cenv b) (aref b 3))
-(define (bcode:sp b) (aref b 4))
-(define (bcode:stack b n) (aset! b 4 (+ (aref b 4) n)))
+(define-macro (bcode:code b) `(aref ,b 0))
+(define-macro (bcode:ctable b) `(aref ,b 1))
+(define-macro (bcode:nconst b) `(aref ,b 2))
+(define-macro (bcode:cenv b) `(aref ,b 3))
+(define-macro (bcode:sp b) `(aref ,b 4))
+(define-macro (bcode:stack b n) `(aset! ,b 4 (+ (bcode:sp ,b) ,n)))
;; get an index for a referenced value in a bytecode object
(define (bcode:indexfor b v)
@@ -78,8 +78,8 @@
(aset! e 0 (nreconc (cons inst args) bc)))))))
e))
-(define (make-label e) (gensym))
-(define (mark-label e l) (emit e 'label l))
+(define-macro (make-label e) `(gensym))
+(define-macro (mark-label e l) `(emit ,e 'label ,l))
;; convert symbolic bytecode representation to a byte array.
;; labels are fixed-up.
--- a/flisp.boot
+++ b/flisp.boot
@@ -20,34 +20,35 @@
(data :size decompressed-bytes)) = ((a . rest)) <= ((a . rest)) car ((lst)) /= ((a . rest)) void (rest) *prompt* (nil) nan? ((x)) lz-pack ((data
(level 0))) cons? ((value)) vm-stats (nil) * ((number…)) cdr ((lst)) > ((a . rest)) + ((number…))) *doc* #table(+ "Return sum of the numbers or 0 with no arguments." >= "Return #t if the arguments are in non-increasing order (previous\none is greater than or equal to the next one)." void? "Return #t if x is #<void> and #f otherwise." length= "Bounded length test.\nUse this instead of (= (length lst) n), since it avoids unnecessary\nwork and always terminates." help "Display documentation for the specified term, if available." lz-unpack "Return decompressed data previously compressed using lz-pack.\nEither destination for the decompressed data or the expected size of\nthe decompressed data must be specified. In the latter case a new\narray is allocated." = "Return #t if the arguments are equal." <= "Return #t if the arguments are in non-decreasing order (previous\none is less than or equal to the next one)." *builtins* "VM instructions as closures." car "Returns the first element of a list or nil if not available." /= "Return #t if not all arguments are equal. Shorthand for (not (= …))." void "Return the constant #<void> while ignoring any arguments.\n#<void> is mainly used when a function has side effects but does not\nproduce any meaningful value to return, so even though #t or nil could\nbe returned instead, in case of #<void> alone, REPL will not print\nit." arg-counts "VM instructions mapped to their expected arguments count." *prompt* "Function called by REPL to signal the user input is required.\nDefault function prints \"#;> \"." nan? "Return #t if the argument is NaN, regardless of the sign." Instructions "VM instructions mapped to their encoded byte representation." lz-pack "Return data compressed using Lempel-Ziv.\nThe data must be an array, returned value will have the same type.\nThe optional level is between 0 and 10. With level 0 a simple LZSS\nusing hashing will be performed. Levels between 1 and 9 offer a\ntrade-off between time/space and ratio. Level 10 is optimal but very\nslow." vm-stats "Print various VM-related information, such as the number of GC calls\nso far, heap and stack size, etc." cons? "Returns #t if the value is a cons cell." * "Return product of the numbers or 1 with no arguments." > "Return #t if the arguments are in strictly decreasing order (previous\none is greater than the next one)." cdr "Returns the tail of a list or nil if not available." *properties* "All properties of symbols recorded with putprop are recorded in this table."))
*runestring-type* (array rune) *string-type* (array byte)
- *syntax-environment* #table(throw #fn("9000n220212223e201e4e2:" #(raise list quote
- thrown-value)) unwind-protect #fn("A000n220502050218722q1e3e2e1232402286e12587e12686e2e3e3e387e1e3e3:" #(#fn(gensym)
- let λ prog1 trycatch begin raise)) help #fn(";000n17002152853W072855147350424250>170026q535247350@B0722728051524735047960:" #(getprop
- *doc* princ newline #fn(for-each) #fn("7000n17050471A0P61:" #(newline print)) *funvars* "no help for "
- #fn(string) void)) with-output-to #fn("<000z12021e1220e2e1e12315163:" #(#fn(nconc) with-bindings
- *output-stream* #fn(copy-list))) catch #fn("@000n220502112286e123242586e2262786e22829e2e3262:86e20e3e42;86e22<86e2e4e3e3:" #(#fn(gensym)
- trycatch λ 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)) with-input-from #fn("<000z12021e1220e2e1e12315163:" #(#fn(nconc)
- with-bindings *input-stream* #fn(copy-list))) unless #fn("<000z1200O211Pe4:" #(if begin)) 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))) time #fn(">000n12050218522e1e2e123024252622e185e32728e5e3e3:" #(#fn(gensym)
+ *syntax-environment* #table(bcode:nconst #fn("7000n1200r2e3:" #(aref)) with-input-from #fn("<000z12021e1220e2e1e12315163:" #(#fn(nconc)
+ with-bindings *input-stream* #fn(copy-list))) unless #fn("<000z1200O211Pe4:" #(if begin)) time #fn(">000n12050218522e1e2e123024252622e185e32728e5e3e3:" #(#fn(gensym)
let 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\x98074758551513c07675855151278685<e2e12886217975855151PA<0=51e4e3:2:50278685<e2e1288675855186e2A<0=51e4e3:2885<2185=PA<0=51e4:" #(else
begin or => 1arg-lambda? caddr caadr let if cddr #fn(gensym)) cond-clauses->if))) do #fn("J000z220501<2172052217305221240522587268927882829e12:1=51522829e12:82512887e18;52e153e4e3e2e12887e18:52e3:" #(#fn(gensym)
- #fn(map) car cadr #fn("6000n170051B38071061:0<:" #(cddr caddr)) letrec λ if #fn(nconc) begin #fn(copy-list))) assert #fn(";000n1200D2122230e2e2e2e4:" #(if
- raise quote assert-failed)) case #fn("A000z1\x8d\x8a6208621_514225023870e2e12425e126278687>215252e3:" #(#0#
+ #fn(map) car cadr #fn("6000n170051B38071061:0<:" #(cddr caddr)) letrec λ 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)
+ λ #fn(map) #fn("5000n10B3500<:0:" #()) #fn(copy-list)
+ #fn("5000n10B3500T:7060:" #(void)) letrec)) bcode:code #fn("7000n1200Ee3:" #(aref)) define-macro #fn("A000z170151863D0710<860=5341=?1@30O42223240<e22526e10=e12715153e3e2:" #(value-get-doc
+ symbol-set-doc void set-syntax! quote #fn(nconc) λ #fn(copy-list))) make-label #fn("5000n120e1:" #(gensym)) bcode:cenv #fn("7000n1200r3e3:" #(aref)) > #fn("<000z12021e12273151510e163:" #(#fn(nconc)
+ < #fn(copy-list) reverse!)) quasiquote #fn("7000n1700E62:" #(bq-process)) when #fn(";000z1200211POe4:" #(if
+ begin)) help #fn(";000n17002152853W072855147350424250>170026q535247350@B0722728051524735047960:" #(getprop
+ *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("@000n220502112286e123242586e2262786e22829e2e3262:86e20e3e42;86e22<86e2e4e3e3:" #(#fn(gensym)
+ trycatch λ 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!
+ + bcode:sp)) assert #fn(";000n1200D2122230e2e2e2e4:" #(if raise quote assert-failed)) case #fn("A000z1\x8d\x8a6208621_514225023870e2e12425e126278687>215252e3:" #(#0#
#fn("8000n2120C5020:1J40O:1R3=021072151e3:1H3=023072151e3:1=J>0230721<51e3:74751523=0260271e2e3:280271e2e3:" #(else
eq? quote-value eqv? every symbol? memq quote memv) vals->cond)
- #fn(gensym) let #fn(nconc) cond #fn(map) #fn("7000n1A<F0<520=P:" #()))) let #fn(">000z1O0R3B00?641<?041=?1@30O42021e12223052e124151532225052863C0268687e2e186e3@408788P:" #(#fn(nconc)
- λ #fn(map) #fn("5000n10B3500<:0:" #()) #fn(copy-list)
- #fn("5000n10B3500T:7060:" #(void)) letrec)) 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!)))) define-macro #fn("A000z170151863D0710<860=5341=?1@30O42223240<e22526e10=e12715153e3e2:" #(value-get-doc
- symbol-set-doc void set-syntax! quote #fn(nconc) λ #fn(copy-list))) receive #fn("?000z22021q1e32221e10e123825153e3:" #(call-with-values
- λ #fn(nconc) #fn(copy-list))) dotimes #fn("A000z10<0T20E2187Ke32223e186e1e12415153e4:" #(for -
- #fn(nconc) λ #fn(copy-list))) > #fn("<000z12021e12273151510e163:" #(#fn(nconc) < #fn(copy-list)
- reverse!)) quasiquote #fn("7000n1700E62:" #(bq-process)) when #fn(";000z1200211POe4:" #(if
- begin)))
+ #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("A000n220502050218722q1e3e2e1232402286e12587e12686e2e3e3e387e1e3e3:" #(#fn(gensym)
+ let λ prog1 trycatch 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-
#fn("6000n10K~:" #() 1-) 1arg-lambda? #fn("7000n10B;3E04700<51;3:04710TK62:" #(is-lambda?
length=) 1arg-lambda?)
@@ -78,12 +79,8 @@
array? #fn("7000n10];IF042005185B;390485<21Q:" #(#fn(typeof) array) array?) assoc
#fn("7000n21J40O:701510d3501<:7101=62:" #(caar assoc) assoc) assv #fn("7000n21J40O:701510c3501<:7101=62:" #(caar
assv) assv)
- bcode:cenv #fn("6000n10r3G:" #() bcode:cenv) bcode:code
- #fn("6000n10EG:" #() bcode:code) bcode:ctable #fn("6000n10KG:" #() bcode:ctable)
- bcode:indexfor #fn(";000n2700517105122861523:02386162:2486187534870r287KMp4:" #(bcode:ctable
- bcode:nconst #fn(has?) #fn(get) #fn(put!)) bcode:indexfor)
- bcode:nconst #fn("6000n10r2G:" #() bcode:nconst) bcode:sp
- #fn("6000n10r4G:" #() bcode:sp) bcode:stack #fn("8000n20r40r4G1Mp:" #() bcode:stack)
+ bcode:indexfor #fn(";000n20KG0r2G20861523:02186162:2286187534870r287KMp4:" #(#fn(has?)
+ #fn(get) #fn(put!)) bcode:indexfor)
box-vars #fn("9000n2\x8d\x8a68620086>2_486<^1161:" #(#fn("9000n10B3Q00<T3B070A21720<5153@30O4F<0=61:O:" #(emit
box caddr))) box-vars)
bq-bracket #fn(";000n20H3=070710152e2:0<22CS01El2380700=P:707324710=1K~52e3e2:0<25CT01El2390260Te2:707027710T1K~52e3e2:0<28CP01El23500T:707029710T1K~52e3e2:70710152e2:" #(list
@@ -104,8 +101,8 @@
#fn("5000n10<<T:" #() cadaar) cadadr #fn("5000n10TT:" #() cadadr) cadar
#fn("5000n10<T:" #() cadar) caddar #fn("5000n10<=T:" #() caddar) cadddr
#fn("5000n10==T:" #() cadddr) caddr #4=#fn("5000n10=T:" #() caddr) call-with-values
- #fn("7000n205086B3@0A86<C90186=}2:18661:" #() #(#3=(*values*))) capture-var! #fn("<000n27005171186E5387;IG042286510r323861e152p4:" #(bcode:cenv
- index-of #fn(length) #fn(nconc)) capture-var!)
+ #fn("7000n205086B3@0A86<C90186=}2:18661:" #() #(#3=(*values*))) capture-var! #fn("<000n20r3G70186E5387;IG042186510r322861e152p4:" #(index-of
+ #fn(length) #fn(nconc)) capture-var!)
cdaaar #fn("5000n10<<<=:" #() cdaaar) cdaadr
#fn("5000n10T<=:" #() cdaadr) cdaar #fn("5000n10<<=:" #() cdaar) cdadar
#fn("5000n10<T=:" #() cdadar) cdaddr #fn("5000n10=T=:" #() cdaddr) cdadr
@@ -117,15 +114,15 @@
closure? #fn("6000n10\\;36040[S:" #() closure?) compile
#fn("8000n170q7105162:" #(compile-f lower-define) compile) compile-and #fn("<000n570018283D218467:" #(compile-short-circuit
brf) compile-and)
- compile-app #fn("E000n483<88R3U07088152IK088Z3E0218851[3;0218851@40887283=23523i07401O89544750K524760183=537508:U5247708237028@40298:63:89[;39047:8951892;Cf07089152I\\0212;517;d3P07<83r2523E07401O83T5447702;62:89B3P07=89<513F07>83513=07?01828364:8:360O@B07401O89544750K524760183=537508;U5248:360O@90750r/5248:3C07@018283898:8;67:770823702A@402B8;63:" #(in-env?
- #fn(top-level-value) length> 255 compile-in bcode:stack compile-arglist emit tcall.l call.l
+ compile-app #fn("E000n483<88R3U07088152IK088Z3E0218851[3;0218851@40887283=23523q07401O895440r40r4GKMp4750183=530r40r4G8:UMp47608237027@40288:63:89[;3904798951892:Cf07089152I\\0212:517:d3P07;83r2523E07401O83T5447602:62:89B3P07<89<513F07=83513=07>01828364:8:360O@F07401O895440r40r4GKMp4750183=530r40r4G8;UMp48:360O@=00r40r4Gr/Mp48:3C07?018283898:8;67:760823702@@402A8;63:" #(in-env?
+ #fn(top-level-value) length> 255 compile-in compile-arglist emit tcall.l call.l
builtin->instruction cadr length= is-lambda? inlineable? compile-let compile-builtin-call tcall
call) compile-app)
compile-arglist #fn("8000n3202101>282524228261:" #(#fn(for-each)
- #fn("9000n170AFO054471AK62:" #(compile-in
- bcode:stack)) #fn(length)) compile-arglist)
- compile-aset! #fn("=000n3208251r2~87Kl23?07101O2282P64:K87L23d07101O2374828752P5447501768287525377088U5247802262:7922r362:" #(#fn(length)
- compile-app aset! aref list-head compile-arglist list-tail bcode:stack emit argc-error) compile-aset!)
+ #fn("9000n170AFO0544Ar4Ar4GKMp:" #(compile-in))
+ #fn(length)) compile-arglist)
+ compile-aset! #fn("=000n3208251r2~87Kl23?07101O2282P64:K87L23h07101O2374828752P544750176828752530r40r4G88UMp47702262:7822r362:" #(#fn(length)
+ compile-app aset! aref list-head compile-arglist list-tail emit argc-error) compile-aset!)
compile-begin #fn("9000n483H3?0700182715064:83=H3>070018283<64:7001O83<5447202352474018283=64:" #(compile-in
void emit pop compile-begin) compile-begin)
compile-builtin-call #fn(">000n7\x8d202186850>3?;514227385O538<3I07483=8<52I=075858<52@30O4858=26CL086El23:07702862:770858663:8=29C708;60:8=2:C708;60:8=2;C]086El23:07702<62:86r2l23:07702=62:770858663:8=2>Cm086El23:07585K62:86Kl23:07702?62:86r2l23:07702@62:770858663:8=2ACL086El23:07702B62:770858663:8=2CCL086El23:07585K62:770858663:8=2DCN086El23<07702E2F63:770858663:8=2GCX086r2L23;07585r262:770823702H@402G8663:8=2ICb086r2l23:07702J62:r286L23?07708586r3~63:7585r262:7708562:" #(#0#
@@ -134,13 +131,13 @@
vector loadv #() apply tapply aref aref2) compile-builtin-call)
compile-f #fn("8000n2702101>22262:" #(call-with-values #fn("7000n070AF62:" #(compile-f-))
#fn("5000n20:" #())) compile-f)
- compile-f- #fn("O000n270501T711T517215173741T52711518;J7025@408;87H360E@802687518=268:51~73778:528:\x85\xa208?JL07886298>88J708=@508=U54@r07:867;2<7=2<7>8?527?268?5151535152478862@8>268?5188J708=@508=U5547A8608:898>55@30O42B8=L23I0788688J702C@402D8=53@W088\x85?078862E8=53@E08:J?078862F8=53@30O47G0897H7I1518952537J868@<52486r4268951r4Mp47K868@D7I15154478862L5247M2N7O7P8651517Q86518<537R865162:" #(make-code-emitter
+ compile-f- #fn("O000n270501T711T517215173741T52711518;J7025@408;87H360E@802687518=268:51~73778:528:\x85\xa208?JL07886298>88J708=@508=U54@r07:867;2<7=2<7>8?527?268?5151535152478862@8>268?5188J708=@508=U5547A8608:898>55@30O42B8=L23I0788688J702C@402D8=53@W088\x85?078862E8=53@E08:J?078862F8=53@30O47G0897H7I1518952537J868@<52486r4268951r4Mp47K868@D7I15154478862L5247M2N7O86EG517P86518<5386r3G62:" #(make-code-emitter
lastcdr lambda:vars filter cons? λ #fn(length) keyword-arg? emit optargs bcode:indexfor
make-perfect-hash-table #fn(map) cons car iota keyargs emit-optional-arg-inits 255 largc lvargc
vargc argc extend-env complex-bindings lambda:body box-vars compile-in ret values #fn(function)
- encode-byte-code bcode:code const-to-idx-vec bcode:cenv) compile-f-)
- compile-if #fn("A000n470051700517005183T718351728351B3;0738351@30O8;DC=07401828<64:8;OC=07401828=64:7401O8;895547502689534770885247401828<544823<07502852@;0750298:534770895247401828=5447708:62:" #(make-label
- caddr cdddr cadddr compile-in emit brf mark-label ret jmp) compile-if)
+ encode-byte-code const-to-idx-vec) compile-f-)
+ compile-if #fn("A000n420502050205083T718351728351B3;0738351@30O8;DC=07401828<64:8;OC=07401828=64:7401O8;89554750268953475027885347401828<544823<07502852@;0750298:53475027895347401828=544750278:63:" #(#fn(gensym)
+ caddr cdddr cadddr compile-in emit brf label ret jmp) compile-if)
compile-in #fn("B000\x8740005000\x884000I60O?4483R3<0700183D64:83H3\xa6083EC:07102262:83KC:07102362:83DC:07102462:83OC:07102562:83qC:07102662:7783513:07102862:7983513<07102:8363:7102;8363:83<2<C<07=0183=63:83<RS;ID0483<Z;I;047>83<1523=07?01828364:83<892@CS07A83T513>07B018283T64:7102;83T63:892CC=07D01828364:892EC>07F018283=64:892GC;07H018363:892ICD07J2K183>22L01>262:892MC@07N018283=8465:892OC>07P018283=64:892QCE07R0183T2E7S8351P64:892TCE07B01D83T5447102U62:892VC\x93083T7S83517W8;518:R360O@807X2Y5148<3`08;=?;47Z8:8<8;<B;3G047[8;<<51;3:047\\8;<5153@30O47]018:8;<64:892^Cp07B01O2Iq83Te35447_7`835151360O@807X2a5147B01O7`83515447102^62:7?01828364:" #(compile-sym
emit load0 load1 loadt loadf loadnil void? loadvoid fits-i8 loadi8 loadv aset! compile-aset!
in-env? compile-app quote self-evaluating? compile-in if compile-if begin compile-begin prog1
@@ -150,23 +147,22 @@
closure #fn(length))) and compile-and
or compile-or while compile-while cddr return ret set! value-get-doc error "set!: name must be a symbol"
symbol-set-doc is-lambda? lambda:vars compile-set! trycatch 1arg-lambda? caddr "trycatch: second form must be a 1-argument lambda") compile-in)
- compile-let #fn("A000n483<83=7005188T71018953728;737488518;528:537508=524268=1<521=P7708>827488515447808<U524E8<L23A082I<07902:8<63:O:" #(bcode:sp
- compile-arglist vars-to-env complex-bindings caddr box-vars #fn(nconc) compile-in bcode:stack
- emit shift) compile-let)
+ compile-let #fn("A000n483<83=0r4G88T70018953718;727388518;528:537408=524258=1<521=P7608>827388515440r40r4G8<UMp4E8<L23A082I<0770288<63:O:" #(compile-arglist
+ vars-to-env complex-bindings caddr box-vars #fn(nconc) compile-in emit shift) compile-let)
compile-or #fn("<000n470018283O21O67:" #(compile-short-circuit brt) compile-or)
- compile-prog1 #fn(":000n37001O82T544718251B3W0720K5247301O71825154474025524720r/62:O:" #(compile-in
- cddr bcode:stack compile-begin emit pop) compile-prog1)
- compile-set! #fn("?000n470821E538821CF07201O83544730248263:88<El288=T893<07588=51@9076082528:3g07308937027@40288;534790K5247201O83544790r/5247302:62:7201O8354489IA07;2<2=825251@30O47302>8;63:" #(lookup-sym
- global compile-in emit setg vinfo:index capture-var! loada loadc bcode:stack set-car! error #fn(string)
+ compile-prog1 #fn(":000n37001O82T544718251B3_00r40r4GKMp47201O718251544730245240r40r4Gr/Mp:O:" #(compile-in
+ cddr compile-begin emit pop) compile-prog1)
+ compile-set! #fn("?000n470821E538821CF07201O83544730248263:88<El288=T893<07588=51@9076082528:3o07308937027@40288;5340r40r4GKMp47201O835440r40r4Gr/Mp47302962:7201O8354489IA07:2;2<825251@30O47302=8;63:" #(lookup-sym
+ global compile-in emit setg vinfo:index capture-var! loada loadc set-car! error #fn(string)
"internal error: misallocated var " seta) compile-set!)
- compile-short-circuit #fn("?000n783H3?0700182848665:83=H3@070018283<8665:86;I804710517001O83<86554720K52486360O@9073024524730858;534720r/52486360O@907302552476018283=84858657486340O:7708;62:" #(compile-in
- make-label bcode:stack emit dup pop compile-short-circuit mark-label) compile-short-circuit)
+ compile-short-circuit #fn("?000n783H3?0700182848665:83=H3@070018283<8665:86;I70421507001O83<865540r40r4GKMp486360O@9072023524720858;5340r40r4Gr/Mp486360O@907202452475018283=84858657486340O:720268;63:" #(compile-in
+ #fn(gensym) emit dup pop compile-short-circuit label) compile-short-circuit)
compile-sym #fn(";000n470821E538821C`02282513M073248251513@07502624825163:750278263:88<El23W0750287988=51534833A088=T3:07502:62:O:7502;7<08252534833A088=T3:07502:62:O:" #(lookup-sym
global #fn(constant?) printable? #fn(top-level-value) emit loadv loadg loada vinfo:index car
loadc capture-var!) compile-sym)
compile-thunk #fn(":000n170q21q72051e362:" #(compile-f λ lower-define) compile-thunk)
- compile-while #fn(";000n470051700517101O7250544730K524740885247101O82544750268953475027524730r/5247101O8354475028885347408962:" #(make-label
- compile-in void bcode:stack mark-label emit brf pop jmp) compile-while)
+ compile-while #fn(";000n4205020507101O72505440r40r4GKMp473024885347101O825447302589534730265240r40r4Gr/Mp47101O835447302788534730248963:" #(#fn(gensym)
+ compile-in void emit label brf pop jmp) compile-while)
complex-bindings #fn("=000n2205020507101OO8687564722386>174875162:" #(#fn(table)
complex-bindings-
filter #fn("7000n120A062:" #(#fn(has?)))
@@ -174,10 +170,9 @@
complex-bindings- #fn("=000n61J40O:0R3K0833D02001523;021840D63:O:0H;I80472051340O:0<23Co0200T1523Q021850TD534833>021840TD53@30O@30O474750511O83848566:760<513U074770517817905152O82S;I50483848566:740<17:051838485562;2<1838485>40=52P:" #(#fn(memq)
#fn(put!) quoted? set! complex-bindings- caddr is-lambda? lambda:body diff lambda:vars
inlineable? #fn(map) #fn(";000n1700AOF929366:" #(complex-bindings-))) complex-bindings-)
- const-to-idx-vec #fn("9000n1207105151222385>17405152485:" #(#fn(vector-alloc)
- bcode:nconst #fn(for-each)
- #fn("7000n2A10p:" #())
- bcode:ctable) const-to-idx-vec)
+ const-to-idx-vec #fn("9000n1200r2G51212285>10KG52485:" #(#fn(vector-alloc)
+ #fn(for-each)
+ #fn("7000n2A10p:" #())) const-to-idx-vec)
copy-tree #fn("7000n10H3400:700<51700=51P:" #(copy-tree) copy-tree) count
#fn("9000n2\x8d\x8a620862186>1_51486<01E63:" #(#0#
#fn("9000n31J5082:A<01=01<5139082KM@408263:" #() count-)) count)
@@ -205,9 +200,8 @@
((loadv loadv.l) (loadg loadg.l) (setg setg.l) (loada loada.l) (seta seta.l) (box box.l)) 255 ((loadc
loadc.l)) loada (0) loada0 (1) loada1 loadc loadc0 loadc1 brf not null? brn cddr brt eq? brne
brnn nreconc) emit)
- emit-optional-arg-inits #fn("<000n582B3\x900700517102284534710238953474075176838452q53O7782515447102884534710295247:0895247;0182=8384KM65:O:" #(make-label
- emit brbound brt compile-in extend-env list-head cadar seta pop mark-label
- emit-optional-arg-inits) emit-optional-arg-inits)
+ emit-optional-arg-inits #fn("<000n582B3\x91020507102284534710238953474075176838452q53O7782515447102884534710295247102:895347;0182=8384KM65:O:" #(#fn(gensym)
+ emit brbound brt compile-in extend-env list-head cadar seta pop label emit-optional-arg-inits) emit-optional-arg-inits)
encode-byte-code #fn("S000n17005171855172238651r3238651r2ki2M2452238651E255025502650OO278<28524\x8d8988L23\xda148689G?=48=29CP02:8:8689KMG2;8<5153489r2M?9@\xa91278<2<2=7>873\x8308=8D2?C702@@p08D2AC702B@d08D2CC702D@X08D2EC702F@L08D2GC702H@@08D2IC702J@408=^1@408=525152489KM?948988L23:08689G@30O?>42K8=2L523`02:8;2;8<518>534278<873707M@407NE5152489KM?9@\xeb08=2OCH0278<2P8>5152489KM?9@\xce08>X3\xc708=2K8?2Q523H0278<2P8>5152489KM?9@\x9f02K8?2R523\x810278<2P8>5152489KM?94278<2P8689G5152489KM?948=2SCK0278<2P8689G5152489KM?9@30O@E0278<2T8>5152489KM?9^1@30O@\x81.42U2V8<878:>38;5242W8<61:" #(reverse!
list->vector >= #fn(length) 65536 #fn(table) #fn(buffer)
#fn(io-write) #int32(0) label #fn(put!) #fn(sizeof)
@@ -297,7 +291,7 @@
lower-define expand-define is-lambda? #fn(nconc) λ lastcdr #fn(map)) lower-define)
macrocall? #fn("6000n10<R;3904700<61:" #(symbol-syntax) macrocall?) macroexpand-1
#fn("7000n10H3400:7005185390850=}2:0:" #(macrocall?) macroexpand-1) make-code-emitter
- #fn("9000n0q2050EqEo5:" #(#fn(table)) make-code-emitter) make-label #fn("5000n12060:" #(#fn(gensym)) make-label)
+ #fn("9000n0q2050EqEo5:" #(#fn(table)) make-code-emitter)
make-perfect-hash-table #fn(";000n1\x8d\x8a5208521_514\x8d\x8a6862285860>3_486<^12305161:" #(#1#
#fn("8000n270712205151162:" #(mod0 abs #fn(hash)) $hash-keyword)
#fn("=000n120r20i2O52\x8d\x8a68621A085F86>5_486<^19261:" #(#fn(vector-alloc)
@@ -316,11 +310,10 @@
#fn(io-close))) #fn("6000n1A50420061:" #(#fn(raise)))) make-system-image)
map! #fn("8000n21\x8d1B3B04101<51_41=?1@\x1d/4:" #() map!) map-int
#fn(";000n2701E52340q:0E51qPq\x8a78786_4K7115122870>2|486:" #(<= 1- #fn("7000n1A<F051qPN4AA<=_:" #())) map-int)
- mark-label #fn("8000n270021163:" #(emit label) mark-label) max
- #fn(";000z11J400:70210163:" #(foldl #fn("6000n201L23401:0:" #())) max) member #fn("7000n21J40O:1<0d3401:7001=62:" #(member) member)
- memv #fn("7000n21J40O:1<0c3401:7001=62:" #(memv) memv) min
- #fn(";000z11J400:70210163:" #(foldl #fn("6000n201L23400:1:" #())) min) mod #fn("8000n207001521i2~:" #(div) mod)
- mod0 #fn("7000n2001k1i2~:" #() mod0) negative?
+ max #fn(";000z11J400:70210163:" #(foldl #fn("6000n201L23401:0:" #())) max) member
+ #fn("7000n21J40O:1<0d3401:7001=62:" #(member) member) memv #fn("7000n21J40O:1<0c3401:7001=62:" #(memv) memv)
+ min #fn(";000z11J400:70210163:" #(foldl #fn("6000n201L23400:1:" #())) min) mod
+ #fn("8000n207001521i2~:" #(div) mod) mod0 #fn("7000n2001k1i2~:" #() mod0) negative?
#fn("6000n10EL2:" #() negative?) nestlist #fn(":000n37082E52340q:1710015182K~53P:" #(<=
nestlist) nestlist)
newline #fn("8000\x8700001000\x880000I7070?04210725247360:" #(*output-stream* #fn(io-write)
binary files a/flisp.boot.builtin b/flisp.boot.builtin differ