picrin/lib/ext/boot.c

593 lines
47 KiB
C
Raw Normal View History

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] = {
"(core#begin (core#define make-identifier #undefined) (core#begin (core#define id",
"entifier? #undefined) (core#begin (core#define identifier=? #undefined) (core#be",
"gin (core#define identifier-name #undefined) (core#begin (core#define 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 (core#define set",
"-identifier! #undefined) (core#begin (core#define macro-objects #undefined) (cor",
"e#begin (core#define compile #undefined) (core#begin (core#define eval #undefine",
"d) (call-with-values (core#lambda () ((core#lambda () (core#begin (core#begin (c",
2017-04-04 06:00:37 -04:00
"ore#define .make-identifier.2149 (core#lambda (.name.2177 .env.2178) (make-recor",
"d (core#quote identifier) (vector .name.2177 .env.2178)))) (core#begin (core#def",
"ine .%identifier?.2150 (core#lambda (.obj.2179) (core#if (record? .obj.2179) (eq",
"? (record-type .obj.2179) (core#quote identifier)) #f))) (core#begin (core#defin",
"e .identifier-environment.2151 (core#lambda (.obj.2180) (core#if (.%identifier?.",
"2150 .obj.2180) (vector-ref (record-datum .obj.2180) 1) (error \"record type mism",
"atch\" .obj.2180 (core#quote identifier))))) (core#define .identifier-name.2152 (",
"core#lambda (.obj.2181) (core#if (.%identifier?.2150 .obj.2181) (vector-ref (rec",
"ord-datum .obj.2181) 0) (error \"record type mismatch\" .obj.2181 (core#quote iden",
"tifier)))))))) (core#begin (core#define .identifier?.2153 (core#lambda (.obj.218",
"2) ((core#lambda (.it.2183) (core#if .it.2183 .it.2183 ((core#lambda (.it.2184) ",
"(core#if .it.2184 .it.2184 #f)) (.%identifier?.2150 .obj.2182)))) (symbol? .obj.",
"2182)))) (core#begin (core#define .identifier=?.2154 (core#lambda (.id1.2185 .id",
"2.2186) (core#if (core#if (symbol? .id1.2185) (symbol? .id2.2186) #f) (eq? .id1.",
"2185 .id2.2186) (core#if (core#if (.%identifier?.2150 .id1.2185) (.%identifier?.",
"2150 .id2.2186) #f) (eq? (.find-identifier.2161 (.identifier-name.2152 .id1.2185",
") (.identifier-environment.2151 .id1.2185)) (.find-identifier.2161 (.identifier-",
"name.2152 .id2.2186) (.identifier-environment.2151 .id2.2186))) #f)))) (core#beg",
"in (core#set! equal? ((core#lambda (.e?.2187) (core#lambda (.x.2188 .y.2189) (co",
"re#if (.%identifier?.2150 .x.2188) (.identifier=?.2154 .x.2188 .y.2189) (.e?.218",
"7 .x.2188 .y.2189)))) equal?)) (core#begin (core#begin (core#define .%make-envir",
"onment.2155 (core#lambda (.parent.2190 .prefix.2191 .binding.2192) (make-record ",
"(core#quote environment) (vector .parent.2190 .prefix.2191 .binding.2192)))) (co",
"re#begin (core#define .environment?.2156 (core#lambda (.obj.2193) (core#if (reco",
"rd? .obj.2193) (eq? (record-type .obj.2193) (core#quote environment)) #f))) (cor",
"e#begin (core#define .environment-binding.2157 (core#lambda (.obj.2194) (core#if",
" (.environment?.2156 .obj.2194) (vector-ref (record-datum .obj.2194) 2) (error \"",
"record type mismatch\" .obj.2194 (core#quote environment))))) (core#begin (core#d",
"efine .environment-prefix.2158 (core#lambda (.obj.2195) (core#if (.environment?.",
"2156 .obj.2195) (vector-ref (record-datum .obj.2195) 1) (error \"record type mism",
"atch\" .obj.2195 (core#quote environment))))) (core#define .environment-parent.21",
"59 (core#lambda (.obj.2196) (core#if (.environment?.2156 .obj.2196) (vector-ref ",
"(record-datum .obj.2196) 0) (error \"record type mismatch\" .obj.2196 (core#quote ",
"environment))))))))) (core#begin (core#define .search-scope.2160 (core#lambda (.",
"id.2197 .env.2198) ((.environment-binding.2157 .env.2198) .id.2197))) (core#begi",
"n (core#define .find-identifier.2161 (core#lambda (.id.2199 .env.2200) ((core#la",
"mbda (.it.2201) (core#if .it.2201 .it.2201 ((core#lambda (.it.2202) (core#if .it",
".2202 .it.2202 #f)) ((core#lambda (.parent.2203) (core#if .parent.2203 (.find-id",
"entifier.2161 .id.2199 .parent.2203) (core#if (symbol? .id.2199) (.add-identifie",
"r!.2162 .id.2199 .env.2200) (.find-identifier.2161 (.identifier-name.2152 .id.21",
"99) (.identifier-environment.2151 .id.2199))))) (.environment-parent.2159 .env.2",
"200))))) (.search-scope.2160 .id.2199 .env.2200)))) (core#begin (core#define .ad",
"d-identifier!.2162 ((core#lambda (.uniq.2204) (core#lambda (.id.2205 .env.2206) ",
"((core#lambda (.it.2207) (core#if .it.2207 .it.2207 ((core#lambda (.it.2208) (co",
"re#if .it.2208 .it.2208 #f)) (core#if (core#if (not (.environment-parent.2159 .e",
"nv.2206)) (symbol? .id.2205) #f) (string->symbol (string-append (.environment-pr",
"efix.2158 .env.2206) (symbol->string .id.2205))) ((core#lambda (.uid.2209) (core",
"#begin (.set-identifier!.2163 .id.2205 .uid.2209 .env.2206) .uid.2209)) (.uniq.2",
"204 .id.2205)))))) (.search-scope.2160 .id.2205 .env.2206)))) ((core#lambda (.n.",
"2210) (core#lambda (.id.2211) ((core#lambda (.m.2212) (core#begin (core#set! .n.",
"2210 (+ .n.2210 1)) (string->symbol (string-append \".\" (symbol->string ((core#la",
"mbda () (core#begin (core#define .loop.2213 (core#lambda (.id.2214) (core#if (sy",
"mbol? .id.2214) .id.2214 (.loop.2213 (.identifier-name.2152 .id.2214))))) (.loop",
".2213 .id.2211))))) \".\" (number->string .m.2212))))) .n.2210))) 0))) (core#begin",
" (core#define .set-identifier!.2163 (core#lambda (.id.2215 .uid.2216 .env.2217) ",
"((.environment-binding.2157 .env.2217) .id.2215 .uid.2216))) (core#begin (core#d",
"efine .make-environment.2164 (core#lambda (.prefix.2218) (.%make-environment.215",
"5 #f (symbol->string .prefix.2218) (make-ephemeron-table)))) (core#begin (core#d",
"efine .default-environment.2165 ((core#lambda (.env.2219) (core#begin (for-each ",
"(core#lambda (.x.2220) (.set-identifier!.2163 .x.2220 .x.2220 .env.2219)) (core#",
2017-04-04 01:54:58 -04:00
"quote (core#define core#set! core#quote core#lambda core#if core#begin core#defi",
2017-04-04 06:00:37 -04:00
"ne-macro))) .env.2219)) (.make-environment.2164 (string->symbol \"\")))) (core#beg",
"in (core#define .extend-environment.2166 (core#lambda (.parent.2221) (.%make-env",
"ironment.2155 .parent.2221 #f (make-ephemeron-table)))) (core#begin (core#define",
" .global-macro-table.2167 (make-dictionary)) (core#begin (core#define .find-macr",
"o.2168 (core#lambda (.uid.2222) (core#if (dictionary-has? .global-macro-table.21",
"67 .uid.2222) (dictionary-ref .global-macro-table.2167 .uid.2222) #f))) (core#be",
"gin (core#define .add-macro!.2169 (core#lambda (.uid.2223 .expander.2224) (dicti",
"onary-set! .global-macro-table.2167 .uid.2223 .expander.2224))) (core#begin (cor",
"e#define .shadow-macro!.2170 (core#lambda (.uid.2225) (core#if (dictionary-has? ",
".global-macro-table.2167 .uid.2225) (dictionary-delete! .global-macro-table.2167",
" .uid.2225) #undefined))) (core#begin (core#define .macro-objects.2171 (core#lam",
"bda () .global-macro-table.2167)) (core#begin (core#define .expand.2172 ((core#l",
"ambda (.task-queue.2226) (core#begin (core#define .queue.2227 (core#lambda (.tas",
"k.2240) ((core#lambda (.tmp.2241) (core#begin (.task-queue.2226 (cons (cons .tmp",
".2241 .task.2240) (.task-queue.2226))) .tmp.2241)) (cons #f #f)))) (core#begin (",
"core#define .run-all.2228 (core#lambda () (for-each (core#lambda (.x.2242) ((cor",
"e#lambda (.task.2243 .skelton.2244) ((core#lambda (.x.2245) (core#begin (set-car",
"! .skelton.2244 (car .x.2245)) (set-cdr! .skelton.2244 (cdr .x.2245)))) (.task.2",
"243))) (cdr .x.2242) (car .x.2242))) (reverse (.task-queue.2226))))) (core#begin",
" (core#define .caddr.2229 (core#lambda (.x.2246) (car (cddr .x.2246)))) (core#be",
"gin (core#define .map*.2230 (core#lambda (.proc.2247 .list*.2248) (core#if (null",
"? .list*.2248) .list*.2248 (core#if (pair? .list*.2248) (cons (.proc.2247 (car .",
"list*.2248)) (.map*.2230 .proc.2247 (cdr .list*.2248))) (.proc.2247 .list*.2248)",
")))) (core#begin (core#define .literal?.2231 (core#lambda (.x.2249) (not ((core#",
"lambda (.it.2250) (core#if .it.2250 .it.2250 ((core#lambda (.it.2251) (core#if .",
"it.2251 .it.2251 #f)) (pair? .x.2249)))) (.identifier?.2153 .x.2249))))) (core#b",
"egin (core#define .call?.2232 (core#lambda (.x.2252) (core#if (list? .x.2252) (c",
"ore#if (not (null? .x.2252)) (.identifier?.2153 (car .x.2252)) #f) #f))) (core#b",
"egin (core#define .expand-variable.2233 (core#lambda (.var.2253 .env.2254) ((cor",
"e#lambda (.x.2255) ((core#lambda (.m.2256) (core#if .m.2256 (.expand-node.2238 (",
".m.2256 .var.2253 .env.2254) .env.2254) .x.2255)) (.find-macro.2168 .x.2255))) (",
".find-identifier.2161 .var.2253 .env.2254)))) (core#begin (core#define .expand-q",
"uote.2234 (core#lambda (.obj.2257) (cons (core#quote core#quote) (cons .obj.2257",
" (core#quote ()))))) (core#begin (core#define .expand-define.2235 (core#lambda (",
".var.2258 .form.2259 .env.2260) ((core#lambda (.uid.2261) (core#begin (.shadow-m",
"acro!.2170 .uid.2261) (cons (core#quote core#define) (cons .uid.2261 (cons (.exp",
"and-node.2238 .form.2259 .env.2260) (core#quote ())))))) (.add-identifier!.2162 ",
".var.2258 .env.2260)))) (core#begin (core#define .expand-lambda.2236 (core#lambd",
"a (.args.2262 .body.2263 .env.2264) ((core#lambda (.env.2265) ((core#lambda (.ar",
"gs.2266) (with-dynamic-environment (list (cons .task-queue.2226 (core#quote ()))",
") (core#lambda () ((core#lambda (.body.2267) (core#begin (.run-all.2228) (cons (",
"core#quote core#lambda) (cons .args.2266 (cons .body.2267 (core#quote ())))))) (",
".expand-node.2238 .body.2263 .env.2265))))) (.map*.2230 (core#lambda (.var.2268)",
" (.add-identifier!.2162 .var.2268 .env.2265)) .args.2262))) (.extend-environment",
".2166 .env.2264)))) (core#begin (core#define .expand-define-macro.2237 (core#lam",
"bda (.var.2269 .transformer.2270 .env.2271) ((core#lambda (.uid.2272) ((core#lam",
"bda (.expander.2273) (core#begin (.add-macro!.2169 .uid.2272 .expander.2273) #un",
"defined)) (load (.expand.2239 .transformer.2270 .env.2271)))) (.add-identifier!.",
"2162 .var.2269 .env.2271)))) (core#begin (core#define .expand-node.2238 (core#la",
"mbda (.expr.2274 .env.2275) (core#if (.literal?.2231 .expr.2274) .expr.2274 (cor",
"e#if (.identifier?.2153 .expr.2274) (.expand-variable.2233 .expr.2274 .env.2275)",
" (core#if (.call?.2232 .expr.2274) ((core#lambda (.functor.2276) ((core#lambda (",
".key.2277) (core#if ((core#lambda (.it.2278) (core#if .it.2278 .it.2278 #f)) (eq",
"v? .key.2277 (core#quote core#quote))) (.expand-quote.2234 (cadr .expr.2274)) (c",
"ore#if ((core#lambda (.it.2279) (core#if .it.2279 .it.2279 #f)) (eqv? .key.2277 ",
"(core#quote core#define))) (.expand-define.2235 (cadr .expr.2274) (.caddr.2229 .",
"expr.2274) .env.2275) (core#if ((core#lambda (.it.2280) (core#if .it.2280 .it.22",
"80 #f)) (eqv? .key.2277 (core#quote core#lambda))) (.queue.2227 (core#lambda () ",
"(.expand-lambda.2236 (cadr .expr.2274) (.caddr.2229 .expr.2274) .env.2275))) (co",
"re#if ((core#lambda (.it.2281) (core#if .it.2281 .it.2281 #f)) (eqv? .key.2277 (",
"core#quote core#define-macro))) (.expand-define-macro.2237 (cadr .expr.2274) (.c",
"addr.2229 .expr.2274) .env.2275) (core#if #t ((core#lambda (.m.2282) (core#if .m",
".2282 (.expand-node.2238 (.m.2282 .expr.2274 .env.2275) .env.2275) (map (core#la",
"mbda (.x.2283) (.expand-node.2238 .x.2283 .env.2275)) .expr.2274))) (.find-macro",
".2168 .functor.2276)) #undefined)))))) .functor.2276)) (.find-identifier.2161 (c",
"ar .expr.2274) .env.2275)) (core#if (list? .expr.2274) (map (core#lambda (.x.228",
"4) (.expand-node.2238 .x.2284 .env.2275)) .expr.2274) (error \"invalid expression",
"\" .expr.2274))))))) (core#begin (core#define .expand.2239 (core#lambda (.expr.22",
"85 .env.2286) ((core#lambda (.x.2287) (core#begin (.run-all.2228) .x.2287)) (.ex",
"pand-node.2238 .expr.2285 .env.2286)))) .expand.2239)))))))))))))) (make-paramet",
"er (core#quote ())))) (core#begin (core#define .compile.2173 (core#lambda (.expr",
".2288 . .env.2289) (.expand.2172 .expr.2288 (core#if (null? .env.2289) .default-",
"environment.2165 (car .env.2289))))) (core#begin (core#define .eval.2174 (core#l",
"ambda (.expr.2290 . .env.2291) (load (.compile.2173 .expr.2290 (core#if (null? .",
"env.2291) .default-environment.2165 (car .env.2291)))))) (core#begin (core#defin",
"e .define-transformer.2175 (core#lambda (.name.2292 .transformer.2293) (dictiona",
"ry-set! .global-macro-table.2167 .name.2292 .transformer.2293))) (core#begin (co",
"re#define .the.2176 (core#lambda (.var.2294) (.make-identifier.2149 .var.2294 .d",
"efault-environment.2165))) (core#begin ((core#lambda (.the-core-define.2295 .the",
"-core-lambda.2296 .the-core-begin.2297 .the-core-quote.2298 .the-core-set!.2299 ",
".the-core-if.2300 .the-core-define-macro.2301 .the-define.2302 .the-lambda.2303 ",
".the-begin.2304 .the-quote.2305 .the-set!.2306 .the-if.2307 .the-define-macro.23",
"08) (core#begin (.define-transformer.2175 (core#quote quote) (core#lambda (.form",
".2313 .env.2314) (core#if (= (length .form.2313) 2) (cons .the-core-quote.2298 (",
"cons (cadr .form.2313) (core#quote ()))) (error \"malformed quote\" .form.2313))))",
" (core#begin (.define-transformer.2175 (core#quote if) (core#lambda (.form.2315 ",
".env.2316) ((core#lambda (.len.2317) (core#if (= .len.2317 3) (append .form.2315",
" (cons (core#quote #undefined) (core#quote ()))) (core#if (= .len.2317 4) (cons ",
".the-core-if.2300 (cdr .form.2315)) (error \"malformed if\" .form.2315)))) (length",
" .form.2315)))) (core#begin (.define-transformer.2175 (core#quote begin) (core#l",
"ambda (.form.2318 .env.2319) ((core#lambda (.len.2320) (core#if (= .len.2320 1) ",
"#undefined (core#if (= .len.2320 2) (cadr .form.2318) (core#if (= .len.2320 3) (",
"cons .the-core-begin.2297 (cdr .form.2318)) (cons .the-core-begin.2297 (cons (ca",
"dr .form.2318) (cons (cons .the-begin.2304 (cddr .form.2318)) (core#quote ()))))",
")))) (length .form.2318)))) (core#begin (.define-transformer.2175 (core#quote se",
"t!) (core#lambda (.form.2321 .env.2322) (core#if (core#if (= (length .form.2321)",
" 3) (.identifier?.2153 (cadr .form.2321)) #f) (cons .the-core-set!.2299 (cdr .fo",
"rm.2321)) (error \"malformed set!\" .form.2321)))) (core#begin (core#define .check",
"-formal.2309 (core#lambda (.formal.2323) ((core#lambda (.it.2324) (core#if .it.2",
"324 .it.2324 ((core#lambda (.it.2325) (core#if .it.2325 .it.2325 ((core#lambda (",
".it.2326) (core#if .it.2326 .it.2326 #f)) (core#if (pair? .formal.2323) (core#if",
" (.identifier?.2153 (car .formal.2323)) (.check-formal.2309 (cdr .formal.2323)) ",
"#f) #f)))) (.identifier?.2153 .formal.2323)))) (null? .formal.2323)))) (core#beg",
"in (.define-transformer.2175 (core#quote lambda) (core#lambda (.form.2327 .env.2",
"328) (core#if (= (length .form.2327) 1) (error \"malformed lambda\" .form.2327) (c",
"ore#if (.check-formal.2309 (cadr .form.2327)) (cons .the-core-lambda.2296 (cons ",
"(cadr .form.2327) (cons (cons .the-begin.2304 (cddr .form.2327)) (core#quote ())",
"))) (error \"malformed lambda\" .form.2327))))) (core#begin (.define-transformer.2",
"175 (core#quote define) (core#lambda (.form.2329 .env.2330) ((core#lambda (.len.",
"2331) (core#if (= .len.2331 1) (error \"malformed define\" .form.2329) ((core#lamb",
"da (.formal.2332) (core#if (.identifier?.2153 .formal.2332) (core#if (= .len.233",
"1 3) (cons .the-core-define.2295 (cdr .form.2329)) (error \"malformed define\" .fo",
"rm.2329)) (core#if (pair? .formal.2332) (cons .the-define.2302 (cons (car .forma",
"l.2332) (cons (cons .the-lambda.2303 (cons (cdr .formal.2332) (cddr .form.2329))",
") (core#quote ())))) (error \"define: binding to non-varaible object\" .form.2329)",
"))) (cadr .form.2329)))) (length .form.2329)))) (core#begin (.define-transformer",
".2175 (core#quote define-macro) (core#lambda (.form.2333 .env.2334) (core#if (= ",
"(length .form.2333) 3) (core#if (.identifier?.2153 (cadr .form.2333)) (cons .the",
"-core-define-macro.2301 (cdr .form.2333)) (error \"define-macro: binding to non-v",
"ariable object\" .form.2333)) (error \"malformed define-macro\" .form.2333)))) (cor",
"e#begin #undefined (core#begin (.define-transformer.2175 (core#quote else) (core",
"#lambda ._.2335 (error \"invalid use of auxiliary syntax\" (core#quote else)))) (c",
"ore#begin (.define-transformer.2175 (core#quote =>) (core#lambda ._.2336 (error ",
"\"invalid use of auxiliary syntax\" (core#quote =>)))) (core#begin (.define-transf",
"ormer.2175 (core#quote unquote) (core#lambda ._.2337 (error \"invalid use of auxi",
"liary syntax\" (core#quote unquote)))) (core#begin (.define-transformer.2175 (cor",
"e#quote unquote-splicing) (core#lambda ._.2338 (error \"invalid use of auxiliary ",
"syntax\" (core#quote unquote-splicing)))) (core#begin (.define-transformer.2175 (",
"core#quote let) (core#lambda (.form.2339 .env.2340) (core#if (.identifier?.2153 ",
"(cadr .form.2339)) ((core#lambda (.name.2341 .formal.2342 .body.2343) (cons (con",
"s .the-lambda.2303 (cons (core#quote ()) (cons (cons .the-define.2302 (cons (con",
"s .name.2341 (map car .formal.2342)) .body.2343)) (cons (cons .name.2341 (map ca",
"dr .formal.2342)) (core#quote ()))))) (core#quote ()))) (car (cdr .form.2339)) (",
"car (cdr (cdr .form.2339))) (cdr (cdr (cdr .form.2339)))) ((core#lambda (.formal",
".2344 .body.2345) (cons (cons .the-lambda.2303 (cons (map car .formal.2344) .bod",
"y.2345)) (map cadr .formal.2344))) (car (cdr .form.2339)) (cdr (cdr .form.2339))",
")))) (core#begin (.define-transformer.2175 (core#quote and) (core#lambda (.form.",
"2346 .env.2347) (core#if (null? (cdr .form.2346)) #t (core#if (null? (cddr .form",
".2346)) (cadr .form.2346) (cons .the-if.2307 (cons (cadr .form.2346) (cons (cons",
" (.the.2176 (core#quote and)) (cddr .form.2346)) (cons (core#quote #f) (core#quo",
"te ()))))))))) (core#begin (.define-transformer.2175 (core#quote or) (core#lambd",
"a (.form.2348 .env.2349) (core#if (null? (cdr .form.2348)) #f ((core#lambda (.tm",
"p.2350) (cons (.the.2176 (core#quote let)) (cons (cons (cons .tmp.2350 (cons (ca",
"dr .form.2348) (core#quote ()))) (core#quote ())) (cons (cons .the-if.2307 (cons",
" .tmp.2350 (cons .tmp.2350 (cons (cons (.the.2176 (core#quote or)) (cddr .form.2",
"348)) (core#quote ()))))) (core#quote ()))))) (.make-identifier.2149 (core#quote",
" it) .env.2349))))) (core#begin (.define-transformer.2175 (core#quote cond) (cor",
"e#lambda (.form.2351 .env.2352) ((core#lambda (.clauses.2353) (core#if (null? .c",
"lauses.2353) #undefined ((core#lambda (.clause.2354) (core#if (core#if (.identif",
"ier?.2153 (car .clause.2354)) (.identifier=?.2154 (.the.2176 (core#quote else)) ",
"(.make-identifier.2149 (car .clause.2354) .env.2352)) #f) (cons .the-begin.2304 ",
"(cdr .clause.2354)) (core#if (null? (cdr .clause.2354)) (cons (.the.2176 (core#q",
"uote or)) (cons (car .clause.2354) (cons (cons (.the.2176 (core#quote cond)) (cd",
"r .clauses.2353)) (core#quote ())))) (core#if (core#if (.identifier?.2153 (cadr ",
".clause.2354)) (.identifier=?.2154 (.the.2176 (core#quote =>)) (.make-identifier",
".2149 (cadr .clause.2354) .env.2352)) #f) ((core#lambda (.tmp.2355) (cons (.the.",
"2176 (core#quote let)) (cons (cons (cons .tmp.2355 (cons (car .clause.2354) (cor",
"e#quote ()))) (core#quote ())) (cons (cons .the-if.2307 (cons .tmp.2355 (cons (c",
"ons (cadr (cdr .clause.2354)) (cons .tmp.2355 (core#quote ()))) (cons (cons (.th",
"e.2176 (core#quote cond)) (cddr .form.2351)) (core#quote ()))))) (core#quote ())",
")))) (.make-identifier.2149 (core#quote tmp) .env.2352)) (cons .the-if.2307 (con",
"s (car .clause.2354) (cons (cons .the-begin.2304 (cdr .clause.2354)) (cons (cons",
" (.the.2176 (core#quote cond)) (cdr .clauses.2353)) (core#quote ()))))))))) (car",
" .clauses.2353)))) (cdr .form.2351)))) (core#begin (.define-transformer.2175 (co",
"re#quote quasiquote) (core#lambda (.form.2356 .env.2357) (core#begin (core#defin",
"e .quasiquote?.2358 (core#lambda (.form.2362) (core#if (pair? .form.2362) (core#",
"if (.identifier?.2153 (car .form.2362)) (.identifier=?.2154 (.the.2176 (core#quo",
"te quasiquote)) (.make-identifier.2149 (car .form.2362) .env.2357)) #f) #f))) (c",
"ore#begin (core#define .unquote?.2359 (core#lambda (.form.2363) (core#if (pair? ",
".form.2363) (core#if (.identifier?.2153 (car .form.2363)) (.identifier=?.2154 (.",
"the.2176 (core#quote unquote)) (.make-identifier.2149 (car .form.2363) .env.2357",
")) #f) #f))) (core#begin (core#define .unquote-splicing?.2360 (core#lambda (.for",
"m.2364) (core#if (pair? .form.2364) (core#if (pair? (car .form.2364)) (core#if (",
".identifier?.2153 (caar .form.2364)) (.identifier=?.2154 (.the.2176 (core#quote ",
"unquote-splicing)) (.make-identifier.2149 (caar .form.2364) .env.2357)) #f) #f) ",
"#f))) (core#begin (core#define .qq.2361 (core#lambda (.depth.2365 .expr.2366) (c",
"ore#if (.unquote?.2359 .expr.2366) (core#if (= .depth.2365 1) (cadr .expr.2366) ",
"(list (.the.2176 (core#quote list)) (list (.the.2176 (core#quote quote)) (.the.2",
"176 (core#quote unquote))) (.qq.2361 (- .depth.2365 1) (car (cdr .expr.2366)))))",
" (core#if (.unquote-splicing?.2360 .expr.2366) (core#if (= .depth.2365 1) (list ",
"(.the.2176 (core#quote append)) (car (cdr (car .expr.2366))) (.qq.2361 .depth.23",
"65 (cdr .expr.2366))) (list (.the.2176 (core#quote cons)) (list (.the.2176 (core",
"#quote list)) (list (.the.2176 (core#quote quote)) (.the.2176 (core#quote unquot",
"e-splicing))) (.qq.2361 (- .depth.2365 1) (car (cdr (car .expr.2366))))) (.qq.23",
"61 .depth.2365 (cdr .expr.2366)))) (core#if (.quasiquote?.2358 .expr.2366) (list",
" (.the.2176 (core#quote list)) (list (.the.2176 (core#quote quote)) (.the.2176 (",
"core#quote quasiquote))) (.qq.2361 (+ .depth.2365 1) (car (cdr .expr.2366)))) (c",
"ore#if (pair? .expr.2366) (list (.the.2176 (core#quote cons)) (.qq.2361 .depth.2",
"365 (car .expr.2366)) (.qq.2361 .depth.2365 (cdr .expr.2366))) (core#if (vector?",
" .expr.2366) (list (.the.2176 (core#quote list->vector)) (.qq.2361 .depth.2365 (",
"vector->list .expr.2366))) (list (.the.2176 (core#quote quote)) .expr.2366))))))",
")) ((core#lambda (.x.2367) (.qq.2361 1 .x.2367)) (cadr .form.2356)))))))) (core#",
"begin (.define-transformer.2175 (core#quote let*) (core#lambda (.form.2368 .env.",
"2369) ((core#lambda (.bindings.2370 .body.2371) (core#if (null? .bindings.2370) ",
"(cons (.the.2176 (core#quote let)) (cons (core#quote ()) .body.2371)) (cons (.th",
"e.2176 (core#quote let)) (cons (cons (cons (car (car .bindings.2370)) (cdr (car ",
".bindings.2370))) (core#quote ())) (cons (cons (.the.2176 (core#quote let*)) (co",
"ns (cdr .bindings.2370) .body.2371)) (core#quote ())))))) (car (cdr .form.2368))",
" (cdr (cdr .form.2368))))) (core#begin (.define-transformer.2175 (core#quote let",
"rec) (core#lambda (.form.2372 .env.2373) (cons (.the.2176 (core#quote letrec*)) ",
"(cdr .form.2372)))) (core#begin (.define-transformer.2175 (core#quote letrec*) (",
"core#lambda (.form.2374 .env.2375) ((core#lambda (.bindings.2376 .body.2377) ((c",
"ore#lambda (.variables.2378 .initials.2379) (cons (.the.2176 (core#quote let)) (",
"cons .variables.2378 (append .initials.2379 (append .body.2377 (core#quote ())))",
"))) (map (core#lambda (.v.2380) (cons .v.2380 (cons (core#quote #undefined) (cor",
"e#quote ())))) (map car .bindings.2376)) (map (core#lambda (.v.2381) (cons (.the",
".2176 (core#quote set!)) (append .v.2381 (core#quote ())))) .bindings.2376))) (c",
"ar (cdr .form.2374)) (cdr (cdr .form.2374))))) (core#begin (.define-transformer.",
"2175 (core#quote let-values) (core#lambda (.form.2382 .env.2383) (cons (.the.217",
"6 (core#quote let*-values)) (append (cdr .form.2382) (core#quote ()))))) (core#b",
"egin (.define-transformer.2175 (core#quote let*-values) (core#lambda (.form.2384",
" .env.2385) ((core#lambda (.formals.2386 .body.2387) (core#if (null? .formals.23",
"86) (cons (.the.2176 (core#quote let)) (cons (core#quote ()) (append .body.2387 ",
"(core#quote ())))) ((core#lambda (.formal.2388) (cons (.the.2176 (core#quote cal",
"l-with-values)) (cons (cons .the-lambda.2303 (cons (core#quote ()) (cdr .formal.",
"2388))) (cons (cons (.the.2176 (core#quote lambda)) (cons (car .formal.2388) (co",
"ns (cons (.the.2176 (core#quote let*-values)) (cons (cdr .formals.2386) .body.23",
"87)) (core#quote ())))) (core#quote ()))))) (car .formals.2386)))) (cadr .form.2",
"384) (cddr .form.2384)))) (core#begin (.define-transformer.2175 (core#quote defi",
"ne-values) (core#lambda (.form.2389 .env.2390) ((core#lambda (.formal.2391 .body",
".2392) ((core#lambda (.tmps.2393) (cons .the-begin.2304 (append ((core#lambda ()",
" (core#begin (core#define .loop.2394 (core#lambda (.formal.2395) (core#if (.iden",
"tifier?.2153 .formal.2395) (cons (cons .the-define.2302 (cons .formal.2395 (cons",
" (core#quote #undefined) (core#quote ())))) (core#quote ())) (core#if (pair? .fo",
"rmal.2395) (cons (cons .the-define.2302 (cons (car .formal.2395) (cons (core#quo",
"te #undefined) (core#quote ())))) (.loop.2394 (cdr .formal.2395))) (core#quote (",
")))))) (.loop.2394 .formal.2391)))) (cons (cons (.the.2176 (core#quote call-with",
"-values)) (cons (cons .the-lambda.2303 (cons (core#quote ()) .body.2392)) (cons ",
"(cons .the-lambda.2303 (cons .tmps.2393 ((core#lambda () (core#begin (core#defin",
"e .loop.2396 (core#lambda (.formal.2397 .tmps.2398) (core#if (.identifier?.2153 ",
".formal.2397) (cons (cons .the-set!.2306 (cons .formal.2397 (cons .tmps.2398 (co",
"re#quote ())))) (core#quote ())) (core#if (pair? .formal.2397) (cons (cons .the-",
"set!.2306 (cons (car .formal.2397) (cons (car .tmps.2398) (core#quote ())))) (.l",
"oop.2396 (cdr .formal.2397) (cdr .tmps.2398))) (core#quote ()))))) (.loop.2396 .",
"formal.2391 .tmps.2393)))))) (core#quote ())))) (core#quote ()))))) ((core#lambd",
"a () (core#begin (core#define .loop.2399 (core#lambda (.formal.2400) (core#if (.",
"identifier?.2153 .formal.2400) (.make-identifier.2149 .formal.2400 .env.2390) (c",
"ore#if (pair? .formal.2400) (cons (.make-identifier.2149 (car .formal.2400) .env",
".2390) (.loop.2399 (cdr .formal.2400))) (core#quote ()))))) (.loop.2399 .formal.",
"2391)))))) (cadr .form.2389) (cddr .form.2389)))) (core#begin (.define-transform",
"er.2175 (core#quote do) (core#lambda (.form.2401 .env.2402) ((core#lambda (.bind",
"ings.2403 .test.2404 .cleanup.2405 .body.2406) ((core#lambda (.loop.2407) (cons ",
"(.the.2176 (core#quote let)) (cons .loop.2407 (cons (map (core#lambda (.x.2408) ",
"(cons (car .x.2408) (cons (cadr .x.2408) (core#quote ())))) .bindings.2403) (con",
"s (cons .the-if.2307 (cons .test.2404 (cons (cons .the-begin.2304 .cleanup.2405)",
" (cons (cons .the-begin.2304 (append .body.2406 (cons (cons .loop.2407 (map (cor",
"e#lambda (.x.2409) (core#if (null? (cdr (cdr .x.2409))) (car .x.2409) (car (cdr ",
"(cdr .x.2409))))) .bindings.2403)) (core#quote ())))) (core#quote ()))))) (core#",
"quote ())))))) (.make-identifier.2149 (core#quote loop) .env.2402))) (car (cdr .",
"form.2401)) (car (car (cdr (cdr .form.2401)))) (cdr (car (cdr (cdr .form.2401)))",
") (cdr (cdr (cdr .form.2401)))))) (core#begin (.define-transformer.2175 (core#qu",
"ote when) (core#lambda (.form.2410 .env.2411) ((core#lambda (.test.2412 .body.24",
"13) (cons .the-if.2307 (cons .test.2412 (cons (cons .the-begin.2304 (append .bod",
"y.2413 (core#quote ()))) (cons (core#quote #undefined) (core#quote ())))))) (car",
" (cdr .form.2410)) (cdr (cdr .form.2410))))) (core#begin (.define-transformer.21",
"75 (core#quote unless) (core#lambda (.form.2414 .env.2415) ((core#lambda (.test.",
"2416 .body.2417) (cons .the-if.2307 (cons .test.2416 (cons (core#quote #undefine",
"d) (cons (cons .the-begin.2304 (append .body.2417 (core#quote ()))) (core#quote ",
"())))))) (car (cdr .form.2414)) (cdr (cdr .form.2414))))) (core#begin (.define-t",
"ransformer.2175 (core#quote case) (core#lambda (.form.2418 .env.2419) ((core#lam",
"bda (.key.2420 .clauses.2421) ((core#lambda (.the-key.2422) (cons (.the.2176 (co",
"re#quote let)) (cons (cons (cons .the-key.2422 (cons .key.2420 (core#quote ())))",
" (core#quote ())) (cons ((core#lambda () (core#begin (core#define .loop.2423 (co",
"re#lambda (.clauses.2424) (core#if (null? .clauses.2424) #undefined ((core#lambd",
"a (.clause.2425) (cons .the-if.2307 (cons (core#if (core#if (.identifier?.2153 (",
"car .clause.2425)) (.identifier=?.2154 (.the.2176 (core#quote else)) (.make-iden",
"tifier.2149 (car .clause.2425) .env.2419)) #f) #t (cons (.the.2176 (core#quote o",
"r)) (append (map (core#lambda (.x.2426) (cons (.the.2176 (core#quote eqv?)) (con",
"s .the-key.2422 (cons (cons .the-quote.2305 (cons .x.2426 (core#quote ()))) (cor",
"e#quote ()))))) (car .clause.2425)) (core#quote ())))) (cons (core#if (core#if (",
".identifier?.2153 (cadr .clause.2425)) (.identifier=?.2154 (.the.2176 (core#quot",
"e =>)) (.make-identifier.2149 (cadr .clause.2425) .env.2419)) #f) (cons (car (cd",
"r (cdr .clause.2425))) (cons .the-key.2422 (core#quote ()))) (cons .the-begin.23",
"04 (append (cdr .clause.2425) (core#quote ())))) (cons (.loop.2423 (cdr .clauses",
".2424)) (core#quote ())))))) (car .clauses.2424))))) (.loop.2423 .clauses.2421))",
")) (core#quote ()))))) (.make-identifier.2149 (core#quote key) .env.2419))) (car",
" (cdr .form.2418)) (cdr (cdr .form.2418))))) (core#begin (.define-transformer.21",
"75 (core#quote parameterize) (core#lambda (.form.2427 .env.2428) ((core#lambda (",
".formal.2429 .body.2430) (cons (.the.2176 (core#quote with-dynamic-environment))",
" (cons (cons (.the.2176 (core#quote list)) (append (map (core#lambda (.x.2431) (",
"cons (.the.2176 (core#quote cons)) (cons (car .x.2431) (cons (cadr .x.2431) (cor",
"e#quote ()))))) .formal.2429) (core#quote ()))) (cons (cons .the-lambda.2303 (co",
"ns (core#quote ()) (append .body.2430 (core#quote ())))) (core#quote ()))))) (ca",
"r (cdr .form.2427)) (cdr (cdr .form.2427))))) (.define-transformer.2175 (core#qu",
"ote define-record-type) (core#lambda (.form.2432 .env.2433) ((core#lambda (.type",
".2434 .ctor.2435 .pred.2436 .fields.2437) (cons .the-begin.2304 (cons (cons .the",
"-define.2302 (cons .ctor.2435 (cons (cons (.the.2176 (core#quote make-record)) (",
"cons (cons (core#quote quote) (cons .type.2434 (core#quote ()))) (cons (cons (.t",
"he.2176 (core#quote vector)) (map (core#lambda (.field.2438) (core#if (memq (car",
" .field.2438) (cdr .ctor.2435)) (car .field.2438) #undefined)) .fields.2437)) (c",
"ore#quote ())))) (core#quote ())))) (cons (cons .the-define.2302 (cons .pred.243",
"6 (cons (cons (.the.2176 (core#quote lambda)) (cons (cons (core#quote obj) (core",
"#quote ())) (cons (cons (.the.2176 (core#quote and)) (cons (cons (.the.2176 (cor",
"e#quote record?)) (cons (core#quote obj) (core#quote ()))) (cons (cons (.the.217",
"6 (core#quote eq?)) (cons (cons (.the.2176 (core#quote record-type)) (cons (core",
"#quote obj) (core#quote ()))) (cons (cons (core#quote quote) (cons .type.2434 (c",
"ore#quote ()))) (core#quote ())))) (core#quote ())))) (core#quote ())))) (core#q",
"uote ())))) ((core#lambda () (core#begin (core#define .loop.2439 (core#lambda (.",
"fields.2440 .pos.2441 .acc.2442) (core#if (null? .fields.2440) .acc.2442 ((core#",
"lambda (.field.2443) ((core#lambda (.defs.2444) (.loop.2439 (cdr .fields.2440) (",
"+ .pos.2441 1) (append .defs.2444 .acc.2442))) (cons (cons .the-define.2302 (con",
"s (cons (cadr .field.2443) (cons (core#quote obj) (core#quote ()))) (cons (cons ",
".the-if.2307 (cons (cons .pred.2436 (cons (core#quote obj) (core#quote ()))) (co",
"ns (cons (.the.2176 (core#quote vector-ref)) (cons (cons (.the.2176 (core#quote ",
"record-datum)) (cons (core#quote obj) (core#quote ()))) (cons .pos.2441 (core#qu",
"ote ())))) (cons (cons (.the.2176 (core#quote error)) (cons (core#quote \"record ",
"type mismatch\") (cons (core#quote obj) (cons (cons (core#quote quote) (cons .typ",
"e.2434 (core#quote ()))) (core#quote ()))))) (core#quote ()))))) (core#quote ())",
"))) (core#if (null? (cddr .field.2443)) (core#quote ()) (cons (cons .the-define.",
"2302 (cons (cons (car (cddr .field.2443)) (cons (core#quote obj) (cons (core#quo",
"te value) (core#quote ())))) (cons (cons .the-if.2307 (cons (cons .pred.2436 (co",
"ns (core#quote obj) (core#quote ()))) (cons (cons (.the.2176 (core#quote vector-",
"set!)) (cons (cons (.the.2176 (core#quote record-datum)) (cons (core#quote obj) ",
"(core#quote ()))) (cons .pos.2441 (cons (core#quote value) (core#quote ()))))) (",
"cons (cons (.the.2176 (core#quote error)) (cons (core#quote \"record type mismatc",
"h\") (cons (core#quote obj) (cons (cons (core#quote quote) (cons .type.2434 (core",
"#quote ()))) (core#quote ()))))) (core#quote ()))))) (core#quote ())))) (core#qu",
"ote ())))))) (car .fields.2440))))) (.loop.2439 .fields.2437 0 (core#quote ())))",
")))))) (car (cdr .form.2432)) (car (cdr (cdr .form.2432))) (car (cdr (cdr (cdr .",
"form.2432)))) (cdr (cdr (cdr (cdr .form.2432))))))))))))))))))))))))))))))))))))",
") (.the.2176 (core#quote core#define)) (.the.2176 (core#quote core#lambda)) (.th",
"e.2176 (core#quote core#begin)) (.the.2176 (core#quote core#quote)) (.the.2176 (",
"core#quote core#set!)) (.the.2176 (core#quote core#if)) (.the.2176 (core#quote c",
"ore#define-macro)) (.the.2176 (core#quote define)) (.the.2176 (core#quote lambda",
")) (.the.2176 (core#quote begin)) (.the.2176 (core#quote quote)) (.the.2176 (cor",
"e#quote set!)) (.the.2176 (core#quote if)) (.the.2176 (core#quote define-macro))",
") (values .make-identifier.2149 .identifier?.2153 .identifier=?.2154 .identifier",
"-name.2152 .identifier-environment.2151 .make-environment.2164 .default-environm",
"ent.2165 .environment?.2156 .find-identifier.2161 .add-identifier!.2162 .set-ide",
"ntifier!.2163 .macro-objects.2171 .compile.2173 .eval.2174))))))))))))))))))))))",
"))))) (core#lambda (.make-identifier.2445 .identifier?.2446 .identifier=?.2447 .",
"identifier-name.2448 .identifier-environment.2449 .make-environment.2450 .defaul",
"t-environment.2451 .environment?.2452 .find-identifier.2453 .add-identifier!.245",
"4 .set-identifier!.2455 .macro-objects.2456 .compile.2457 .eval.2458) (core#begi",
"n (core#set! make-identifier .make-identifier.2445) (core#begin (core#set! ident",
"ifier? .identifier?.2446) (core#begin (core#set! identifier=? .identifier=?.2447",
") (core#begin (core#set! identifier-name .identifier-name.2448) (core#begin (cor",
"e#set! identifier-environment .identifier-environment.2449) (core#begin (core#se",
"t! make-environment .make-environment.2450) (core#begin (core#set! default-envir",
"onment .default-environment.2451) (core#begin (core#set! environment? .environme",
"nt?.2452) (core#begin (core#set! find-identifier .find-identifier.2453) (core#be",
"gin (core#set! add-identifier! .add-identifier!.2454) (core#begin (core#set! set",
"-identifier! .set-identifier!.2455) (core#begin (core#set! macro-objects .macro-",
"objects.2456) (core#begin (core#set! compile .compile.2457) (core#set! eval .eva",
"l.2458))))))))))))))))))))))))))))))",
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-04 01:54:58 -04:00
" ((core#lambda () (core#begin (core#define .mangle.2459 (core#lambda (.name.2468",
") (core#begin (core#if (null? .name.2468) (error \"library name should be a list ",
"of at least one symbols\" .name.2468) #undefined) (core#begin (core#define .->str",
"ing.2469 (core#lambda (.n.2471) (core#if (symbol? .n.2471) ((core#lambda (.str.2",
"472) (core#begin (string-for-each (core#lambda (.c.2473) (core#if ((core#lambda ",
"(.it.2474) (core#if .it.2474 .it.2474 ((core#lambda (.it.2475) (core#if .it.2475",
" .it.2475 #f)) (char=? .c.2473 #\\:)))) (char=? .c.2473 #\\.)) (error \"elements of",
" library name may not contain '.' or ':'\" .n.2471) #undefined)) .str.2472) .str.",
"2472)) (symbol->string .n.2471)) (core#if (core#if (number? .n.2471) (core#if (e",
"xact? .n.2471) (<= 0 .n.2471) #f) #f) (number->string .n.2471) (error \"symbol or",
" non-negative integer is required\" .n.2471))))) (core#begin (core#define .join.2",
"470 (core#lambda (.strs.2476 .delim.2477) ((core#lambda () (core#begin (core#def",
"ine .loop.2478 (core#lambda (.res.2479 .strs.2480) (core#if (null? .strs.2480) .",
"res.2479 (.loop.2478 (string-append .res.2479 .delim.2477 (car .strs.2480)) (cdr",
" .strs.2480))))) (.loop.2478 (car .strs.2476) (cdr .strs.2476))))))) (core#if (s",
"ymbol? .name.2468) .name.2468 (string->symbol (.join.2470 (map .->string.2469 .n",
"ame.2468) \".\")))))))) (core#begin (core#define .current-library.2460 (make-param",
"eter (core#quote (picrin user)) .mangle.2459)) (core#begin (core#define .*librar",
"ies*.2461 (make-dictionary)) (core#begin (core#define .find-library.2462 (core#l",
"ambda (.name.2481) (dictionary-has? .*libraries*.2461 (.mangle.2459 .name.2481))",
")) (core#begin (core#define .make-library.2463 (core#lambda (.name.2482) ((core#",
"lambda (.name.2483) ((core#lambda (.env.2484 .exports.2485) (core#begin (set-ide",
"ntifier! (core#quote define-library) (core#quote define-library) .env.2484) (cor",
"e#begin (set-identifier! (core#quote import) (core#quote import) .env.2484) (cor",
"e#begin (set-identifier! (core#quote export) (core#quote export) .env.2484) (cor",
2017-04-03 14:55:23 -04:00
"e#begin (set-identifier! (core#quote cond-expand) (core#quote cond-expand) .env.",
2017-04-04 01:54:58 -04:00
"2484) (dictionary-set! .*libraries*.2461 .name.2483 (cons .env.2484 .exports.248",
"5))))))) (make-environment (string->symbol (string-append (symbol->string .name.",
"2483) \":\"))) (make-dictionary))) (.mangle.2459 .name.2482)))) (core#begin (core#",
"define .library-environment.2464 (core#lambda (.name.2486) (car (dictionary-ref ",
".*libraries*.2461 (.mangle.2459 .name.2486))))) (core#begin (core#define .librar",
"y-exports.2465 (core#lambda (.name.2487) (cdr (dictionary-ref .*libraries*.2461 ",
"(.mangle.2459 .name.2487))))) (core#begin (core#define .library-import.2466 (cor",
"e#lambda (.name.2488 .sym.2489 .alias.2490) ((core#lambda (.uid.2491) ((core#lam",
"bda (.env.2492) (set-identifier! .alias.2490 .uid.2491 .env.2492)) (.library-env",
"ironment.2464 (.current-library.2460)))) (dictionary-ref (.library-exports.2465 ",
".name.2488) .sym.2489)))) (core#begin (core#define .library-export.2467 (core#la",
"mbda (.sym.2493 .alias.2494) ((core#lambda (.env.2495 .exports.2496) (dictionary",
"-set! .exports.2496 .alias.2494 (find-identifier .sym.2493 .env.2495))) (.librar",
"y-environment.2464 (.current-library.2460)) (.library-exports.2465 (.current-lib",
"rary.2460))))) (core#begin ((core#lambda (.define-transformer.2497) (core#begin ",
"(.define-transformer.2497 (core#quote define-library) (core#lambda (.form.2498 .",
"_.2499) ((core#lambda (.name.2500 .body.2501) (core#begin ((core#lambda (.it.250",
"2) (core#if .it.2502 .it.2502 ((core#lambda (.it.2503) (core#if .it.2503 .it.250",
"3 #f)) (.make-library.2463 .name.2500)))) (.find-library.2462 .name.2500)) (with",
"-dynamic-environment (list (cons .current-library.2460 .name.2500)) (core#lambda",
" () (for-each (core#lambda (.expr.2504) (eval .expr.2504 .name.2500)) .body.2501",
"))))) (cadr .form.2498) (cddr .form.2498)))) (core#begin (.define-transformer.24",
"97 (core#quote cond-expand) (core#lambda (.form.2505 ._.2506) ((core#lambda (.te",
"st.2507) (core#begin (core#set! .test.2507 (core#lambda (.form.2508) ((core#lamb",
"da (.it.2509) (core#if .it.2509 .it.2509 ((core#lambda (.it.2510) (core#if .it.2",
"510 .it.2510 ((core#lambda (.it.2511) (core#if .it.2511 .it.2511 #f)) (core#if (",
"pair? .form.2508) ((core#lambda (.key.2512) (core#if ((core#lambda (.it.2513) (c",
"ore#if .it.2513 .it.2513 #f)) (eqv? .key.2512 (core#quote library))) (.find-libr",
"ary.2462 (cadr .form.2508)) (core#if ((core#lambda (.it.2514) (core#if .it.2514 ",
".it.2514 #f)) (eqv? .key.2512 (core#quote not))) (not (.test.2507 (cadr .form.25",
"08))) (core#if ((core#lambda (.it.2515) (core#if .it.2515 .it.2515 #f)) (eqv? .k",
"ey.2512 (core#quote and))) ((core#lambda () (core#begin (core#define .loop.2516 ",
"(core#lambda (.form.2517) ((core#lambda (.it.2518) (core#if .it.2518 .it.2518 ((",
"core#lambda (.it.2519) (core#if .it.2519 .it.2519 #f)) (core#if (.test.2507 (car",
" .form.2517)) (.loop.2516 (cdr .form.2517)) #f)))) (null? .form.2517)))) (.loop.",
"2516 (cdr .form.2508))))) (core#if ((core#lambda (.it.2520) (core#if .it.2520 .i",
"t.2520 #f)) (eqv? .key.2512 (core#quote or))) ((core#lambda () (core#begin (core",
"#define .loop.2521 (core#lambda (.form.2522) (core#if (pair? .form.2522) ((core#",
"lambda (.it.2523) (core#if .it.2523 .it.2523 ((core#lambda (.it.2524) (core#if .",
"it.2524 .it.2524 #f)) (.loop.2521 (cdr .form.2522))))) (.test.2507 (car .form.25",
"22))) #f))) (.loop.2521 (cdr .form.2508))))) (core#if #t #f #undefined)))))) (ca",
"r .form.2508)) #f)))) (core#if (symbol? .form.2508) (memq .form.2508 (features))",
" #f)))) (eq? .form.2508 (core#quote else))))) ((core#lambda () (core#begin (core",
"#define .loop.2525 (core#lambda (.clauses.2526) (core#if (null? .clauses.2526) #",
"undefined (core#if (.test.2507 (caar .clauses.2526)) (cons (make-identifier (cor",
"e#quote begin) default-environment) (append (cdar .clauses.2526) (core#quote ())",
")) (.loop.2525 (cdr .clauses.2526)))))) (.loop.2525 (cdr .form.2505))))))) #unde",
"fined))) (core#begin (.define-transformer.2497 (core#quote import) (core#lambda ",
"(.form.2527 ._.2528) ((core#lambda (.caddr.2529 .prefix.2530 .getlib.2531) ((cor",
"e#lambda (.extract.2532 .collect.2533) (core#begin (core#set! .extract.2532 (cor",
"e#lambda (.spec.2534) ((core#lambda (.key.2535) (core#if ((core#lambda (.it.2536",
") (core#if .it.2536 .it.2536 ((core#lambda (.it.2537) (core#if .it.2537 .it.2537",
" ((core#lambda (.it.2538) (core#if .it.2538 .it.2538 ((core#lambda (.it.2539) (c",
"ore#if .it.2539 .it.2539 #f)) (eqv? .key.2535 (core#quote except))))) (eqv? .key",
".2535 (core#quote prefix))))) (eqv? .key.2535 (core#quote rename))))) (eqv? .key",
".2535 (core#quote only))) (.extract.2532 (cadr .spec.2534)) (core#if #t (.getlib",
".2531 .spec.2534) #undefined))) (car .spec.2534)))) (core#begin (core#set! .coll",
"ect.2533 (core#lambda (.spec.2540) ((core#lambda (.key.2541) (core#if ((core#lam",
"bda (.it.2542) (core#if .it.2542 .it.2542 #f)) (eqv? .key.2541 (core#quote only)",
")) ((core#lambda (.alist.2543) (map (core#lambda (.var.2544) (assq .var.2544 .al",
"ist.2543)) (cddr .spec.2540))) (.collect.2533 (cadr .spec.2540))) (core#if ((cor",
"e#lambda (.it.2545) (core#if .it.2545 .it.2545 #f)) (eqv? .key.2541 (core#quote ",
"rename))) ((core#lambda (.alist.2546 .renames.2547) (map (core#lambda (.s.2548) ",
"((core#lambda (.it.2549) (core#if .it.2549 .it.2549 ((core#lambda (.it.2550) (co",
"re#if .it.2550 .it.2550 #f)) .s.2548))) (assq (car .s.2548) .renames.2547))) .al",
"ist.2546)) (.collect.2533 (cadr .spec.2540)) (map (core#lambda (.x.2551) (cons (",
"car .x.2551) (cadr .x.2551))) (cddr .spec.2540))) (core#if ((core#lambda (.it.25",
"52) (core#if .it.2552 .it.2552 #f)) (eqv? .key.2541 (core#quote prefix))) ((core",
"#lambda (.alist.2553) (map (core#lambda (.s.2554) (cons (.prefix.2530 (.caddr.25",
"29 .spec.2540) (car .s.2554)) (cdr .s.2554))) .alist.2553)) (.collect.2533 (cadr",
" .spec.2540))) (core#if ((core#lambda (.it.2555) (core#if .it.2555 .it.2555 #f))",
" (eqv? .key.2541 (core#quote except))) ((core#lambda (.alist.2556) ((core#lambda",
" () (core#begin (core#define .loop.2557 (core#lambda (.alist.2558) (core#if (nul",
"l? .alist.2558) (core#quote ()) (core#if (memq (caar .alist.2558) (cddr .spec.25",
"40)) (.loop.2557 (cdr .alist.2558)) (cons (car .alist.2558) (.loop.2557 (cdr .al",
"ist.2558))))))) (.loop.2557 .alist.2556))))) (.collect.2533 (cadr .spec.2540))) ",
"(core#if #t (dictionary-map (core#lambda (.x.2559) (cons .x.2559 .x.2559)) (.lib",
"rary-exports.2465 (.getlib.2531 .spec.2540))) #undefined)))))) (car .spec.2540))",
")) ((core#lambda (.import.2560) (core#begin (core#set! .import.2560 (core#lambda",
" (.spec.2561) ((core#lambda (.lib.2562 .alist.2563) (for-each (core#lambda (.slo",
"t.2564) (.library-import.2466 .lib.2562 (cdr .slot.2564) (car .slot.2564))) .ali",
"st.2563)) (.extract.2532 .spec.2561) (.collect.2533 .spec.2561)))) (for-each .im",
"port.2560 (cdr .form.2527)))) #undefined)))) #undefined #undefined)) (core#lambd",
"a (.x.2565) (car (cdr (cdr .x.2565)))) (core#lambda (.prefix.2566 .symbol.2567) ",
"(string->symbol (string-append (symbol->string .prefix.2566) (symbol->string .sy",
"mbol.2567)))) (core#lambda (.name.2568) (core#if (.find-library.2462 .name.2568)",
" .name.2568 (error \"library not found\" .name.2568)))))) (.define-transformer.249",
"7 (core#quote export) (core#lambda (.form.2569 ._.2570) ((core#lambda (.collect.",
"2571 .export.2572) (core#begin (core#set! .collect.2571 (core#lambda (.spec.2573",
") (core#if (symbol? .spec.2573) (cons .spec.2573 .spec.2573) (core#if (core#if (",
"list? .spec.2573) (core#if (= (length .spec.2573) 3) (eq? (car .spec.2573) (core",
"#quote rename)) #f) #f) (cons (list-ref .spec.2573 1) (list-ref .spec.2573 2)) (",
"error \"malformed export\"))))) (core#begin (core#set! .export.2572 (core#lambda (",
".spec.2574) ((core#lambda (.slot.2575) (.library-export.2467 (car .slot.2575) (c",
"dr .slot.2575))) (.collect.2571 .spec.2574)))) (for-each .export.2572 (cdr .form",
".2569))))) #undefined #undefined))))))) (core#lambda (.name.2576 .macro.2577) (d",
"ictionary-set! (macro-objects) .name.2576 .macro.2577))) (core#begin ((core#lamb",
"da () (core#begin (.make-library.2463 (core#quote (picrin base))) (core#begin (s",
"et-car! (dictionary-ref .*libraries*.2461 (.mangle.2459 (core#quote (picrin base",
")))) default-environment) (core#begin ((core#lambda (.exports.2578) ((core#lambd",
"a (.export-keyword.2579) ((core#lambda () (core#begin (for-each .export-keyword.",
"2579 (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",
"re#begin (.export-keyword.2579 (core#quote boolean?)) (dictionary-for-each .expo",
"rt-keyword.2579 (global-objects))))))) (core#lambda (.keyword.2580) (dictionary-",
"set! .exports.2578 .keyword.2580 .keyword.2580)))) (.library-exports.2465 (core#",
"quote (picrin base)))) (core#begin (core#set! eval ((core#lambda (.e.2581) (core",
"#lambda (.expr.2582 . .lib.2583) ((core#lambda (.lib.2584) (with-dynamic-environ",
"ment (list (cons .current-library.2460 .lib.2584)) (core#lambda () (.e.2581 .exp",
"r.2582 (.library-environment.2464 .lib.2584))))) (core#if (null? .lib.2583) (.cu",
"rrent-library.2460) (car .lib.2583))))) eval)) (.make-library.2463 (core#quote (",
"picrin user))))))))) (values .current-library.2460 .find-library.2462 .make-libr",
"ary.2463 .library-environment.2464 .library-exports.2465 .library-import.2466 .l",
"ibrary-export.2467))))))))))))))) (core#lambda (.current-library.2585 .find-libr",
"ary.2586 .make-library.2587 .library-environment.2588 .library-exports.2589 .lib",
"rary-import.2590 .library-export.2591) (core#begin (core#set! current-library .c",
"urrent-library.2585) (core#begin (core#set! find-library .find-library.2586) (co",
"re#begin (core#set! make-library .make-library.2587) (core#begin (core#set! libr",
"ary-environment .library-environment.2588) (core#begin (core#set! library-export",
"s .library-exports.2589) (core#begin (core#set! library-import .library-import.2",
"590) (core#set! library-export .library-export.2591))))))))))))))))",
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
}