2016-03-03 04:59:07 -05:00
|
|
|
#include "picrin.h"
|
|
|
|
#include "picrin/extra.h"
|
|
|
|
|
2017-04-04 06:00:37 -04:00
|
|
|
#if PIC_USE_EVAL
|
2017-04-04 01:54:58 -04:00
|
|
|
static const char boot_compile_rom[][80] = {
|
2017-04-05 03:18:00 -04:00
|
|
|
"(core#begin (core#begin (core#define make-identifier #undefined) (core#begin (co",
|
|
|
|
"re#define identifier? #undefined) (core#begin (core#define identifier=? #undefin",
|
|
|
|
"ed) (core#begin (core#define identifier-name #undefined) (core#begin (core#defin",
|
|
|
|
"e identifier-environment #undefined) (core#begin (core#define make-environment #",
|
|
|
|
"undefined) (core#begin (core#define default-environment #undefined) (core#begin ",
|
|
|
|
"(core#define environment? #undefined) (core#begin (core#define find-identifier #",
|
|
|
|
"undefined) (core#begin (core#define add-identifier! #undefined) (core#begin (cor",
|
|
|
|
"e#define set-identifier! #undefined) (core#begin (core#define macro-objects #und",
|
|
|
|
"efined) (core#begin (core#define expand #undefined) (call-with-values (core#lamb",
|
|
|
|
"da () ((core#lambda () (core#begin (core#begin (core#define .make-identifier.214",
|
|
|
|
"9 (core#lambda (.name.2173 .env.2174) (make-record (core#quote identifier) (vect",
|
|
|
|
"or .name.2173 .env.2174)))) (core#begin (core#define .%identifier?.2150 (core#la",
|
|
|
|
"mbda (.obj.2175) (core#if (record? .obj.2175) (eq? (record-type .obj.2175) (core",
|
|
|
|
"#quote identifier)) #f))) (core#begin (core#define .identifier-environment.2151 ",
|
|
|
|
"(core#lambda (.obj.2176) (core#if (.%identifier?.2150 .obj.2176) (vector-ref (re",
|
|
|
|
"cord-datum .obj.2176) 1) (error \"record type mismatch\" .obj.2176 (core#quote ide",
|
|
|
|
"ntifier))))) (core#define .identifier-name.2152 (core#lambda (.obj.2177) (core#i",
|
|
|
|
"f (.%identifier?.2150 .obj.2177) (vector-ref (record-datum .obj.2177) 0) (error ",
|
|
|
|
"\"record type mismatch\" .obj.2177 (core#quote identifier)))))))) (core#begin (cor",
|
|
|
|
"e#define .identifier?.2153 (core#lambda (.obj.2178) ((core#lambda (.it.2179) (co",
|
|
|
|
"re#if .it.2179 .it.2179 ((core#lambda (.it.2180) (core#if .it.2180 .it.2180 #f))",
|
|
|
|
" (.%identifier?.2150 .obj.2178)))) (symbol? .obj.2178)))) (core#begin (core#defi",
|
|
|
|
"ne .identifier=?.2154 (core#lambda (.id1.2181 .id2.2182) (core#if (core#if (symb",
|
|
|
|
"ol? .id1.2181) (symbol? .id2.2182) #f) (eq? .id1.2181 .id2.2182) (core#if (core#",
|
|
|
|
"if (.%identifier?.2150 .id1.2181) (.%identifier?.2150 .id2.2182) #f) (eq? (.find",
|
|
|
|
"-identifier.2161 (.identifier-name.2152 .id1.2181) (.identifier-environment.2151",
|
|
|
|
" .id1.2181)) (.find-identifier.2161 (.identifier-name.2152 .id2.2182) (.identifi",
|
|
|
|
"er-environment.2151 .id2.2182))) #f)))) (core#begin (core#set! equal? ((core#lam",
|
|
|
|
"bda (.e?.2183) (core#lambda (.x.2184 .y.2185) (core#if (.%identifier?.2150 .x.21",
|
|
|
|
"84) (.identifier=?.2154 .x.2184 .y.2185) (.e?.2183 .x.2184 .y.2185)))) equal?)) ",
|
|
|
|
"(core#begin (core#begin (core#define .%make-environment.2155 (core#lambda (.pare",
|
|
|
|
"nt.2186 .prefix.2187 .binding.2188) (make-record (core#quote environment) (vecto",
|
|
|
|
"r .parent.2186 .prefix.2187 .binding.2188)))) (core#begin (core#define .environm",
|
|
|
|
"ent?.2156 (core#lambda (.obj.2189) (core#if (record? .obj.2189) (eq? (record-typ",
|
|
|
|
"e .obj.2189) (core#quote environment)) #f))) (core#begin (core#define .environme",
|
|
|
|
"nt-binding.2157 (core#lambda (.obj.2190) (core#if (.environment?.2156 .obj.2190)",
|
|
|
|
" (vector-ref (record-datum .obj.2190) 2) (error \"record type mismatch\" .obj.2190",
|
|
|
|
" (core#quote environment))))) (core#begin (core#define .environment-prefix.2158 ",
|
|
|
|
"(core#lambda (.obj.2191) (core#if (.environment?.2156 .obj.2191) (vector-ref (re",
|
|
|
|
"cord-datum .obj.2191) 1) (error \"record type mismatch\" .obj.2191 (core#quote env",
|
|
|
|
"ironment))))) (core#define .environment-parent.2159 (core#lambda (.obj.2192) (co",
|
|
|
|
"re#if (.environment?.2156 .obj.2192) (vector-ref (record-datum .obj.2192) 0) (er",
|
|
|
|
"ror \"record type mismatch\" .obj.2192 (core#quote environment))))))))) (core#begi",
|
|
|
|
"n (core#define .search-scope.2160 (core#lambda (.id.2193 .env.2194) ((.environme",
|
|
|
|
"nt-binding.2157 .env.2194) .id.2193))) (core#begin (core#define .find-identifier",
|
|
|
|
".2161 (core#lambda (.id.2195 .env.2196) ((core#lambda (.it.2197) (core#if .it.21",
|
|
|
|
"97 .it.2197 ((core#lambda (.it.2198) (core#if .it.2198 .it.2198 #f)) ((core#lamb",
|
|
|
|
"da (.parent.2199) (core#if .parent.2199 (.find-identifier.2161 .id.2195 .parent.",
|
|
|
|
"2199) (core#if (symbol? .id.2195) (.add-identifier!.2162 .id.2195 .env.2196) (.f",
|
|
|
|
"ind-identifier.2161 (.identifier-name.2152 .id.2195) (.identifier-environment.21",
|
|
|
|
"51 .id.2195))))) (.environment-parent.2159 .env.2196))))) (.search-scope.2160 .i",
|
|
|
|
"d.2195 .env.2196)))) (core#begin (core#define .add-identifier!.2162 ((core#lambd",
|
|
|
|
"a (.uniq.2200) (core#lambda (.id.2201 .env.2202) ((core#lambda (.it.2203) (core#",
|
|
|
|
"if .it.2203 .it.2203 ((core#lambda (.it.2204) (core#if .it.2204 .it.2204 #f)) (c",
|
|
|
|
"ore#if (core#if (not (.environment-parent.2159 .env.2202)) (symbol? .id.2201) #f",
|
|
|
|
") (string->symbol (string-append (.environment-prefix.2158 .env.2202) (symbol->s",
|
|
|
|
"tring .id.2201))) ((core#lambda (.uid.2205) (core#begin (.set-identifier!.2163 .",
|
|
|
|
"id.2201 .uid.2205 .env.2202) .uid.2205)) (.uniq.2200 .id.2201)))))) (.search-sco",
|
|
|
|
"pe.2160 .id.2201 .env.2202)))) ((core#lambda (.n.2206) (core#lambda (.id.2207) (",
|
|
|
|
"(core#lambda (.m.2208) (core#begin (core#set! .n.2206 (+ .n.2206 1)) (string->sy",
|
|
|
|
"mbol (string-append \".\" (symbol->string ((core#lambda () (core#begin (core#defin",
|
|
|
|
"e .loop.2209 (core#lambda (.id.2210) (core#if (symbol? .id.2210) .id.2210 (.loop",
|
|
|
|
".2209 (.identifier-name.2152 .id.2210))))) (.loop.2209 .id.2207))))) \".\" (number",
|
|
|
|
"->string .m.2208))))) .n.2206))) 0))) (core#begin (core#define .set-identifier!.",
|
|
|
|
"2163 (core#lambda (.id.2211 .uid.2212 .env.2213) ((.environment-binding.2157 .en",
|
|
|
|
"v.2213) .id.2211 .uid.2212))) (core#begin (core#define .make-environment.2164 (c",
|
|
|
|
"ore#lambda (.prefix.2214) (.%make-environment.2155 #f (symbol->string .prefix.22",
|
|
|
|
"14) (make-ephemeron-table)))) (core#begin (core#define .default-environment.2165",
|
|
|
|
" ((core#lambda (.env.2215) (core#begin (for-each (core#lambda (.x.2216) (.set-id",
|
|
|
|
"entifier!.2163 .x.2216 .x.2216 .env.2215)) (core#quote (core#define core#set! co",
|
|
|
|
"re#quote core#lambda core#if core#begin core#define-macro))) .env.2215)) (.make-",
|
|
|
|
"environment.2164 (string->symbol \"\")))) (core#begin (core#define .extend-environ",
|
|
|
|
"ment.2166 (core#lambda (.parent.2217) (.%make-environment.2155 .parent.2217 #f (",
|
|
|
|
"make-ephemeron-table)))) (core#begin (core#define .global-macro-table.2167 (make",
|
|
|
|
"-dictionary)) (core#begin (core#define .find-macro.2168 (core#lambda (.uid.2218)",
|
|
|
|
" (core#if (dictionary-has? .global-macro-table.2167 .uid.2218) (dictionary-ref .",
|
|
|
|
"global-macro-table.2167 .uid.2218) #f))) (core#begin (core#define .add-macro!.21",
|
|
|
|
"69 (core#lambda (.uid.2219 .expander.2220) (dictionary-set! .global-macro-table.",
|
|
|
|
"2167 .uid.2219 .expander.2220))) (core#begin (core#define .shadow-macro!.2170 (c",
|
|
|
|
"ore#lambda (.uid.2221) (core#if (dictionary-has? .global-macro-table.2167 .uid.2",
|
|
|
|
"221) (dictionary-delete! .global-macro-table.2167 .uid.2221) #undefined))) (core",
|
|
|
|
"#begin (core#define .macro-objects.2171 (core#lambda () .global-macro-table.2167",
|
|
|
|
")) (core#begin (core#define .expand.2172 ((core#lambda (.task-queue.2222) (core#",
|
|
|
|
"begin (core#define .queue.2223 (core#lambda (.task.2236) ((core#lambda (.tmp.223",
|
|
|
|
"7) (core#begin (.task-queue.2222 (cons (cons .tmp.2237 .task.2236) (.task-queue.",
|
|
|
|
"2222))) .tmp.2237)) (cons #f #f)))) (core#begin (core#define .run-all.2224 (core",
|
|
|
|
"#lambda () (for-each (core#lambda (.x.2238) ((core#lambda (.task.2239 .skelton.2",
|
|
|
|
"240) ((core#lambda (.x.2241) (core#begin (set-car! .skelton.2240 (car .x.2241)) ",
|
|
|
|
"(set-cdr! .skelton.2240 (cdr .x.2241)))) (.task.2239))) (cdr .x.2238) (car .x.22",
|
|
|
|
"38))) (reverse (.task-queue.2222))))) (core#begin (core#define .caddr.2225 (core",
|
|
|
|
"#lambda (.x.2242) (car (cddr .x.2242)))) (core#begin (core#define .map*.2226 (co",
|
|
|
|
"re#lambda (.proc.2243 .list*.2244) (core#if (null? .list*.2244) .list*.2244 (cor",
|
|
|
|
"e#if (pair? .list*.2244) (cons (.proc.2243 (car .list*.2244)) (.map*.2226 .proc.",
|
|
|
|
"2243 (cdr .list*.2244))) (.proc.2243 .list*.2244))))) (core#begin (core#define .",
|
|
|
|
"literal?.2227 (core#lambda (.x.2245) (not ((core#lambda (.it.2246) (core#if .it.",
|
|
|
|
"2246 .it.2246 ((core#lambda (.it.2247) (core#if .it.2247 .it.2247 #f)) (pair? .x",
|
|
|
|
".2245)))) (.identifier?.2153 .x.2245))))) (core#begin (core#define .call?.2228 (",
|
|
|
|
"core#lambda (.x.2248) (core#if (list? .x.2248) (core#if (not (null? .x.2248)) (.",
|
|
|
|
"identifier?.2153 (car .x.2248)) #f) #f))) (core#begin (core#define .expand-varia",
|
|
|
|
"ble.2229 (core#lambda (.var.2249 .env.2250) ((core#lambda (.x.2251) ((core#lambd",
|
|
|
|
"a (.m.2252) (core#if .m.2252 (.expand-node.2234 (.m.2252 .var.2249 .env.2250) .e",
|
|
|
|
"nv.2250) .x.2251)) (.find-macro.2168 .x.2251))) (.find-identifier.2161 .var.2249",
|
|
|
|
" .env.2250)))) (core#begin (core#define .expand-quote.2230 (core#lambda (.obj.22",
|
|
|
|
"53) (cons (core#quote core#quote) (cons .obj.2253 (core#quote ()))))) (core#begi",
|
|
|
|
"n (core#define .expand-define.2231 (core#lambda (.var.2254 .form.2255 .env.2256)",
|
|
|
|
" ((core#lambda (.uid.2257) (core#begin (.shadow-macro!.2170 .uid.2257) (cons (co",
|
|
|
|
"re#quote core#define) (cons .uid.2257 (cons (.expand-node.2234 .form.2255 .env.2",
|
|
|
|
"256) (core#quote ())))))) (.add-identifier!.2162 .var.2254 .env.2256)))) (core#b",
|
|
|
|
"egin (core#define .expand-lambda.2232 (core#lambda (.args.2258 .body.2259 .env.2",
|
|
|
|
"260) ((core#lambda (.env.2261) ((core#lambda (.args.2262) (with-dynamic-environm",
|
|
|
|
"ent (list (cons .task-queue.2222 (core#quote ()))) (core#lambda () ((core#lambda",
|
|
|
|
" (.body.2263) (core#begin (.run-all.2224) (cons (core#quote core#lambda) (cons .",
|
|
|
|
"args.2262 (cons .body.2263 (core#quote ())))))) (.expand-node.2234 .body.2259 .e",
|
|
|
|
"nv.2261))))) (.map*.2226 (core#lambda (.var.2264) (.add-identifier!.2162 .var.22",
|
|
|
|
"64 .env.2261)) .args.2258))) (.extend-environment.2166 .env.2260)))) (core#begin",
|
|
|
|
" (core#define .expand-define-macro.2233 (core#lambda (.var.2265 .transformer.226",
|
|
|
|
"6 .env.2267) ((core#lambda (.uid.2268) ((core#lambda (.expander.2269) (core#begi",
|
|
|
|
"n (.add-macro!.2169 .uid.2268 .expander.2269) #undefined)) (load (.expand.2235 .",
|
|
|
|
"transformer.2266 .env.2267)))) (.add-identifier!.2162 .var.2265 .env.2267)))) (c",
|
|
|
|
"ore#begin (core#define .expand-node.2234 (core#lambda (.expr.2270 .env.2271) (co",
|
|
|
|
"re#if (.literal?.2227 .expr.2270) .expr.2270 (core#if (.identifier?.2153 .expr.2",
|
|
|
|
"270) (.expand-variable.2229 .expr.2270 .env.2271) (core#if (.call?.2228 .expr.22",
|
|
|
|
"70) ((core#lambda (.functor.2272) ((core#lambda (.key.2273) (core#if ((core#lamb",
|
|
|
|
"da (.it.2274) (core#if .it.2274 .it.2274 #f)) (eqv? .key.2273 (core#quote core#q",
|
|
|
|
"uote))) (.expand-quote.2230 (cadr .expr.2270)) (core#if ((core#lambda (.it.2275)",
|
|
|
|
" (core#if .it.2275 .it.2275 #f)) (eqv? .key.2273 (core#quote core#define))) (.ex",
|
|
|
|
"pand-define.2231 (cadr .expr.2270) (.caddr.2225 .expr.2270) .env.2271) (core#if ",
|
|
|
|
"((core#lambda (.it.2276) (core#if .it.2276 .it.2276 #f)) (eqv? .key.2273 (core#q",
|
|
|
|
"uote core#lambda))) (.queue.2223 (core#lambda () (.expand-lambda.2232 (cadr .exp",
|
|
|
|
"r.2270) (.caddr.2225 .expr.2270) .env.2271))) (core#if ((core#lambda (.it.2277) ",
|
|
|
|
"(core#if .it.2277 .it.2277 #f)) (eqv? .key.2273 (core#quote core#define-macro)))",
|
|
|
|
" (.expand-define-macro.2233 (cadr .expr.2270) (.caddr.2225 .expr.2270) .env.2271",
|
|
|
|
") (core#if #t ((core#lambda (.m.2278) (core#if .m.2278 (.expand-node.2234 (.m.22",
|
|
|
|
"78 .expr.2270 .env.2271) .env.2271) (map (core#lambda (.x.2279) (.expand-node.22",
|
|
|
|
"34 .x.2279 .env.2271)) .expr.2270))) (.find-macro.2168 .functor.2272)) #undefine",
|
|
|
|
"d)))))) .functor.2272)) (.find-identifier.2161 (car .expr.2270) .env.2271)) (cor",
|
|
|
|
"e#if (list? .expr.2270) (map (core#lambda (.x.2280) (.expand-node.2234 .x.2280 .",
|
|
|
|
"env.2271)) .expr.2270) (error \"invalid expression\" .expr.2270))))))) (core#begin",
|
|
|
|
" (core#define .expand.2235 (core#lambda (.expr.2281 .env.2282) ((core#lambda (.x",
|
|
|
|
".2283) (core#begin (.run-all.2224) .x.2283)) (.expand-node.2234 .expr.2281 .env.",
|
|
|
|
"2282)))) .expand.2235)))))))))))))) (make-parameter (core#quote ())))) (values .",
|
|
|
|
"make-identifier.2149 .identifier?.2153 .identifier=?.2154 .identifier-name.2152 ",
|
|
|
|
".identifier-environment.2151 .make-environment.2164 .default-environment.2165 .e",
|
|
|
|
"nvironment?.2156 .find-identifier.2161 .add-identifier!.2162 .set-identifier!.21",
|
|
|
|
"63 .macro-objects.2171 .expand.2172)))))))))))))))))))))) (core#lambda (.make-id",
|
|
|
|
"entifier.2284 .identifier?.2285 .identifier=?.2286 .identifier-name.2287 .identi",
|
|
|
|
"fier-environment.2288 .make-environment.2289 .default-environment.2290 .environm",
|
|
|
|
"ent?.2291 .find-identifier.2292 .add-identifier!.2293 .set-identifier!.2294 .mac",
|
|
|
|
"ro-objects.2295 .expand.2296) (core#begin (core#set! make-identifier .make-ident",
|
|
|
|
"ifier.2284) (core#begin (core#set! identifier? .identifier?.2285) (core#begin (c",
|
|
|
|
"ore#set! identifier=? .identifier=?.2286) (core#begin (core#set! identifier-name",
|
|
|
|
" .identifier-name.2287) (core#begin (core#set! identifier-environment .identifie",
|
|
|
|
"r-environment.2288) (core#begin (core#set! make-environment .make-environment.22",
|
|
|
|
"89) (core#begin (core#set! default-environment .default-environment.2290) (core#",
|
|
|
|
"begin (core#set! environment? .environment?.2291) (core#begin (core#set! find-id",
|
|
|
|
"entifier .find-identifier.2292) (core#begin (core#set! add-identifier! .add-iden",
|
|
|
|
"tifier!.2293) (core#begin (core#set! set-identifier! .set-identifier!.2294) (cor",
|
|
|
|
"e#begin (core#set! macro-objects .macro-objects.2295) (core#set! expand .expand.",
|
|
|
|
"2296)))))))))))))))))))))))))))) (core#begin ((core#lambda () (core#begin (core#",
|
|
|
|
"define .define-transformer.2297 (core#lambda (.name.2299 .transformer.2300) (dic",
|
|
|
|
"tionary-set! (macro-objects) .name.2299 .transformer.2300))) (core#begin (core#d",
|
|
|
|
"efine .the.2298 (core#lambda (.var.2301) (make-identifier .var.2301 default-envi",
|
|
|
|
"ronment))) ((core#lambda (.the-core-define.2302 .the-core-lambda.2303 .the-core-",
|
|
|
|
"begin.2304 .the-core-quote.2305 .the-core-set!.2306 .the-core-if.2307 .the-core-",
|
|
|
|
"define-macro.2308 .the-define.2309 .the-lambda.2310 .the-begin.2311 .the-quote.2",
|
|
|
|
"312 .the-set!.2313 .the-if.2314 .the-define-macro.2315) (core#begin (.define-tra",
|
|
|
|
"nsformer.2297 (core#quote quote) (core#lambda (.form.2320 .env.2321) (core#if (=",
|
|
|
|
" (length .form.2320) 2) (cons .the-core-quote.2305 (cons (cadr .form.2320) (core",
|
|
|
|
"#quote ()))) (error \"malformed quote\" .form.2320)))) (core#begin (.define-transf",
|
|
|
|
"ormer.2297 (core#quote if) (core#lambda (.form.2322 .env.2323) ((core#lambda (.l",
|
|
|
|
"en.2324) (core#if (= .len.2324 3) (append .form.2322 (cons (core#quote #undefine",
|
|
|
|
"d) (core#quote ()))) (core#if (= .len.2324 4) (cons .the-core-if.2307 (cdr .form",
|
|
|
|
".2322)) (error \"malformed if\" .form.2322)))) (length .form.2322)))) (core#begin ",
|
|
|
|
"(.define-transformer.2297 (core#quote begin) (core#lambda (.form.2325 .env.2326)",
|
|
|
|
" ((core#lambda (.len.2327) (core#if (= .len.2327 1) #undefined (core#if (= .len.",
|
|
|
|
"2327 2) (cadr .form.2325) (core#if (= .len.2327 3) (cons .the-core-begin.2304 (c",
|
|
|
|
"dr .form.2325)) (cons .the-core-begin.2304 (cons (cadr .form.2325) (cons (cons .",
|
|
|
|
"the-begin.2311 (cddr .form.2325)) (core#quote ())))))))) (length .form.2325)))) ",
|
|
|
|
"(core#begin (.define-transformer.2297 (core#quote set!) (core#lambda (.form.2328",
|
|
|
|
" .env.2329) (core#if (core#if (= (length .form.2328) 3) (identifier? (cadr .form",
|
|
|
|
".2328)) #f) (cons .the-core-set!.2306 (cdr .form.2328)) (error \"malformed set!\" ",
|
|
|
|
".form.2328)))) (core#begin (core#define .check-formal.2316 (core#lambda (.formal",
|
|
|
|
".2330) ((core#lambda (.it.2331) (core#if .it.2331 .it.2331 ((core#lambda (.it.23",
|
|
|
|
"32) (core#if .it.2332 .it.2332 ((core#lambda (.it.2333) (core#if .it.2333 .it.23",
|
|
|
|
"33 #f)) (core#if (pair? .formal.2330) (core#if (identifier? (car .formal.2330)) ",
|
|
|
|
"(.check-formal.2316 (cdr .formal.2330)) #f) #f)))) (identifier? .formal.2330))))",
|
|
|
|
" (null? .formal.2330)))) (core#begin (.define-transformer.2297 (core#quote lambd",
|
|
|
|
"a) (core#lambda (.form.2334 .env.2335) (core#if (= (length .form.2334) 1) (error",
|
|
|
|
" \"malformed lambda\" .form.2334) (core#if (.check-formal.2316 (cadr .form.2334)) ",
|
|
|
|
"(cons .the-core-lambda.2303 (cons (cadr .form.2334) (cons (cons .the-begin.2311 ",
|
|
|
|
"(cddr .form.2334)) (core#quote ())))) (error \"malformed lambda\" .form.2334))))) ",
|
|
|
|
"(core#begin (.define-transformer.2297 (core#quote define) (core#lambda (.form.23",
|
|
|
|
"36 .env.2337) ((core#lambda (.len.2338) (core#if (= .len.2338 1) (error \"malform",
|
|
|
|
"ed define\" .form.2336) ((core#lambda (.formal.2339) (core#if (identifier? .forma",
|
|
|
|
"l.2339) (core#if (= .len.2338 3) (cons .the-core-define.2302 (cdr .form.2336)) (",
|
|
|
|
"error \"malformed define\" .form.2336)) (core#if (pair? .formal.2339) (cons .the-d",
|
|
|
|
"efine.2309 (cons (car .formal.2339) (cons (cons .the-lambda.2310 (cons (cdr .for",
|
|
|
|
"mal.2339) (cddr .form.2336))) (core#quote ())))) (error \"define: binding to non-",
|
|
|
|
"varaible object\" .form.2336)))) (cadr .form.2336)))) (length .form.2336)))) (cor",
|
|
|
|
"e#begin (.define-transformer.2297 (core#quote define-macro) (core#lambda (.form.",
|
|
|
|
"2340 .env.2341) (core#if (= (length .form.2340) 3) (core#if (identifier? (cadr .",
|
|
|
|
"form.2340)) (cons .the-core-define-macro.2308 (cdr .form.2340)) (error \"define-m",
|
|
|
|
"acro: binding to non-variable object\" .form.2340)) (error \"malformed define-macr",
|
|
|
|
"o\" .form.2340)))) (core#begin #undefined (core#begin (.define-transformer.2297 (",
|
|
|
|
"core#quote else) (core#lambda ._.2342 (error \"invalid use of auxiliary syntax\" (",
|
|
|
|
"core#quote else)))) (core#begin (.define-transformer.2297 (core#quote =>) (core#",
|
|
|
|
"lambda ._.2343 (error \"invalid use of auxiliary syntax\" (core#quote =>)))) (core",
|
|
|
|
"#begin (.define-transformer.2297 (core#quote unquote) (core#lambda ._.2344 (erro",
|
|
|
|
"r \"invalid use of auxiliary syntax\" (core#quote unquote)))) (core#begin (.define",
|
|
|
|
"-transformer.2297 (core#quote unquote-splicing) (core#lambda ._.2345 (error \"inv",
|
|
|
|
"alid use of auxiliary syntax\" (core#quote unquote-splicing)))) (core#begin (.def",
|
|
|
|
"ine-transformer.2297 (core#quote let) (core#lambda (.form.2346 .env.2347) (core#",
|
|
|
|
"if (identifier? (cadr .form.2346)) ((core#lambda (.name.2348 .formal.2349 .body.",
|
|
|
|
"2350) (cons (cons .the-lambda.2310 (cons (core#quote ()) (cons (cons .the-define",
|
|
|
|
".2309 (cons (cons .name.2348 (map car .formal.2349)) .body.2350)) (cons (cons .n",
|
|
|
|
"ame.2348 (map cadr .formal.2349)) (core#quote ()))))) (core#quote ()))) (car (cd",
|
|
|
|
"r .form.2346)) (car (cdr (cdr .form.2346))) (cdr (cdr (cdr .form.2346)))) ((core",
|
|
|
|
"#lambda (.formal.2351 .body.2352) (cons (cons .the-lambda.2310 (cons (map car .f",
|
|
|
|
"ormal.2351) .body.2352)) (map cadr .formal.2351))) (car (cdr .form.2346)) (cdr (",
|
|
|
|
"cdr .form.2346)))))) (core#begin (.define-transformer.2297 (core#quote and) (cor",
|
|
|
|
"e#lambda (.form.2353 .env.2354) (core#if (null? (cdr .form.2353)) #t (core#if (n",
|
|
|
|
"ull? (cddr .form.2353)) (cadr .form.2353) (cons .the-if.2314 (cons (cadr .form.2",
|
|
|
|
"353) (cons (cons (.the.2298 (core#quote and)) (cddr .form.2353)) (cons (core#quo",
|
|
|
|
"te #f) (core#quote ()))))))))) (core#begin (.define-transformer.2297 (core#quote",
|
|
|
|
" or) (core#lambda (.form.2355 .env.2356) (core#if (null? (cdr .form.2355)) #f ((",
|
|
|
|
"core#lambda (.tmp.2357) (cons (.the.2298 (core#quote let)) (cons (cons (cons .tm",
|
|
|
|
"p.2357 (cons (cadr .form.2355) (core#quote ()))) (core#quote ())) (cons (cons .t",
|
|
|
|
"he-if.2314 (cons .tmp.2357 (cons .tmp.2357 (cons (cons (.the.2298 (core#quote or",
|
|
|
|
")) (cddr .form.2355)) (core#quote ()))))) (core#quote ()))))) (make-identifier (",
|
|
|
|
"core#quote it) .env.2356))))) (core#begin (.define-transformer.2297 (core#quote ",
|
|
|
|
"cond) (core#lambda (.form.2358 .env.2359) ((core#lambda (.clauses.2360) (core#if",
|
|
|
|
" (null? .clauses.2360) #undefined ((core#lambda (.clause.2361) (core#if (core#if",
|
|
|
|
" (identifier? (car .clause.2361)) (identifier=? (.the.2298 (core#quote else)) (m",
|
|
|
|
"ake-identifier (car .clause.2361) .env.2359)) #f) (cons .the-begin.2311 (cdr .cl",
|
|
|
|
"ause.2361)) (core#if (null? (cdr .clause.2361)) (cons (.the.2298 (core#quote or)",
|
|
|
|
") (cons (car .clause.2361) (cons (cons (.the.2298 (core#quote cond)) (cdr .claus",
|
|
|
|
"es.2360)) (core#quote ())))) (core#if (core#if (identifier? (cadr .clause.2361))",
|
|
|
|
" (identifier=? (.the.2298 (core#quote =>)) (make-identifier (cadr .clause.2361) ",
|
|
|
|
".env.2359)) #f) ((core#lambda (.tmp.2362) (cons (.the.2298 (core#quote let)) (co",
|
|
|
|
"ns (cons (cons .tmp.2362 (cons (car .clause.2361) (core#quote ()))) (core#quote ",
|
|
|
|
"())) (cons (cons .the-if.2314 (cons .tmp.2362 (cons (cons (cadr (cdr .clause.236",
|
|
|
|
"1)) (cons .tmp.2362 (core#quote ()))) (cons (cons (.the.2298 (core#quote cond)) ",
|
|
|
|
"(cddr .form.2358)) (core#quote ()))))) (core#quote ()))))) (make-identifier (cor",
|
|
|
|
"e#quote tmp) .env.2359)) (cons .the-if.2314 (cons (car .clause.2361) (cons (cons",
|
|
|
|
" .the-begin.2311 (cdr .clause.2361)) (cons (cons (.the.2298 (core#quote cond)) (",
|
|
|
|
"cdr .clauses.2360)) (core#quote ()))))))))) (car .clauses.2360)))) (cdr .form.23",
|
|
|
|
"58)))) (core#begin (.define-transformer.2297 (core#quote quasiquote) (core#lambd",
|
|
|
|
"a (.form.2363 .env.2364) (core#begin (core#define .quasiquote?.2365 (core#lambda",
|
|
|
|
" (.form.2369) (core#if (pair? .form.2369) (core#if (identifier? (car .form.2369)",
|
|
|
|
") (identifier=? (.the.2298 (core#quote quasiquote)) (make-identifier (car .form.",
|
|
|
|
"2369) .env.2364)) #f) #f))) (core#begin (core#define .unquote?.2366 (core#lambda",
|
|
|
|
" (.form.2370) (core#if (pair? .form.2370) (core#if (identifier? (car .form.2370)",
|
|
|
|
") (identifier=? (.the.2298 (core#quote unquote)) (make-identifier (car .form.237",
|
|
|
|
"0) .env.2364)) #f) #f))) (core#begin (core#define .unquote-splicing?.2367 (core#",
|
|
|
|
"lambda (.form.2371) (core#if (pair? .form.2371) (core#if (pair? (car .form.2371)",
|
|
|
|
") (core#if (identifier? (caar .form.2371)) (identifier=? (.the.2298 (core#quote ",
|
|
|
|
"unquote-splicing)) (make-identifier (caar .form.2371) .env.2364)) #f) #f) #f))) ",
|
|
|
|
"(core#begin (core#define .qq.2368 (core#lambda (.depth.2372 .expr.2373) (core#if",
|
|
|
|
" (.unquote?.2366 .expr.2373) (core#if (= .depth.2372 1) (cadr .expr.2373) (list ",
|
|
|
|
"(.the.2298 (core#quote list)) (list (.the.2298 (core#quote quote)) (.the.2298 (c",
|
|
|
|
"ore#quote unquote))) (.qq.2368 (- .depth.2372 1) (car (cdr .expr.2373))))) (core",
|
|
|
|
"#if (.unquote-splicing?.2367 .expr.2373) (core#if (= .depth.2372 1) (list (.the.",
|
|
|
|
"2298 (core#quote append)) (car (cdr (car .expr.2373))) (.qq.2368 .depth.2372 (cd",
|
|
|
|
"r .expr.2373))) (list (.the.2298 (core#quote cons)) (list (.the.2298 (core#quote",
|
|
|
|
" list)) (list (.the.2298 (core#quote quote)) (.the.2298 (core#quote unquote-spli",
|
|
|
|
"cing))) (.qq.2368 (- .depth.2372 1) (car (cdr (car .expr.2373))))) (.qq.2368 .de",
|
|
|
|
"pth.2372 (cdr .expr.2373)))) (core#if (.quasiquote?.2365 .expr.2373) (list (.the",
|
|
|
|
".2298 (core#quote list)) (list (.the.2298 (core#quote quote)) (.the.2298 (core#q",
|
|
|
|
"uote quasiquote))) (.qq.2368 (+ .depth.2372 1) (car (cdr .expr.2373)))) (core#if",
|
|
|
|
" (pair? .expr.2373) (list (.the.2298 (core#quote cons)) (.qq.2368 .depth.2372 (c",
|
|
|
|
"ar .expr.2373)) (.qq.2368 .depth.2372 (cdr .expr.2373))) (core#if (vector? .expr",
|
|
|
|
".2373) (list (.the.2298 (core#quote list->vector)) (.qq.2368 .depth.2372 (vector",
|
|
|
|
"->list .expr.2373))) (list (.the.2298 (core#quote quote)) .expr.2373)))))))) ((c",
|
|
|
|
"ore#lambda (.x.2374) (.qq.2368 1 .x.2374)) (cadr .form.2363)))))))) (core#begin ",
|
|
|
|
"(.define-transformer.2297 (core#quote let*) (core#lambda (.form.2375 .env.2376) ",
|
|
|
|
"((core#lambda (.bindings.2377 .body.2378) (core#if (null? .bindings.2377) (cons ",
|
|
|
|
"(.the.2298 (core#quote let)) (cons (core#quote ()) .body.2378)) (cons (.the.2298",
|
|
|
|
" (core#quote let)) (cons (cons (cons (car (car .bindings.2377)) (cdr (car .bindi",
|
|
|
|
"ngs.2377))) (core#quote ())) (cons (cons (.the.2298 (core#quote let*)) (cons (cd",
|
|
|
|
"r .bindings.2377) .body.2378)) (core#quote ())))))) (car (cdr .form.2375)) (cdr ",
|
|
|
|
"(cdr .form.2375))))) (core#begin (.define-transformer.2297 (core#quote letrec) (",
|
|
|
|
"core#lambda (.form.2379 .env.2380) (cons (.the.2298 (core#quote letrec*)) (cdr .",
|
|
|
|
"form.2379)))) (core#begin (.define-transformer.2297 (core#quote letrec*) (core#l",
|
|
|
|
"ambda (.form.2381 .env.2382) ((core#lambda (.bindings.2383 .body.2384) ((core#la",
|
|
|
|
"mbda (.variables.2385 .initials.2386) (cons (.the.2298 (core#quote let)) (cons .",
|
|
|
|
"variables.2385 (append .initials.2386 (append .body.2384 (core#quote ())))))) (m",
|
|
|
|
"ap (core#lambda (.v.2387) (cons .v.2387 (cons (core#quote #undefined) (core#quot",
|
|
|
|
"e ())))) (map car .bindings.2383)) (map (core#lambda (.v.2388) (cons (.the.2298 ",
|
|
|
|
"(core#quote set!)) (append .v.2388 (core#quote ())))) .bindings.2383))) (car (cd",
|
|
|
|
"r .form.2381)) (cdr (cdr .form.2381))))) (core#begin (.define-transformer.2297 (",
|
|
|
|
"core#quote let-values) (core#lambda (.form.2389 .env.2390) (cons (.the.2298 (cor",
|
|
|
|
"e#quote let*-values)) (append (cdr .form.2389) (core#quote ()))))) (core#begin (",
|
|
|
|
".define-transformer.2297 (core#quote let*-values) (core#lambda (.form.2391 .env.",
|
|
|
|
"2392) ((core#lambda (.formals.2393 .body.2394) (core#if (null? .formals.2393) (c",
|
|
|
|
"ons (.the.2298 (core#quote let)) (cons (core#quote ()) (append .body.2394 (core#",
|
|
|
|
"quote ())))) ((core#lambda (.formal.2395) (cons (.the.2298 (core#quote call-with",
|
|
|
|
"-values)) (cons (cons .the-lambda.2310 (cons (core#quote ()) (cdr .formal.2395))",
|
|
|
|
") (cons (cons (.the.2298 (core#quote lambda)) (cons (car .formal.2395) (cons (co",
|
|
|
|
"ns (.the.2298 (core#quote let*-values)) (cons (cdr .formals.2393) .body.2394)) (",
|
|
|
|
"core#quote ())))) (core#quote ()))))) (car .formals.2393)))) (cadr .form.2391) (",
|
|
|
|
"cddr .form.2391)))) (core#begin (.define-transformer.2297 (core#quote define-val",
|
|
|
|
"ues) (core#lambda (.form.2396 .env.2397) ((core#lambda (.formal.2398 .body.2399)",
|
|
|
|
" ((core#lambda (.tmps.2400) (cons .the-begin.2311 (append ((core#lambda () (core",
|
|
|
|
"#begin (core#define .loop.2401 (core#lambda (.formal.2402) (core#if (identifier?",
|
|
|
|
" .formal.2402) (cons (cons .the-define.2309 (cons .formal.2402 (cons (core#quote",
|
|
|
|
" #undefined) (core#quote ())))) (core#quote ())) (core#if (pair? .formal.2402) (",
|
|
|
|
"cons (cons .the-define.2309 (cons (car .formal.2402) (cons (core#quote #undefine",
|
|
|
|
"d) (core#quote ())))) (.loop.2401 (cdr .formal.2402))) (core#quote ()))))) (.loo",
|
|
|
|
"p.2401 .formal.2398)))) (cons (cons (.the.2298 (core#quote call-with-values)) (c",
|
|
|
|
"ons (cons .the-lambda.2310 (cons (core#quote ()) .body.2399)) (cons (cons .the-l",
|
|
|
|
"ambda.2310 (cons .tmps.2400 ((core#lambda () (core#begin (core#define .loop.2403",
|
|
|
|
" (core#lambda (.formal.2404 .tmps.2405) (core#if (identifier? .formal.2404) (con",
|
|
|
|
"s (cons .the-set!.2313 (cons .formal.2404 (cons .tmps.2405 (core#quote ())))) (c",
|
|
|
|
"ore#quote ())) (core#if (pair? .formal.2404) (cons (cons .the-set!.2313 (cons (c",
|
|
|
|
"ar .formal.2404) (cons (car .tmps.2405) (core#quote ())))) (.loop.2403 (cdr .for",
|
|
|
|
"mal.2404) (cdr .tmps.2405))) (core#quote ()))))) (.loop.2403 .formal.2398 .tmps.",
|
|
|
|
"2400)))))) (core#quote ())))) (core#quote ()))))) ((core#lambda () (core#begin (",
|
|
|
|
"core#define .loop.2406 (core#lambda (.formal.2407) (core#if (identifier? .formal",
|
|
|
|
".2407) (make-identifier .formal.2407 .env.2397) (core#if (pair? .formal.2407) (c",
|
|
|
|
"ons (make-identifier (car .formal.2407) .env.2397) (.loop.2406 (cdr .formal.2407",
|
|
|
|
"))) (core#quote ()))))) (.loop.2406 .formal.2398)))))) (cadr .form.2396) (cddr .",
|
|
|
|
"form.2396)))) (core#begin (.define-transformer.2297 (core#quote do) (core#lambda",
|
|
|
|
" (.form.2408 .env.2409) ((core#lambda (.bindings.2410 .test.2411 .cleanup.2412 .",
|
|
|
|
"body.2413) ((core#lambda (.loop.2414) (cons (.the.2298 (core#quote let)) (cons .",
|
|
|
|
"loop.2414 (cons (map (core#lambda (.x.2415) (cons (car .x.2415) (cons (cadr .x.2",
|
|
|
|
"415) (core#quote ())))) .bindings.2410) (cons (cons .the-if.2314 (cons .test.241",
|
|
|
|
"1 (cons (cons .the-begin.2311 .cleanup.2412) (cons (cons .the-begin.2311 (append",
|
|
|
|
" .body.2413 (cons (cons .loop.2414 (map (core#lambda (.x.2416) (core#if (null? (",
|
|
|
|
"cdr (cdr .x.2416))) (car .x.2416) (car (cdr (cdr .x.2416))))) .bindings.2410)) (",
|
|
|
|
"core#quote ())))) (core#quote ()))))) (core#quote ())))))) (make-identifier (cor",
|
|
|
|
"e#quote loop) .env.2409))) (car (cdr .form.2408)) (car (car (cdr (cdr .form.2408",
|
|
|
|
")))) (cdr (car (cdr (cdr .form.2408)))) (cdr (cdr (cdr .form.2408)))))) (core#be",
|
|
|
|
"gin (.define-transformer.2297 (core#quote when) (core#lambda (.form.2417 .env.24",
|
|
|
|
"18) ((core#lambda (.test.2419 .body.2420) (cons .the-if.2314 (cons .test.2419 (c",
|
|
|
|
"ons (cons .the-begin.2311 (append .body.2420 (core#quote ()))) (cons (core#quote",
|
|
|
|
" #undefined) (core#quote ())))))) (car (cdr .form.2417)) (cdr (cdr .form.2417)))",
|
|
|
|
")) (core#begin (.define-transformer.2297 (core#quote unless) (core#lambda (.form",
|
|
|
|
".2421 .env.2422) ((core#lambda (.test.2423 .body.2424) (cons .the-if.2314 (cons ",
|
|
|
|
".test.2423 (cons (core#quote #undefined) (cons (cons .the-begin.2311 (append .bo",
|
|
|
|
"dy.2424 (core#quote ()))) (core#quote ())))))) (car (cdr .form.2421)) (cdr (cdr ",
|
|
|
|
".form.2421))))) (core#begin (.define-transformer.2297 (core#quote case) (core#la",
|
|
|
|
"mbda (.form.2425 .env.2426) ((core#lambda (.key.2427 .clauses.2428) ((core#lambd",
|
|
|
|
"a (.the-key.2429) (cons (.the.2298 (core#quote let)) (cons (cons (cons .the-key.",
|
|
|
|
"2429 (cons .key.2427 (core#quote ()))) (core#quote ())) (cons ((core#lambda () (",
|
|
|
|
"core#begin (core#define .loop.2430 (core#lambda (.clauses.2431) (core#if (null? ",
|
|
|
|
".clauses.2431) #undefined ((core#lambda (.clause.2432) (cons .the-if.2314 (cons ",
|
|
|
|
"(core#if (core#if (identifier? (car .clause.2432)) (identifier=? (.the.2298 (cor",
|
|
|
|
"e#quote else)) (make-identifier (car .clause.2432) .env.2426)) #f) #t (cons (.th",
|
|
|
|
"e.2298 (core#quote or)) (append (map (core#lambda (.x.2433) (cons (.the.2298 (co",
|
|
|
|
"re#quote eqv?)) (cons .the-key.2429 (cons (cons .the-quote.2312 (cons .x.2433 (c",
|
|
|
|
"ore#quote ()))) (core#quote ()))))) (car .clause.2432)) (core#quote ())))) (cons",
|
|
|
|
" (core#if (core#if (identifier? (cadr .clause.2432)) (identifier=? (.the.2298 (c",
|
|
|
|
"ore#quote =>)) (make-identifier (cadr .clause.2432) .env.2426)) #f) (cons (car (",
|
|
|
|
"cdr (cdr .clause.2432))) (cons .the-key.2429 (core#quote ()))) (cons .the-begin.",
|
|
|
|
"2311 (append (cdr .clause.2432) (core#quote ())))) (cons (.loop.2430 (cdr .claus",
|
|
|
|
"es.2431)) (core#quote ())))))) (car .clauses.2431))))) (.loop.2430 .clauses.2428",
|
|
|
|
")))) (core#quote ()))))) (make-identifier (core#quote key) .env.2426))) (car (cd",
|
|
|
|
"r .form.2425)) (cdr (cdr .form.2425))))) (core#begin (.define-transformer.2297 (",
|
|
|
|
"core#quote parameterize) (core#lambda (.form.2434 .env.2435) ((core#lambda (.for",
|
|
|
|
"mal.2436 .body.2437) (cons (.the.2298 (core#quote with-dynamic-environment)) (co",
|
|
|
|
"ns (cons (.the.2298 (core#quote list)) (append (map (core#lambda (.x.2438) (cons",
|
|
|
|
" (.the.2298 (core#quote cons)) (cons (car .x.2438) (cons (cadr .x.2438) (core#qu",
|
|
|
|
"ote ()))))) .formal.2436) (core#quote ()))) (cons (cons .the-lambda.2310 (cons (",
|
|
|
|
"core#quote ()) (append .body.2437 (core#quote ())))) (core#quote ()))))) (car (c",
|
|
|
|
"dr .form.2434)) (cdr (cdr .form.2434))))) (.define-transformer.2297 (core#quote ",
|
|
|
|
"define-record-type) (core#lambda (.form.2439 .env.2440) ((core#lambda (.type.244",
|
|
|
|
"1 .ctor.2442 .pred.2443 .fields.2444) (cons .the-begin.2311 (cons (cons .the-def",
|
|
|
|
"ine.2309 (cons .ctor.2442 (cons (cons (.the.2298 (core#quote make-record)) (cons",
|
|
|
|
" (cons (core#quote quote) (cons .type.2441 (core#quote ()))) (cons (cons (.the.2",
|
|
|
|
"298 (core#quote vector)) (map (core#lambda (.field.2445) (core#if (memq (car .fi",
|
|
|
|
"eld.2445) (cdr .ctor.2442)) (car .field.2445) #undefined)) .fields.2444)) (core#",
|
|
|
|
"quote ())))) (core#quote ())))) (cons (cons .the-define.2309 (cons .pred.2443 (c",
|
|
|
|
"ons (cons (.the.2298 (core#quote lambda)) (cons (cons (core#quote obj) (core#quo",
|
|
|
|
"te ())) (cons (cons (.the.2298 (core#quote and)) (cons (cons (.the.2298 (core#qu",
|
|
|
|
"ote record?)) (cons (core#quote obj) (core#quote ()))) (cons (cons (.the.2298 (c",
|
|
|
|
"ore#quote eq?)) (cons (cons (.the.2298 (core#quote record-type)) (cons (core#quo",
|
|
|
|
"te obj) (core#quote ()))) (cons (cons (core#quote quote) (cons .type.2441 (core#",
|
|
|
|
"quote ()))) (core#quote ())))) (core#quote ())))) (core#quote ())))) (core#quote",
|
|
|
|
" ())))) ((core#lambda () (core#begin (core#define .loop.2446 (core#lambda (.fiel",
|
|
|
|
"ds.2447 .pos.2448 .acc.2449) (core#if (null? .fields.2447) .acc.2449 ((core#lamb",
|
|
|
|
"da (.field.2450) ((core#lambda (.defs.2451) (.loop.2446 (cdr .fields.2447) (+ .p",
|
|
|
|
"os.2448 1) (append .defs.2451 .acc.2449))) (cons (cons .the-define.2309 (cons (c",
|
|
|
|
"ons (cadr .field.2450) (cons (core#quote obj) (core#quote ()))) (cons (cons .the",
|
|
|
|
"-if.2314 (cons (cons .pred.2443 (cons (core#quote obj) (core#quote ()))) (cons (",
|
|
|
|
"cons (.the.2298 (core#quote vector-ref)) (cons (cons (.the.2298 (core#quote reco",
|
|
|
|
"rd-datum)) (cons (core#quote obj) (core#quote ()))) (cons .pos.2448 (core#quote ",
|
|
|
|
"())))) (cons (cons (.the.2298 (core#quote error)) (cons (core#quote \"record type",
|
|
|
|
" mismatch\") (cons (core#quote obj) (cons (cons (core#quote quote) (cons .type.24",
|
|
|
|
"41 (core#quote ()))) (core#quote ()))))) (core#quote ()))))) (core#quote ())))) ",
|
|
|
|
"(core#if (null? (cddr .field.2450)) (core#quote ()) (cons (cons .the-define.2309",
|
|
|
|
" (cons (cons (car (cddr .field.2450)) (cons (core#quote obj) (cons (core#quote v",
|
|
|
|
"alue) (core#quote ())))) (cons (cons .the-if.2314 (cons (cons .pred.2443 (cons (",
|
|
|
|
"core#quote obj) (core#quote ()))) (cons (cons (.the.2298 (core#quote vector-set!",
|
|
|
|
")) (cons (cons (.the.2298 (core#quote record-datum)) (cons (core#quote obj) (cor",
|
|
|
|
"e#quote ()))) (cons .pos.2448 (cons (core#quote value) (core#quote ()))))) (cons",
|
|
|
|
" (cons (.the.2298 (core#quote error)) (cons (core#quote \"record type mismatch\") ",
|
|
|
|
"(cons (core#quote obj) (cons (cons (core#quote quote) (cons .type.2441 (core#quo",
|
|
|
|
"te ()))) (core#quote ()))))) (core#quote ()))))) (core#quote ())))) (core#quote ",
|
|
|
|
"())))))) (car .fields.2447))))) (.loop.2446 .fields.2444 0 (core#quote ())))))))",
|
|
|
|
")) (car (cdr .form.2439)) (car (cdr (cdr .form.2439))) (car (cdr (cdr (cdr .form",
|
|
|
|
".2439)))) (cdr (cdr (cdr (cdr .form.2439))))))))))))))))))))))))))))))))))))) (.",
|
|
|
|
"the.2298 (core#quote core#define)) (.the.2298 (core#quote core#lambda)) (.the.22",
|
|
|
|
"98 (core#quote core#begin)) (.the.2298 (core#quote core#quote)) (.the.2298 (core",
|
|
|
|
"#quote core#set!)) (.the.2298 (core#quote core#if)) (.the.2298 (core#quote core#",
|
|
|
|
"define-macro)) (.the.2298 (core#quote define)) (.the.2298 (core#quote lambda)) (",
|
|
|
|
".the.2298 (core#quote begin)) (.the.2298 (core#quote quote)) (.the.2298 (core#qu",
|
|
|
|
"ote set!)) (.the.2298 (core#quote if)) (.the.2298 (core#quote define-macro))))))",
|
|
|
|
") (core#begin (core#begin (core#define compile #undefined) (call-with-values (co",
|
|
|
|
"re#lambda () ((core#lambda () (core#begin (core#define .caddr.2452 (core#lambda ",
|
|
|
|
"(.x.2459) (car (cddr .x.2459)))) (core#begin (core#define .cadddr.2453 (core#lam",
|
|
|
|
"bda (.x.2460) (cadr (cddr .x.2460)))) (core#begin (core#define .max.2454 (core#l",
|
|
|
|
"ambda (.a.2461 .b.2462) (core#if (< .a.2461 .b.2462) .b.2462 .a.2461))) (core#be",
|
|
|
|
"gin (core#define .integer?.2455 (core#lambda (.n.2463) (core#if (number? .n.2463",
|
|
|
|
") (exact? .n.2463) #f))) (core#begin (core#define .normalize.2456 ((core#lambda ",
|
|
|
|
"(.defs.2464) (core#begin (core#define .normalize.2465 (core#lambda (.e.2466) (co",
|
|
|
|
"re#if (symbol? .e.2466) (cons (core#quote ref) (cons .e.2466 (core#quote ()))) (",
|
|
|
|
"core#if (not (pair? .e.2466)) (cons (core#quote quote) (cons .e.2466 (core#quote",
|
|
|
|
" ()))) ((core#lambda (.key.2467) (core#if ((core#lambda (.it.2468) (core#if .it.",
|
|
|
|
"2468 .it.2468 #f)) (eqv? .key.2467 (core#quote core#quote))) (cons (core#quote q",
|
|
|
|
"uote) (cdr .e.2466)) (core#if ((core#lambda (.it.2469) (core#if .it.2469 .it.246",
|
|
|
|
"9 #f)) (eqv? .key.2467 (core#quote core#define))) ((core#lambda (.var.2470 .val.",
|
|
|
|
"2471) (core#begin (.defs.2464 (cons .var.2470 (.defs.2464))) (cons (core#quote s",
|
|
|
|
"et!) (cons .var.2470 (cons (.normalize.2465 .val.2471) (core#quote ())))))) (cad",
|
|
|
|
"r .e.2466) (.caddr.2452 .e.2466)) (core#if ((core#lambda (.it.2472) (core#if .it",
|
|
|
|
".2472 .it.2472 #f)) (eqv? .key.2467 (core#quote core#lambda))) ((core#lambda (.a",
|
|
|
|
"rgs.2473 .body.2474) (with-dynamic-environment (list (cons .defs.2464 (core#quot",
|
|
|
|
"e ()))) (core#lambda () ((core#lambda (.body.2475) (core#if (null? (.defs.2464))",
|
|
|
|
" (cons (core#quote lambda) (cons .args.2473 (cons .body.2475 (core#quote ())))) ",
|
|
|
|
"(cons (core#quote lambda) (cons .args.2473 (cons (cons (cons (core#quote lambda)",
|
|
|
|
" (cons (.defs.2464) (cons .body.2475 (core#quote ())))) (append (map (core#lambd",
|
|
|
|
"a (._.2476) #f) (.defs.2464)) (core#quote ()))) (core#quote ())))))) (.normalize",
|
|
|
|
".2465 .body.2474))))) (cadr .e.2466) (.caddr.2452 .e.2466)) (core#if ((core#lamb",
|
|
|
|
"da (.it.2477) (core#if .it.2477 .it.2477 #f)) (eqv? .key.2467 (core#quote core#s",
|
|
|
|
"et!))) (cons (core#quote set!) (map .normalize.2465 (cdr .e.2466))) (core#if ((c",
|
|
|
|
"ore#lambda (.it.2478) (core#if .it.2478 .it.2478 #f)) (eqv? .key.2467 (core#quot",
|
|
|
|
"e core#if))) (cons (core#quote if) (map .normalize.2465 (cdr .e.2466))) (core#if",
|
|
|
|
" ((core#lambda (.it.2479) (core#if .it.2479 .it.2479 #f)) (eqv? .key.2467 (core#",
|
|
|
|
"quote core#begin))) (cons (core#quote begin) (map .normalize.2465 (cdr .e.2466))",
|
|
|
|
") (core#if #t (map .normalize.2465 .e.2466) #undefined)))))))) (car .e.2466)))))",
|
|
|
|
") .normalize.2465)) (make-parameter (core#quote ())))) (core#begin (core#define ",
|
|
|
|
".transform.2457 ((core#lambda () (core#begin (core#define .uniq.2480 ((core#lamb",
|
|
|
|
"da (.n.2485) (core#lambda () (core#begin (core#set! .n.2485 (+ .n.2485 1)) (stri",
|
|
|
|
"ng->symbol (string-append \"$\" (number->string .n.2485)))))) 0)) (core#begin (cor",
|
|
|
|
"e#define .transform-k.2481 (core#lambda (.e.2486 .k.2487) ((core#lambda (.key.24",
|
|
|
|
"88) (core#if ((core#lambda (.it.2489) (core#if .it.2489 .it.2489 ((core#lambda (",
|
|
|
|
".it.2490) (core#if .it.2490 .it.2490 ((core#lambda (.it.2491) (core#if .it.2491 ",
|
|
|
|
".it.2491 #f)) (eqv? .key.2488 (core#quote quote))))) (eqv? .key.2488 (core#quote",
|
|
|
|
" lambda))))) (eqv? .key.2488 (core#quote ref))) (.k.2487 (.transform-v.2484 .e.2",
|
|
|
|
"486)) (core#if ((core#lambda (.it.2492) (core#if .it.2492 .it.2492 #f)) (eqv? .k",
|
|
|
|
"ey.2488 (core#quote begin))) (.transform-k.2481 (cadr .e.2486) (core#lambda (._.",
|
|
|
|
"2493) (.transform-k.2481 (.caddr.2452 .e.2486) .k.2487))) (core#if ((core#lambda",
|
|
|
|
" (.it.2494) (core#if .it.2494 .it.2494 #f)) (eqv? .key.2488 (core#quote set!))) ",
|
|
|
|
"(.transform-k.2481 (.caddr.2452 .e.2486) (core#lambda (.v.2495) (cons (core#quot",
|
|
|
|
"e set!) (cons (cadr .e.2486) (cons .v.2495 (cons (.k.2487 (core#quote (undefined",
|
|
|
|
"))) (core#quote ()))))))) (core#if ((core#lambda (.it.2496) (core#if .it.2496 .i",
|
|
|
|
"t.2496 #f)) (eqv? .key.2488 (core#quote if))) ((core#lambda (.v.2497 .c.2498) (c",
|
|
|
|
"ons (cons (core#quote lambda) (cons (cons .c.2498 (core#quote ())) (cons (.trans",
|
|
|
|
"form-k.2481 (cadr .e.2486) (core#lambda (.x.2499) (cons (core#quote if) (cons .x",
|
|
|
|
".2499 (cons (.transform-c.2483 (.caddr.2452 .e.2486) .c.2498) (cons (.transform-",
|
|
|
|
"c.2483 (.cadddr.2453 .e.2486) .c.2498) (core#quote ()))))))) (core#quote ())))) ",
|
|
|
|
"(cons (cons (core#quote lambda) (cons (cons .v.2497 (core#quote ())) (cons (.k.2",
|
|
|
|
"487 (cons (core#quote ref) (cons .v.2497 (core#quote ())))) (core#quote ())))) (",
|
|
|
|
"core#quote ())))) (.uniq.2480) (cons (core#quote ref) (cons (.uniq.2480) (core#q",
|
|
|
|
"uote ())))) (core#if #t ((core#lambda (.v.2500) ((core#lambda (.c.2501) ((core#l",
|
|
|
|
"ambda () (.transform-k.2481 (car .e.2486) (core#lambda (.f.2502) (.transform*-k.",
|
|
|
|
"2482 (cdr .e.2486) (core#lambda (.args.2503) (cons .f.2502 (cons .c.2501 (append",
|
|
|
|
" .args.2503 (core#quote ()))))))))))) (cons (core#quote lambda) (cons (cons .v.2",
|
|
|
|
"500 (core#quote ())) (cons (.k.2487 (cons (core#quote ref) (cons .v.2500 (core#q",
|
|
|
|
"uote ())))) (core#quote ())))))) (.uniq.2480)) #undefined)))))) (car .e.2486))))",
|
|
|
|
" (core#begin (core#define .transform*-k.2482 (core#lambda (.es.2504 .k.2505) (co",
|
|
|
|
"re#if (null? .es.2504) (.k.2505 (core#quote ())) (.transform-k.2481 (car .es.250",
|
|
|
|
"4) (core#lambda (.x.2506) (.transform*-k.2482 (cdr .es.2504) (core#lambda (.xs.2",
|
|
|
|
"507) (.k.2505 (cons .x.2506 .xs.2507))))))))) (core#begin (core#define .transfor",
|
|
|
|
"m-c.2483 (core#lambda (.e.2508 .c.2509) ((core#lambda (.key.2510) (core#if ((cor",
|
|
|
|
"e#lambda (.it.2511) (core#if .it.2511 .it.2511 ((core#lambda (.it.2512) (core#if",
|
|
|
|
" .it.2512 .it.2512 ((core#lambda (.it.2513) (core#if .it.2513 .it.2513 #f)) (eqv",
|
|
|
|
"? .key.2510 (core#quote quote))))) (eqv? .key.2510 (core#quote lambda))))) (eqv?",
|
|
|
|
" .key.2510 (core#quote ref))) (cons .c.2509 (cons (.transform-v.2484 .e.2508) (c",
|
|
|
|
"ore#quote ()))) (core#if ((core#lambda (.it.2514) (core#if .it.2514 .it.2514 #f)",
|
|
|
|
") (eqv? .key.2510 (core#quote begin))) (.transform-k.2481 (cadr .e.2508) (core#l",
|
|
|
|
"ambda (._.2515) (.transform-c.2483 (.caddr.2452 .e.2508) .c.2509))) (core#if ((c",
|
|
|
|
"ore#lambda (.it.2516) (core#if .it.2516 .it.2516 #f)) (eqv? .key.2510 (core#quot",
|
|
|
|
"e set!))) (.transform-k.2481 (.caddr.2452 .e.2508) (core#lambda (.v.2517) (cons ",
|
|
|
|
"(core#quote set!) (cons (cadr .e.2508) (cons .v.2517 (cons (cons .c.2509 (cons (",
|
|
|
|
"cons (core#quote undefined) (core#quote ())) (core#quote ()))) (core#quote ())))",
|
|
|
|
")))) (core#if ((core#lambda (.it.2518) (core#if .it.2518 .it.2518 #f)) (eqv? .ke",
|
|
|
|
"y.2510 (core#quote if))) (core#if (core#if (pair? .c.2509) (eq? (core#quote lamb",
|
|
|
|
"da) (car .c.2509)) #f) ((core#lambda (.k.2519) (cons (cons (core#quote lambda) (",
|
|
|
|
"cons (cons .k.2519 (core#quote ())) (cons (.transform-k.2481 (cadr .e.2508) (cor",
|
|
|
|
"e#lambda (.x.2520) (cons (core#quote if) (cons .x.2520 (cons (.transform-c.2483 ",
|
|
|
|
"(.caddr.2452 .e.2508) .k.2519) (cons (.transform-c.2483 (.cadddr.2453 .e.2508) .",
|
|
|
|
"k.2519) (core#quote ()))))))) (core#quote ())))) (cons .c.2509 (core#quote ())))",
|
|
|
|
") (cons (core#quote ref) (cons (.uniq.2480) (core#quote ())))) (.transform-k.248",
|
|
|
|
"1 (cadr .e.2508) (core#lambda (.x.2521) (cons (core#quote if) (cons .x.2521 (con",
|
|
|
|
"s (.transform-c.2483 (.caddr.2452 .e.2508) .c.2509) (cons (.transform-c.2483 (.c",
|
|
|
|
"adddr.2453 .e.2508) .c.2509) (core#quote ())))))))) (core#if #t (.transform-k.24",
|
|
|
|
"81 (car .e.2508) (core#lambda (.f.2522) (.transform*-k.2482 (cdr .e.2508) (core#",
|
|
|
|
"lambda (.args.2523) (cons .f.2522 (cons .c.2509 (append .args.2523 (core#quote (",
|
|
|
|
"))))))))) #undefined)))))) (car .e.2508)))) (core#begin (core#define .transform-",
|
|
|
|
"v.2484 (core#lambda (.e.2524) ((core#lambda (.key.2525) (core#if ((core#lambda (",
|
|
|
|
".it.2526) (core#if .it.2526 .it.2526 ((core#lambda (.it.2527) (core#if .it.2527 ",
|
|
|
|
".it.2527 #f)) (eqv? .key.2525 (core#quote quote))))) (eqv? .key.2525 (core#quote",
|
|
|
|
" ref))) .e.2524 (core#if ((core#lambda (.it.2528) (core#if .it.2528 .it.2528 #f)",
|
|
|
|
") (eqv? .key.2525 (core#quote lambda))) ((core#lambda (.k.2529) (cons (core#quot",
|
|
|
|
"e lambda) (cons (cons .k.2529 (append (cadr .e.2524) (core#quote ()))) (cons (.t",
|
|
|
|
"ransform-c.2483 (.caddr.2452 .e.2524) (cons (core#quote ref) (cons .k.2529 (core",
|
|
|
|
"#quote ())))) (core#quote ()))))) (.uniq.2480)) #undefined))) (car .e.2524)))) (",
|
|
|
|
"core#lambda (.e.2530) ((core#lambda (.k.2531) (cons (core#quote lambda) (cons (c",
|
|
|
|
"ons .k.2531 (core#quote ())) (cons (.transform-c.2483 .e.2530 (cons (core#quote ",
|
|
|
|
"ref) (cons .k.2531 (core#quote ())))) (core#quote ()))))) (.uniq.2480)))))))))))",
|
|
|
|
" (core#begin (core#define .codegen.2458 ((core#lambda () (core#begin (core#defin",
|
|
|
|
"e .lookup.2532 (core#lambda (.var.2544 .env.2545) ((core#lambda () (core#begin (",
|
|
|
|
"core#define .up.2546 (core#lambda (.depth.2547 .env.2548) (core#if (null? .env.2",
|
|
|
|
"548) (cons (core#quote global) (cons (.emit-objs.2539 .var.2544) (core#quote ())",
|
|
|
|
")) ((core#lambda () (core#begin (core#define .loop.2549 (core#lambda (.index.255",
|
|
|
|
"0 .binding.2551) (core#if (symbol? .binding.2551) (core#if (eq? .var.2544 .bindi",
|
|
|
|
"ng.2551) (cons (core#quote local) (cons .depth.2547 (cons .index.2550 (core#quot",
|
|
|
|
"e ())))) (.up.2546 (+ .depth.2547 1) (cdr .env.2548))) (core#if (null? .binding.",
|
|
|
|
"2551) (.up.2546 (+ .depth.2547 1) (cdr .env.2548)) (core#if (eq? .var.2544 (car ",
|
|
|
|
".binding.2551)) (cons (core#quote local) (cons .depth.2547 (cons .index.2550 (co",
|
|
|
|
"re#quote ())))) (.loop.2549 (+ .index.2550 1) (cdr .binding.2551))))))) (.loop.2",
|
|
|
|
"549 1 (car .env.2548)))))))) (.up.2546 0 .env.2545)))))) (core#begin (core#defin",
|
|
|
|
"e .env.2533 (make-parameter (core#quote ()))) (core#begin (core#define .code.253",
|
|
|
|
"4 (make-parameter (core#quote ()))) (core#begin (core#define .reps.2535 (make-pa",
|
|
|
|
"rameter (core#quote ()))) (core#begin (core#define .objs.2536 (make-parameter (c",
|
|
|
|
"ore#quote ()))) (core#begin (core#define .emit.2537 (core#lambda (.inst.2552) (.",
|
|
|
|
"code.2534 (cons .inst.2552 (.code.2534))))) (core#begin (core#define .emit-irep.",
|
|
|
|
"2538 (core#lambda (.irep.2553) ((core#lambda (.n.2554) (core#begin (.reps.2535 (",
|
|
|
|
"cons .irep.2553 (.reps.2535))) .n.2554)) (length (.reps.2535))))) (core#begin (c",
|
|
|
|
"ore#define .emit-objs.2539 (core#lambda (.obj.2555) ((core#lambda (.n.2556) (cor",
|
|
|
|
"e#begin (.objs.2536 (cons .obj.2555 (.objs.2536))) .n.2556)) (length (.objs.2536",
|
|
|
|
"))))) (core#begin (core#define .make-label.2540 ((core#lambda (.n.2557) (core#la",
|
|
|
|
"mbda () ((core#lambda (.m.2558) (core#begin (core#set! .n.2557 (+ .n.2557 1)) .m",
|
|
|
|
".2558)) .n.2557))) 0)) (core#begin (core#define .emit-label.2541 (core#lambda (.",
|
|
|
|
"label.2559) (.code.2534 (cons .label.2559 (.code.2534))))) (core#begin (core#def",
|
|
|
|
"ine .codegen-e.2542 (core#lambda (.e.2560) ((core#lambda (.key.2561) (core#if ((",
|
|
|
|
"core#lambda (.it.2562) (core#if .it.2562 .it.2562 ((core#lambda (.it.2563) (core",
|
|
|
|
"#if .it.2563 .it.2563 ((core#lambda (.it.2564) (core#if .it.2564 .it.2564 ((core",
|
|
|
|
"#lambda (.it.2565) (core#if .it.2565 .it.2565 #f)) (eqv? .key.2561 (core#quote u",
|
|
|
|
"ndefined))))) (eqv? .key.2561 (core#quote quote))))) (eqv? .key.2561 (core#quote",
|
|
|
|
" lambda))))) (eqv? .key.2561 (core#quote ref))) (.codegen-a.2543 .e.2560 0) (cor",
|
|
|
|
"e#if ((core#lambda (.it.2566) (core#if .it.2566 .it.2566 #f)) (eqv? .key.2561 (c",
|
|
|
|
"ore#quote set!))) (core#begin (.codegen-a.2543 (.caddr.2452 .e.2560) 0) (core#be",
|
|
|
|
"gin ((core#lambda (.x.2567) ((core#lambda (.op.2568) ((core#lambda () (.emit.253",
|
|
|
|
"7 (cons .op.2568 (cons (core#quote 0) (cdr .x.2567))))))) (core#if (eq? (core#qu",
|
|
|
|
"ote global) (car .x.2567)) (core#quote GSET) (core#quote LSET)))) (.lookup.2532 ",
|
|
|
|
"(cadr .e.2560) (.env.2533))) (.codegen-e.2542 (.cadddr.2453 .e.2560)))) (core#if",
|
|
|
|
" ((core#lambda (.it.2569) (core#if .it.2569 .it.2569 #f)) (eqv? .key.2561 (core#",
|
|
|
|
"quote if))) (core#begin (.codegen-a.2543 (cadr .e.2560) 0) ((core#lambda (.label",
|
|
|
|
".2570) (core#begin (.emit.2537 (cons (core#quote COND) (cons (core#quote 0) (con",
|
|
|
|
"s .label.2570 (core#quote ()))))) (core#begin (.codegen-e.2542 (.caddr.2452 .e.2",
|
|
|
|
"560)) (core#begin (.emit-label.2541 .label.2570) (.codegen-e.2542 (.cadddr.2453 ",
|
|
|
|
".e.2560)))))) (.make-label.2540))) (core#if #t (core#begin ((core#lambda () (cor",
|
|
|
|
"e#begin (core#define .loop.2571 (core#lambda (.i.2572 .e.2573) (core#if (null? .",
|
|
|
|
"e.2573) #undefined (core#begin (.codegen-a.2543 (car .e.2573) .i.2572) (.loop.25",
|
|
|
|
"71 (+ .i.2572 1) (cdr .e.2573)))))) (.loop.2571 0 .e.2560)))) (.emit.2537 (cons ",
|
|
|
|
"(core#quote CALL) (cons (length .e.2560) (core#quote ()))))) #undefined))))) (ca",
|
|
|
|
"r .e.2560)))) (core#begin (core#define .codegen-a.2543 (core#lambda (.e.2574 .i.",
|
|
|
|
"2575) ((core#lambda (.key.2576) (core#if ((core#lambda (.it.2577) (core#if .it.2",
|
|
|
|
"577 .it.2577 #f)) (eqv? .key.2576 (core#quote ref))) ((core#lambda (.x.2578) ((c",
|
|
|
|
"ore#lambda (.op.2579) ((core#lambda () (.emit.2537 (cons .op.2579 (cons .i.2575 ",
|
|
|
|
"(cdr .x.2578))))))) (core#if (eq? (core#quote global) (car .x.2578)) (core#quote",
|
|
|
|
" GREF) (core#quote LREF)))) (.lookup.2532 (cadr .e.2574) (.env.2533))) (core#if ",
|
|
|
|
"((core#lambda (.it.2580) (core#if .it.2580 .it.2580 #f)) (eqv? .key.2576 (core#q",
|
|
|
|
"uote quote))) ((core#lambda (.obj.2581) (core#if (eq? #t .obj.2581) (.emit.2537 ",
|
|
|
|
"(cons (core#quote LOADT) (cons .i.2575 (core#quote ())))) (core#if (eq? #f .obj.",
|
|
|
|
"2581) (.emit.2537 (cons (core#quote LOADF) (cons .i.2575 (core#quote ())))) (cor",
|
|
|
|
"e#if (null? .obj.2581) (.emit.2537 (cons (core#quote LOADN) (cons .i.2575 (core#",
|
|
|
|
"quote ())))) (core#if (core#if (.integer?.2455 .obj.2581) (<= -128 .obj.2581 127",
|
|
|
|
") #f) (.emit.2537 (cons (core#quote LOADI) (cons .i.2575 (cons .obj.2581 (core#q",
|
|
|
|
"uote ()))))) ((core#lambda (.n.2582) (.emit.2537 (cons (core#quote LOAD) (cons .",
|
|
|
|
"i.2575 (cons .n.2582 (core#quote ())))))) (emit-obj .obj.2581))))))) (cadr .e.25",
|
|
|
|
"74)) (core#if ((core#lambda (.it.2583) (core#if .it.2583 .it.2583 #f)) (eqv? .ke",
|
|
|
|
"y.2576 (core#quote undefined))) (.emit.2537 (cons (core#quote LOADU) (cons .i.25",
|
|
|
|
"75 (core#quote ())))) (core#if ((core#lambda (.it.2584) (core#if .it.2584 .it.25",
|
|
|
|
"84 #f)) (eqv? .key.2576 (core#quote lambda))) ((core#lambda (.frame-size.2585 .a",
|
|
|
|
"rgc-varg.2586) ((core#lambda (.irep.2587) ((core#lambda (.n.2588) (.emit.2537 (c",
|
|
|
|
"ons (core#quote PROC) (cons .i.2575 (cons .n.2588 (core#quote ())))))) (.emit-ir",
|
|
|
|
"ep.2538 .irep.2587))) (with-dynamic-environment (list (cons .code.2534 (core#quo",
|
|
|
|
"te ())) (cons .env.2533 (cons (cadr .e.2574) (.env.2533))) (cons .reps.2535 (cor",
|
|
|
|
"e#quote ())) (cons .objs.2536 (core#quote ()))) (core#lambda () (core#begin (.co",
|
|
|
|
"degen-e.2542 (.caddr.2452 .e.2574)) (list (reverse (.code.2534)) (reverse (.reps",
|
|
|
|
".2535)) (reverse (.objs.2536)) .argc-varg.2586 .frame-size.2585)))))) ((core#lam",
|
|
|
|
"bda () (core#begin (core#define .loop.2589 (core#lambda (.e.2590) ((core#lambda ",
|
|
|
|
"(.key.2591) (core#if ((core#lambda (.it.2592) (core#if .it.2592 .it.2592 ((core#",
|
|
|
|
"lambda (.it.2593) (core#if .it.2593 .it.2593 ((core#lambda (.it.2594) (core#if .",
|
|
|
|
"it.2594 .it.2594 ((core#lambda (.it.2595) (core#if .it.2595 .it.2595 #f)) (eqv? ",
|
|
|
|
".key.2591 (core#quote undefined))))) (eqv? .key.2591 (core#quote quote))))) (eqv",
|
|
|
|
"? .key.2591 (core#quote lambda))))) (eqv? .key.2591 (core#quote ref))) 1 (core#i",
|
|
|
|
"f ((core#lambda (.it.2596) (core#if .it.2596 .it.2596 #f)) (eqv? .key.2591 (core",
|
|
|
|
"#quote if))) (.max.2454 (.loop.2589 (.caddr.2452 .e.2590)) (.loop.2589 (.cadddr.",
|
|
|
|
"2453 .e.2590))) (core#if ((core#lambda (.it.2597) (core#if .it.2597 .it.2597 #f)",
|
|
|
|
") (eqv? .key.2591 (core#quote set!))) (.loop.2589 (.cadddr.2453 .e.2590)) (core#",
|
|
|
|
"if #t (+ 1 (length .e.2590)) #undefined))))) (car .e.2590)))) (.loop.2589 (.cadd",
|
|
|
|
"r.2452 .e.2574))))) ((core#lambda () (core#begin (core#define .loop.2598 (core#l",
|
|
|
|
"ambda (.args.2599 .c.2600) (core#if (symbol? .args.2599) (cons (+ 1 .c.2600) #t)",
|
|
|
|
" (core#if (null? .args.2599) (cons .c.2600 #f) (.loop.2598 (cdr .args.2599) (+ 1",
|
|
|
|
" .c.2600)))))) (.loop.2598 (cadr .e.2574) 0))))) #undefined))))) (car .e.2574)))",
|
|
|
|
") (core#lambda (.e.2601) (with-dynamic-environment (list (cons .code.2534 (core#",
|
|
|
|
"quote ())) (cons .env.2533 (core#quote ())) (cons .reps.2535 (core#quote ())) (c",
|
|
|
|
"ons .objs.2536 (core#quote ()))) (core#lambda () (core#begin (.codegen-e.2542 .e",
|
|
|
|
".2601) (car (.reps.2535))))))))))))))))))))) (core#lambda (.e.2602) (.codegen.24",
|
|
|
|
"58 (.transform.2457 (.normalize.2456 .e.2602)))))))))))))) (core#lambda (.compil",
|
|
|
|
"e.2603) (core#set! compile .compile.2603)))) (core#define eval (core#lambda (.ex",
|
|
|
|
"pr.2604 . .env.2605) (load (expand .expr.2604 (core#if (null? .env.2605) default",
|
|
|
|
"-environment (car .env.2605)))))))))",
|
2017-04-03 09:09:19 -04:00
|
|
|
};
|
2017-04-04 06:00:37 -04:00
|
|
|
#endif
|
2017-04-03 09:09:19 -04:00
|
|
|
|
|
|
|
#if PIC_USE_LIBRARY
|
|
|
|
static const char boot_library_rom[][80] = {
|
2017-04-03 14:55:23 -04:00
|
|
|
"(core#begin (core#define current-library #undefined) (core#begin (core#define fi",
|
|
|
|
"nd-library #undefined) (core#begin (core#define make-library #undefined) (core#b",
|
|
|
|
"egin (core#define library-environment #undefined) (core#begin (core#define libra",
|
|
|
|
"ry-exports #undefined) (core#begin (core#define library-import #undefined) (core",
|
|
|
|
"#begin (core#define library-export #undefined) (call-with-values (core#lambda ()",
|
2017-04-05 03:18:00 -04:00
|
|
|
" ((core#lambda () (core#begin (core#define .mangle.2606 (core#lambda (.name.2615",
|
|
|
|
") (core#begin (core#if (null? .name.2615) (error \"library name should be a list ",
|
|
|
|
"of at least one symbols\" .name.2615) #undefined) (core#begin (core#define .->str",
|
|
|
|
"ing.2616 (core#lambda (.n.2618) (core#if (symbol? .n.2618) ((core#lambda (.str.2",
|
|
|
|
"619) (core#begin (string-for-each (core#lambda (.c.2620) (core#if ((core#lambda ",
|
|
|
|
"(.it.2621) (core#if .it.2621 .it.2621 ((core#lambda (.it.2622) (core#if .it.2622",
|
|
|
|
" .it.2622 #f)) (char=? .c.2620 #\\:)))) (char=? .c.2620 #\\.)) (error \"elements of",
|
|
|
|
" library name may not contain '.' or ':'\" .n.2618) #undefined)) .str.2619) .str.",
|
|
|
|
"2619)) (symbol->string .n.2618)) (core#if (core#if (number? .n.2618) (core#if (e",
|
|
|
|
"xact? .n.2618) (<= 0 .n.2618) #f) #f) (number->string .n.2618) (error \"symbol or",
|
|
|
|
" non-negative integer is required\" .n.2618))))) (core#begin (core#define .join.2",
|
|
|
|
"617 (core#lambda (.strs.2623 .delim.2624) ((core#lambda () (core#begin (core#def",
|
|
|
|
"ine .loop.2625 (core#lambda (.res.2626 .strs.2627) (core#if (null? .strs.2627) .",
|
|
|
|
"res.2626 (.loop.2625 (string-append .res.2626 .delim.2624 (car .strs.2627)) (cdr",
|
|
|
|
" .strs.2627))))) (.loop.2625 (car .strs.2623) (cdr .strs.2623))))))) (core#if (s",
|
|
|
|
"ymbol? .name.2615) .name.2615 (string->symbol (.join.2617 (map .->string.2616 .n",
|
|
|
|
"ame.2615) \".\")))))))) (core#begin (core#define .current-library.2607 (make-param",
|
|
|
|
"eter (core#quote (picrin user)) .mangle.2606)) (core#begin (core#define .*librar",
|
|
|
|
"ies*.2608 (make-dictionary)) (core#begin (core#define .find-library.2609 (core#l",
|
|
|
|
"ambda (.name.2628) (dictionary-has? .*libraries*.2608 (.mangle.2606 .name.2628))",
|
|
|
|
")) (core#begin (core#define .make-library.2610 (core#lambda (.name.2629) ((core#",
|
|
|
|
"lambda (.name.2630) ((core#lambda (.env.2631 .exports.2632) (core#begin (set-ide",
|
|
|
|
"ntifier! (core#quote define-library) (core#quote define-library) .env.2631) (cor",
|
|
|
|
"e#begin (set-identifier! (core#quote import) (core#quote import) .env.2631) (cor",
|
|
|
|
"e#begin (set-identifier! (core#quote export) (core#quote export) .env.2631) (cor",
|
2017-04-03 14:55:23 -04:00
|
|
|
"e#begin (set-identifier! (core#quote cond-expand) (core#quote cond-expand) .env.",
|
2017-04-05 03:18:00 -04:00
|
|
|
"2631) (dictionary-set! .*libraries*.2608 .name.2630 (cons .env.2631 .exports.263",
|
|
|
|
"2))))))) (make-environment (string->symbol (string-append (symbol->string .name.",
|
|
|
|
"2630) \":\"))) (make-dictionary))) (.mangle.2606 .name.2629)))) (core#begin (core#",
|
|
|
|
"define .library-environment.2611 (core#lambda (.name.2633) (car (dictionary-ref ",
|
|
|
|
".*libraries*.2608 (.mangle.2606 .name.2633))))) (core#begin (core#define .librar",
|
|
|
|
"y-exports.2612 (core#lambda (.name.2634) (cdr (dictionary-ref .*libraries*.2608 ",
|
|
|
|
"(.mangle.2606 .name.2634))))) (core#begin (core#define .library-import.2613 (cor",
|
|
|
|
"e#lambda (.name.2635 .sym.2636 .alias.2637) ((core#lambda (.uid.2638) ((core#lam",
|
|
|
|
"bda (.env.2639) (set-identifier! .alias.2637 .uid.2638 .env.2639)) (.library-env",
|
|
|
|
"ironment.2611 (.current-library.2607)))) (dictionary-ref (.library-exports.2612 ",
|
|
|
|
".name.2635) .sym.2636)))) (core#begin (core#define .library-export.2614 (core#la",
|
|
|
|
"mbda (.sym.2640 .alias.2641) ((core#lambda (.env.2642 .exports.2643) (dictionary",
|
|
|
|
"-set! .exports.2643 .alias.2641 (find-identifier .sym.2640 .env.2642))) (.librar",
|
|
|
|
"y-environment.2611 (.current-library.2607)) (.library-exports.2612 (.current-lib",
|
|
|
|
"rary.2607))))) (core#begin ((core#lambda (.define-transformer.2644) (core#begin ",
|
|
|
|
"(.define-transformer.2644 (core#quote define-library) (core#lambda (.form.2645 .",
|
|
|
|
"_.2646) ((core#lambda (.name.2647 .body.2648) (core#begin ((core#lambda (.it.264",
|
|
|
|
"9) (core#if .it.2649 .it.2649 ((core#lambda (.it.2650) (core#if .it.2650 .it.265",
|
|
|
|
"0 #f)) (.make-library.2610 .name.2647)))) (.find-library.2609 .name.2647)) (with",
|
|
|
|
"-dynamic-environment (list (cons .current-library.2607 .name.2647)) (core#lambda",
|
|
|
|
" () (for-each (core#lambda (.expr.2651) (eval .expr.2651 .name.2647)) .body.2648",
|
|
|
|
"))))) (cadr .form.2645) (cddr .form.2645)))) (core#begin (.define-transformer.26",
|
|
|
|
"44 (core#quote cond-expand) (core#lambda (.form.2652 ._.2653) ((core#lambda (.te",
|
|
|
|
"st.2654) (core#begin (core#set! .test.2654 (core#lambda (.form.2655) ((core#lamb",
|
|
|
|
"da (.it.2656) (core#if .it.2656 .it.2656 ((core#lambda (.it.2657) (core#if .it.2",
|
|
|
|
"657 .it.2657 ((core#lambda (.it.2658) (core#if .it.2658 .it.2658 #f)) (core#if (",
|
|
|
|
"pair? .form.2655) ((core#lambda (.key.2659) (core#if ((core#lambda (.it.2660) (c",
|
|
|
|
"ore#if .it.2660 .it.2660 #f)) (eqv? .key.2659 (core#quote library))) (.find-libr",
|
|
|
|
"ary.2609 (cadr .form.2655)) (core#if ((core#lambda (.it.2661) (core#if .it.2661 ",
|
|
|
|
".it.2661 #f)) (eqv? .key.2659 (core#quote not))) (not (.test.2654 (cadr .form.26",
|
|
|
|
"55))) (core#if ((core#lambda (.it.2662) (core#if .it.2662 .it.2662 #f)) (eqv? .k",
|
|
|
|
"ey.2659 (core#quote and))) ((core#lambda () (core#begin (core#define .loop.2663 ",
|
|
|
|
"(core#lambda (.form.2664) ((core#lambda (.it.2665) (core#if .it.2665 .it.2665 ((",
|
|
|
|
"core#lambda (.it.2666) (core#if .it.2666 .it.2666 #f)) (core#if (.test.2654 (car",
|
|
|
|
" .form.2664)) (.loop.2663 (cdr .form.2664)) #f)))) (null? .form.2664)))) (.loop.",
|
|
|
|
"2663 (cdr .form.2655))))) (core#if ((core#lambda (.it.2667) (core#if .it.2667 .i",
|
|
|
|
"t.2667 #f)) (eqv? .key.2659 (core#quote or))) ((core#lambda () (core#begin (core",
|
|
|
|
"#define .loop.2668 (core#lambda (.form.2669) (core#if (pair? .form.2669) ((core#",
|
|
|
|
"lambda (.it.2670) (core#if .it.2670 .it.2670 ((core#lambda (.it.2671) (core#if .",
|
|
|
|
"it.2671 .it.2671 #f)) (.loop.2668 (cdr .form.2669))))) (.test.2654 (car .form.26",
|
|
|
|
"69))) #f))) (.loop.2668 (cdr .form.2655))))) (core#if #t #f #undefined)))))) (ca",
|
|
|
|
"r .form.2655)) #f)))) (core#if (symbol? .form.2655) (memq .form.2655 (features))",
|
|
|
|
" #f)))) (eq? .form.2655 (core#quote else))))) ((core#lambda () (core#begin (core",
|
|
|
|
"#define .loop.2672 (core#lambda (.clauses.2673) (core#if (null? .clauses.2673) #",
|
|
|
|
"undefined (core#if (.test.2654 (caar .clauses.2673)) (cons (make-identifier (cor",
|
|
|
|
"e#quote begin) default-environment) (append (cdar .clauses.2673) (core#quote ())",
|
|
|
|
")) (.loop.2672 (cdr .clauses.2673)))))) (.loop.2672 (cdr .form.2652))))))) #unde",
|
|
|
|
"fined))) (core#begin (.define-transformer.2644 (core#quote import) (core#lambda ",
|
|
|
|
"(.form.2674 ._.2675) ((core#lambda (.caddr.2676 .prefix.2677 .getlib.2678) ((cor",
|
|
|
|
"e#lambda (.extract.2679 .collect.2680) (core#begin (core#set! .extract.2679 (cor",
|
|
|
|
"e#lambda (.spec.2681) ((core#lambda (.key.2682) (core#if ((core#lambda (.it.2683",
|
|
|
|
") (core#if .it.2683 .it.2683 ((core#lambda (.it.2684) (core#if .it.2684 .it.2684",
|
|
|
|
" ((core#lambda (.it.2685) (core#if .it.2685 .it.2685 ((core#lambda (.it.2686) (c",
|
|
|
|
"ore#if .it.2686 .it.2686 #f)) (eqv? .key.2682 (core#quote except))))) (eqv? .key",
|
|
|
|
".2682 (core#quote prefix))))) (eqv? .key.2682 (core#quote rename))))) (eqv? .key",
|
|
|
|
".2682 (core#quote only))) (.extract.2679 (cadr .spec.2681)) (core#if #t (.getlib",
|
|
|
|
".2678 .spec.2681) #undefined))) (car .spec.2681)))) (core#begin (core#set! .coll",
|
|
|
|
"ect.2680 (core#lambda (.spec.2687) ((core#lambda (.key.2688) (core#if ((core#lam",
|
|
|
|
"bda (.it.2689) (core#if .it.2689 .it.2689 #f)) (eqv? .key.2688 (core#quote only)",
|
|
|
|
")) ((core#lambda (.alist.2690) (map (core#lambda (.var.2691) (assq .var.2691 .al",
|
|
|
|
"ist.2690)) (cddr .spec.2687))) (.collect.2680 (cadr .spec.2687))) (core#if ((cor",
|
|
|
|
"e#lambda (.it.2692) (core#if .it.2692 .it.2692 #f)) (eqv? .key.2688 (core#quote ",
|
|
|
|
"rename))) ((core#lambda (.alist.2693 .renames.2694) (map (core#lambda (.s.2695) ",
|
|
|
|
"((core#lambda (.it.2696) (core#if .it.2696 .it.2696 ((core#lambda (.it.2697) (co",
|
|
|
|
"re#if .it.2697 .it.2697 #f)) .s.2695))) (assq (car .s.2695) .renames.2694))) .al",
|
|
|
|
"ist.2693)) (.collect.2680 (cadr .spec.2687)) (map (core#lambda (.x.2698) (cons (",
|
|
|
|
"car .x.2698) (cadr .x.2698))) (cddr .spec.2687))) (core#if ((core#lambda (.it.26",
|
|
|
|
"99) (core#if .it.2699 .it.2699 #f)) (eqv? .key.2688 (core#quote prefix))) ((core",
|
|
|
|
"#lambda (.alist.2700) (map (core#lambda (.s.2701) (cons (.prefix.2677 (.caddr.26",
|
|
|
|
"76 .spec.2687) (car .s.2701)) (cdr .s.2701))) .alist.2700)) (.collect.2680 (cadr",
|
|
|
|
" .spec.2687))) (core#if ((core#lambda (.it.2702) (core#if .it.2702 .it.2702 #f))",
|
|
|
|
" (eqv? .key.2688 (core#quote except))) ((core#lambda (.alist.2703) ((core#lambda",
|
|
|
|
" () (core#begin (core#define .loop.2704 (core#lambda (.alist.2705) (core#if (nul",
|
|
|
|
"l? .alist.2705) (core#quote ()) (core#if (memq (caar .alist.2705) (cddr .spec.26",
|
|
|
|
"87)) (.loop.2704 (cdr .alist.2705)) (cons (car .alist.2705) (.loop.2704 (cdr .al",
|
|
|
|
"ist.2705))))))) (.loop.2704 .alist.2703))))) (.collect.2680 (cadr .spec.2687))) ",
|
|
|
|
"(core#if #t (dictionary-map (core#lambda (.x.2706) (cons .x.2706 .x.2706)) (.lib",
|
|
|
|
"rary-exports.2612 (.getlib.2678 .spec.2687))) #undefined)))))) (car .spec.2687))",
|
|
|
|
")) ((core#lambda (.import.2707) (core#begin (core#set! .import.2707 (core#lambda",
|
|
|
|
" (.spec.2708) ((core#lambda (.lib.2709 .alist.2710) (for-each (core#lambda (.slo",
|
|
|
|
"t.2711) (.library-import.2613 .lib.2709 (cdr .slot.2711) (car .slot.2711))) .ali",
|
|
|
|
"st.2710)) (.extract.2679 .spec.2708) (.collect.2680 .spec.2708)))) (for-each .im",
|
|
|
|
"port.2707 (cdr .form.2674)))) #undefined)))) #undefined #undefined)) (core#lambd",
|
|
|
|
"a (.x.2712) (car (cdr (cdr .x.2712)))) (core#lambda (.prefix.2713 .symbol.2714) ",
|
|
|
|
"(string->symbol (string-append (symbol->string .prefix.2713) (symbol->string .sy",
|
|
|
|
"mbol.2714)))) (core#lambda (.name.2715) (core#if (.find-library.2609 .name.2715)",
|
|
|
|
" .name.2715 (error \"library not found\" .name.2715)))))) (.define-transformer.264",
|
|
|
|
"4 (core#quote export) (core#lambda (.form.2716 ._.2717) ((core#lambda (.collect.",
|
|
|
|
"2718 .export.2719) (core#begin (core#set! .collect.2718 (core#lambda (.spec.2720",
|
|
|
|
") (core#if (symbol? .spec.2720) (cons .spec.2720 .spec.2720) (core#if (core#if (",
|
|
|
|
"list? .spec.2720) (core#if (= (length .spec.2720) 3) (eq? (car .spec.2720) (core",
|
|
|
|
"#quote rename)) #f) #f) (cons (list-ref .spec.2720 1) (list-ref .spec.2720 2)) (",
|
|
|
|
"error \"malformed export\"))))) (core#begin (core#set! .export.2719 (core#lambda (",
|
|
|
|
".spec.2721) ((core#lambda (.slot.2722) (.library-export.2614 (car .slot.2722) (c",
|
|
|
|
"dr .slot.2722))) (.collect.2718 .spec.2721)))) (for-each .export.2719 (cdr .form",
|
|
|
|
".2716))))) #undefined #undefined))))))) (core#lambda (.name.2723 .macro.2724) (d",
|
|
|
|
"ictionary-set! (macro-objects) .name.2723 .macro.2724))) (core#begin ((core#lamb",
|
|
|
|
"da () (core#begin (.make-library.2610 (core#quote (picrin base))) (core#begin (s",
|
|
|
|
"et-car! (dictionary-ref .*libraries*.2608 (.mangle.2606 (core#quote (picrin base",
|
|
|
|
")))) default-environment) (core#begin ((core#lambda (.exports.2725) ((core#lambd",
|
|
|
|
"a (.export-keyword.2726) ((core#lambda () (core#begin (for-each .export-keyword.",
|
|
|
|
"2726 (core#quote (define lambda quote set! if begin define-macro let let* letrec",
|
2017-04-03 14:55:23 -04:00
|
|
|
" letrec* let-values let*-values define-values quasiquote unquote unquote-splicin",
|
2017-04-04 01:54:58 -04:00
|
|
|
"g and or cond case else => do when unless parameterize define-record-type))) (co",
|
2017-04-05 03:18:00 -04:00
|
|
|
"re#begin (.export-keyword.2726 (core#quote boolean?)) (dictionary-for-each .expo",
|
|
|
|
"rt-keyword.2726 (global-objects))))))) (core#lambda (.keyword.2727) (dictionary-",
|
|
|
|
"set! .exports.2725 .keyword.2727 .keyword.2727)))) (.library-exports.2612 (core#",
|
|
|
|
"quote (picrin base)))) (core#begin (core#set! eval ((core#lambda (.e.2728) (core",
|
|
|
|
"#lambda (.expr.2729 . .lib.2730) ((core#lambda (.lib.2731) (with-dynamic-environ",
|
|
|
|
"ment (list (cons .current-library.2607 .lib.2731)) (core#lambda () (.e.2728 .exp",
|
|
|
|
"r.2729 (.library-environment.2611 .lib.2731))))) (core#if (null? .lib.2730) (.cu",
|
|
|
|
"rrent-library.2607) (car .lib.2730))))) eval)) (.make-library.2610 (core#quote (",
|
|
|
|
"picrin user))))))))) (values .current-library.2607 .find-library.2609 .make-libr",
|
|
|
|
"ary.2610 .library-environment.2611 .library-exports.2612 .library-import.2613 .l",
|
|
|
|
"ibrary-export.2614))))))))))))))) (core#lambda (.current-library.2732 .find-libr",
|
|
|
|
"ary.2733 .make-library.2734 .library-environment.2735 .library-exports.2736 .lib",
|
|
|
|
"rary-import.2737 .library-export.2738) (core#begin (core#set! current-library .c",
|
|
|
|
"urrent-library.2732) (core#begin (core#set! find-library .find-library.2733) (co",
|
|
|
|
"re#begin (core#set! make-library .make-library.2734) (core#begin (core#set! libr",
|
|
|
|
"ary-environment .library-environment.2735) (core#begin (core#set! library-export",
|
|
|
|
"s .library-exports.2736) (core#begin (core#set! library-import .library-import.2",
|
|
|
|
"737) (core#set! library-export .library-export.2738))))))))))))))))",
|
2015-01-31 07:14:14 -05:00
|
|
|
};
|
2017-04-03 09:09:19 -04:00
|
|
|
#endif
|
2014-09-08 10:31:04 -04:00
|
|
|
|
2016-03-03 04:59:07 -05:00
|
|
|
void
|
2017-04-04 06:00:37 -04:00
|
|
|
pic_boot(pic_state *PIC_UNUSED(pic))
|
2016-03-03 04:59:07 -05:00
|
|
|
{
|
2017-04-04 06:00:37 -04:00
|
|
|
#if PIC_USE_EVAL
|
2017-04-04 01:54:58 -04:00
|
|
|
pic_load_native(pic, &boot_compile_rom[0][0]);
|
2017-04-04 06:00:37 -04:00
|
|
|
#endif
|
2017-04-03 09:09:19 -04:00
|
|
|
#if PIC_USE_LIBRARY
|
2017-04-03 11:52:59 -04:00
|
|
|
pic_load_native(pic, &boot_library_rom[0][0]);
|
2017-04-03 09:09:19 -04:00
|
|
|
#endif
|
2016-03-03 04:59:07 -05:00
|
|
|
}
|