Commit Graph

  • c3315f04e5 Working basic guard that falls back to interp on fail master Nathan Braswell 2024-02-07 23:21:29 -05:00
  • ff95c5d9e7 implemented Lookup (also fix passing wrong function to one of the stack functions or something) Nathan Braswell 2024-02-07 02:03:57 -05:00
  • 23fbfe9db3 add JIT support for Define, Drop, and Const Nathan Braswell 2024-02-06 02:13:19 -05:00
  • 525b103f38 swap ret_stack to a repr(C) struct for manipulation from JIT Nathan Braswell 2024-02-05 01:41:55 -05:00
  • fd843bc807 Swap ID to NonZeroI64 so Option<ID> is a single word and we can test for 0 in JIT for if we have an ID (for looking at ret_stack) Nathan Braswell 2024-02-05 01:34:53 -05:00
  • a4500fed36 Implement (but have not tested) all primitive functions in JIT) Nathan Braswell 2024-02-05 01:26:57 -05:00
  • 99d4fa5021 first jitted instruction! Nathan Braswell 2024-02-04 21:45:42 -05:00
  • 776fc7c921 integrated JIT compiler with simple generated do-nothing JIT traces. Modified JIT trace interface so that it can return a trace-id and offset to jump to, allowing the trace interpreter to handle hard cases, etc. (or in this case, all cases, as it just immediatly returns the current id and offset 0). Nathan Braswell 2024-02-02 01:46:13 -05:00
  • 9cd46a31eb had trouble getting going again today. Did create a compiled_traces map and integrated using it into execute_trace, with ideas for what the api there should be. Nathan Braswell 2024-02-01 02:09:04 -05:00
  • 0ce6d90aa9 minor cleanup to wrap JIT stuff in a struct with a compile function and move to lib, in anticipation of actually JIT compiling. Not a ton of work today, was pretty tired / didn't get going. Nathan Braswell 2024-01-31 01:21:57 -05:00
  • facd9a34b9 Cranelift JIT experiments, with multiple functions, tail calls, non-tail-calls, calling host functions, etc Nathan Braswell 2024-01-30 02:36:06 -05:00
  • 8e06037b4a Finished porting everything over to new packed, JIT-friendly Form, with all the tracing! Nathan Braswell 2024-01-29 02:22:56 -05:00
  • 069c9775e1 Ported interpreter (without trace execution) to use new packed, JIT-friendly Form, with all needed additions Nathan Braswell 2024-01-29 02:03:59 -05:00
  • 0696ad5594 Finished-ish writing the new JIT-friendly, packed Form, this time with extra repr(C) Vec implementation Nathan Braswell 2024-01-28 21:51:01 -05:00
  • a16e126aa1 Started writing our new Form designed to be used from JIT with repr(C) and packed into a single word, and our own repr(C) Rc implementation to go with it. Nathan Braswell 2024-01-28 02:46:08 -05:00
  • 56cd4f7088 cleanup, fix closure scope error Nathan Braswell 2024-01-27 17:41:53 -05:00
  • 3002bd9237 Working ExtendedBasicBlock tracing/lazy-construction! Not all constructs traceable, and no inlining, but it works! Nathan Braswell 2024-01-07 00:15:44 -05:00
  • 1e59c8ed94 Small one today, getting started was hard but glad I got a tiny bit done to continue the streak. Modifed follow-on data to be stored on Ctx itself and only pass an ID around so it can be on the return stack multiple times without wasting a lot of space. Nathan Braswell 2024-01-04 01:15:42 -05:00
  • c15e857171 First barely-working trace replay! Need to clean up, finish implementing, have trace-reply restore traces, jump directly to other traces, eventually inline and concat traces, etc etc Nathan Braswell 2024-01-03 01:55:40 -05:00
  • 71a2272f34 mostly correct looking traces. given up on actual constant prop during tracing, only constant tracking. Will need later pass to optimize. Also, want to shift the post-call trace to after the innermost return instead of tracking with the return stack. Nathan Braswell 2024-01-02 01:35:55 -05:00
  • 2d5315f880 tracing/cont rework main Nathan Braswell 2023-12-29 23:37:04 -05:00
  • 88e3fa9d39 Move dynamic stuff out of Cont and into two stacks so that Cont is good for resuming traces (having them depend only on code). Remove currently unneeded IDs from Symbol and Pair. Added an InlinePrim Op to tracing, and a nc: Cont to Call. IDs are probs only for trace points now (function starts and side-exits). Nathan Braswell 2023-12-26 01:03:56 -05:00
  • b40c928026 Reorganize naming scheme Nathan Braswell 2023-12-10 12:50:44 -05:00
  • 3f3ea56375 Start working on calls Nathan Braswell 2023-12-10 00:56:02 -05:00
  • 63a5b019ed Website typing improvements, uncommitted JIT work Nathan Braswell 2023-12-09 19:03:22 -05:00
  • 56c6b3f5f7 Messing around with fancy splash page Nathan Braswell 2023-12-09 01:23:30 -05:00
  • 82c38a32cf Basic tracing structure sketched with stubs in cases - need to add constant tracking and implement stubs. Still need some thought on tracing a closure vs tracing the code that created the closure Nathan Braswell 2023-12-01 21:36:37 -05:00
  • 2787b95837 Rewrite into non-recursive defunctionalized-continuations style Nathan Braswell 2023-11-25 11:35:36 -05:00
  • 656cfe95ae Initial ID & func call stats! Nathan Braswell 2023-11-24 20:35:57 -05:00
  • 75d025bcb2 Div and mod, why not Nathan Braswell 2023-11-19 21:56:42 -05:00
  • 41aa05dc97 setup a simple lisp Nathan Braswell 2023-11-19 21:53:51 -05:00
  • 774eb668de Clean out, start sl JIT project (no jit yet) Nathan Braswell 2023-11-19 16:33:19 -05:00
  • c1a0608b7c threading trace throughout Nathan Braswell 2023-07-13 23:38:42 -04:00
  • 15cab8799d swap to single struct wrapper scaffolding Nathan Braswell 2023-07-13 22:52:49 -04:00
  • 6edbe7d2c8 Continue moving stuff around to simplify before opt, and then start sketching out wrapped values and trace - just realized we might need all values to be wrapped tohande side effects that don't depend on input but still have effects (mutation, now ugh and assert) Nathan Braswell 2023-07-09 00:24:50 -04:00
  • b077daf12e Split eval.rs out of ast.rs, and rename ast.rs to basic.rs. Copy it over to opt.rs, and hook up a From<> impl and a congruent(x)->bool function, and add to main.rs and test.rs. Now we actually have to make opt.rs optimize... Nathan Braswell 2023-07-06 01:11:56 -04:00
  • f4ae4db92d Move call inside form to allow for tracing (might still need a way to get out of the end of tracing) Nathan Braswell 2023-07-04 12:23:31 -04:00
  • b03122c7b8 Move entire Form out of eval into Trait Nathan Braswell 2023-07-04 10:16:38 -04:00
  • d6cf6a6b64 Dependency update Nathan Braswell 2023-07-02 18:09:34 -04:00
  • 3b858eda98 Move primitives to enum - defunctionalized Nathan Braswell 2023-06-06 01:10:01 -04:00
  • 8b9a0a0f2d Start sketching bytecode generation Nathan Braswell 2023-05-25 02:07:01 -04:00
  • ce5ab1dd99 Implemented shift/reset delimited continuations using a defunctionalized double-CPS transformation! Basic tests work at least, there certinally could be bugs Nathan Braswell 2023-05-22 01:23:17 -04:00
  • 4126e25463 everything uses continuations now, skeleton for shift/reset Nathan Braswell 2023-05-21 04:14:29 -04:00
  • d44480bf6c contemplate parameter eval cont Nathan Braswell 2023-05-16 23:48:26 -04:00
  • 093f3c0453 Basic continuation-ification of primitives, finally work out the Cursor/Cont devide. Still need to figure out which Cont's we need for evaluation (possibly a subset of) parameters Nathan Braswell 2023-05-16 23:31:58 -04:00
  • f82101e63f Start moving eval to explicit continuation based Nathan Braswell 2023-05-16 01:15:09 -04:00
  • ea1516fbd1 Started new kv impl with support for mutable cells, just the basic interpreter. Going to add the lazy bytecode interperter next Nathan Braswell 2023-05-14 23:50:27 -04:00
  • 82bfb5bc7b small syntax expl in How it works Nathan Braswell 2023-04-26 00:39:08 -04:00
  • 7431dbe4b7 Add examples Nathan Braswell 2023-04-26 00:33:08 -04:00
  • b2216f7574 Implemented many of Chris and Sharjeel's suggestions - still need to insert a worked example, and if I have time, benchmarks re-run with numbers and memory usage Nathan Braswell 2023-04-25 21:58:25 -04:00
  • 9ec99a94eb presentation updates Nathan Braswell 2023-04-24 10:48:24 -04:00
  • c994f1b1af forgot the images Nathan Braswell 2023-04-23 17:25:45 -04:00
  • febe356575 new slides Nathan Braswell 2023-04-23 13:02:01 -04:00
  • 0df6ce49fe spell checks, adjenda Nathan Braswell 2023-04-18 13:02:13 -04:00
  • 87763fad40 Tons of slide work, unfortunately depend on external MathJax - need to pull that down later Nathan Braswell 2023-04-18 01:47:10 -04:00
  • 5054441625 More work including brain dumping more slides and bugfixes for memo - have found current problem, which is that a non-env se can prevent a DeriComb from pulling in valeus from a real Env frame which it's being returned from - even though this is caught, the resulting call still depends on it, marks it as such, and then it depends on a call that was real and now no longer exists. Nathan Braswell 2023-04-16 00:02:29 -04:00
  • 3dcebe5297 Bunch of new slides with examples comparing Fexprs to Lisp's macros and special forms Nathan Braswell 2023-04-15 15:41:11 -04:00
  • f55dd236b6 Fix one bug, or part of one - dericomb wasn't advancing if se wasn't a legal env, but was still unioning the body IDs into it's ids which could convince it that it should be able to progress Nathan Braswell 2023-04-15 00:52:52 -04:00
  • f4b99067d4 More working memo that tracks used env-ids and env, fixed bugs with it too. Currently trying to track down some infinate loops caused by something that thinks it should make progress and doesn't, have an assert that notices doubles Nathan Braswell 2023-04-15 00:19:51 -04:00
  • a990809e21 Some slide work Nathan Braswell 2023-04-11 23:17:55 -04:00
  • f567172099 share background color Nathan Braswell 2023-04-08 14:23:56 -04:00
  • ee4add2fee Gah my comment messed up the CSS again Nathan Braswell 2023-04-08 14:16:59 -04:00
  • ab700c12b1 and the RemarkJS license Nathan Braswell 2023-04-08 14:07:41 -04:00
  • cad202551b Forgot we moved out to the standalone js Nathan Braswell 2023-04-08 14:06:07 -04:00
  • 4e7825cb2b Hack in copying code between the two editors and fix recursive.css's body style overridding the slides Nathan Braswell 2023-04-08 14:05:48 -04:00
  • 6ef3392aa0 prototype remarkjs slides with Kraken formatting and auto-execute code in browser on slide change! Some rough edges, including two different editors between the first slide and the reveal slide Nathan Braswell 2023-04-08 13:38:21 -04:00
  • b89b831983 Website with changes made with/based on my graphic designer Mom's suggestions (thanks Mom!) Nathan Braswell 2023-04-05 21:10:04 -04:00
  • a06c5854c8 The big exponential thing was ironically Hash which was being called for memo which existed to prevent exponential behavior. Reimplmenented the caching hash, and much much faster. Still some failing tests, and bvau might be looping Nathan Braswell 2023-04-04 23:40:09 -04:00
  • 8ccdfd8ab2 new invariant: when returned, each form is as evaluated as it can be. This means that union_into_tail is more rare, and only for recursion (if or deri) stopped items. If now also captures its environment if it's rec_stopped. Added memoization for legal env forms to try to deal with it, has helped some, still exponential behavior. Nathan Braswell 2023-04-02 12:48:02 -04:00
  • 3c5bb127e2 Work on saving env on calls and suspended symbols, only use as env if legal. Seemingly causing exponential behavior, need to have it done incrementally... todo Nathan Braswell 2023-03-29 01:58:07 -04:00
  • 8fa7acbdf1 Actually using the evaled param lookups with cons pairs etc - Tests failing - need to figure out how to really handle the *weird* case, and also the failing tests if the *wierd* case isn't the cause. Not sure if we need to track to prevent the dropping of the *not* redundant veval, or if the suspended symbol should hold onto the half-done env, or what Nathan Braswell 2023-03-27 01:27:25 -04:00
  • 664b336a48 trac suspended param eval, with proper back conversion Nathan Braswell 2023-03-27 00:28:44 -04:00
  • 70ac3e3633 Add theming and a 'slick' theme based on Inter and JetBrains Mono Nathan Braswell 2023-03-25 16:59:24 -04:00
  • 049624a840 Baby steps towards handling non-val car/cdr (eventually cons) Nathan Braswell 2023-03-22 01:06:24 -04:00
  • 85454fda79 unneeded anchors Nathan Braswell 2023-03-22 00:27:22 -04:00
  • 30c4d4b28c some website edits Nathan Braswell 2023-03-22 00:24:38 -04:00
  • 92bcb6f358 All tests passing when run with --release. Not sure if this is really correct, or if the algorithm is being too wasteful and re-executing versions of functions taht should have been inlined or something (this may esp be true without the parameter/wrap_level stuff, and also I'm a little sus of the env chains - oh hay, it might even just be becasue only legal env chains are allowed which prevents pe-ing) partially_broken Nathan Braswell 2023-03-20 01:06:24 -04:00
  • 48de9517c9 An unvaled Pair should have a True override for its IDs Nathan Braswell 2023-03-19 11:15:22 -04:00
  • 9162b456d2 Oh some were just changes in formatting. First real issue looks like it's VMAP Nathan Braswell 2023-03-19 02:03:41 -04:00
  • 1df3acccd7 Some tests passing again, namely all of basic and fact Nathan Braswell 2023-03-19 01:52:18 -04:00
  • 7b334e96df Finally finished sketching out the new version, lets get on the compile errors Nathan Braswell 2023-03-19 00:59:46 -04:00
  • 04bf1c6249 Website reformat - content still TBD Nathan Braswell 2023-03-18 14:57:31 -04:00
  • d4920ec4b6 Notes for hopefully the full simple kraken PE, with initial implementation of new NeededIds (split between head and tails (heads are ids for which progress will be made, tails might not progress but are contained), body_under and if_under). Nathan Braswell 2023-03-15 01:16:37 -04:00
  • 865fc1b4b6 Update flake, split ast out into ast & pe_ast, and main into main & test Nathan Braswell 2023-03-14 20:14:17 -04:00
  • 46e6e27f88 pre change Nathan Braswell 2023-03-14 20:05:39 -04:00
  • d836a66e66 more numbers of evals/calls Nathan Braswell 2023-03-01 00:33:43 -05:00
  • 3df2d02286 Merge branch 'master' into partially_broken Nathan Braswell 2023-02-28 01:15:48 -05:00
  • 3d6082503c track evals, dyn 0 calls, dyn 1 calls Nathan Braswell 2023-02-28 01:15:36 -05:00
  • af2fb537c7 saving remaining before Nathan Braswell 2023-02-28 01:14:03 -05:00
  • 4752dde4af Added recursive If tracking, but that still doesn't seem to have solved the problem. Have to dig deeper into the actual failed tests now... Nathan Braswell 2023-02-24 01:19:55 -05:00
  • abddf1db06 transition to fake-ids instead of rec-hashes. Still have infinate recursion, need to check on it Nathan Braswell 2023-02-23 13:14:10 -05:00
  • 6357297cd1 been going down withat's probs the wrong path for solving infinate recursion for bvau, did a lot on suspended IF but that doesn't seem to be the issue... Not sure if this was done in vain Nathan Braswell 2023-02-23 02:48:40 -05:00
  • bb6b15c156 some bugfixes, and moving towards a reconstruct-on-error. More bugs remain though, ?uncovered? by this, including another infinate loop. Fixed a tricky one where a function would recursively call it self for real while evaluating itself fake, and create an environment that had a loop indirected through subbing itself in for SuspendedEnv (since the real and the fake had the same ID). Nathan Braswell 2023-02-23 01:38:46 -05:00
  • e327ed7314 Found the bug. All tests pass PE, except for those that overflow the stack. Those are disabled, and the remaning must be run with --release. Can maybe improve PE tail call to prevent that Nathan Braswell 2023-02-22 20:16:08 -05:00
  • bde04e94df Still buggy, but implemented a more tail-recursive PE with non-recursive drop_redundent_veval, special forms SuspendedEval and SuspendedIf, simplification of how primitives work, and more Nathan Braswell 2023-02-22 01:22:57 -05:00
  • 45a869b09b Remove year and weird (c) from copyright line, concensus is it's not needed these days Nathan Braswell 2023-02-21 10:53:07 -05:00
  • 21fb47470a Too much debugging to find out PE assert was broken and debugging printlns were overflowing the stack. Some of the other tests also overflow the stack if not built in release mode, and I disabled the stack-testing tests for PE Nathan Braswell 2023-02-21 10:32:26 -05:00
  • 67feab10bc Add rec-hash-stopping for SuspendedPair calls Nathan Braswell 2023-02-21 01:48:04 -05:00
  • 76b68e28d8 Implement cached hashes Nathan Braswell 2023-02-20 22:20:00 -05:00
  • 7f10d111ac Fix attempted in SuspendedPair, a lot more tests also work PE-wise now. Many are overflowing the stack, might be recursion causing or just really bad lack of tail calls, or a bug... Nathan Braswell 2023-02-20 00:22:29 -05:00