Portal saves the full machine state — env chain, compiled procedures, continuations, frame stack — to a JSON file. Another interpreter instance loads it and resumes execution from the exact instruction. Demo: start a primality test on machine A, checkpoint mid-computation, resume on machine B. 1000000007 prime check: machine B picks up from i=30000 and finishes in 6% of the original time. Implementation: - PortalSerializer: graph-aware with identity tracking for shared env references. Handles cycles (closures referencing their own env). - portal-checkpoint!: triggers mid-execution save from within VM loop. Hooks into TAIL_CALL (loop back-edge) for compiled code. - --portal-resume CLI flag: load .portal file and resume continuation. - portal-save / portal-resume Scheme builtins. 571 tests green (7 new portal tests: unit + integration + functional). |
||
|---|---|---|
| .. | ||
| fibonacci.lsp | ||
| generator.lsp | ||
| mergesort.lsp | ||
| objects.lsp | ||
| portal-prime.lsp | ||