{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":690063725,"defaultBranch":"master","name":"stitch","ownerLogin":"slowlime","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-09-11T13:11:57.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/90332124?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1694438440.0","currentOid":""},"activityList":{"items":[{"before":"961e50bb61e7fd6d5bc2501c12d0c9bb39e22e9a","after":"047b6d1072f96b4c0cb74461a8c7b636b743c5cb","ref":"refs/heads/master","pushedAt":"2024-06-08T18:20:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add passes to add and remove redundant block parameters\n\nThe former will be useful for the specializer (it needs to know all of a\nblock's value dependencies for caching); the latter will come in handy\nafter specialization to make the residual function's code more\nmanageable.","shortMessageHtmlLink":"Add passes to add and remove redundant block parameters"}},{"before":"3893060e744f8e36b988851a167f6f181785526c","after":"961e50bb61e7fd6d5bc2501c12d0c9bb39e22e9a","ref":"refs/heads/master","pushedAt":"2024-06-07T12:30:44.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Apply Clippy's suggestions and reformat the code","shortMessageHtmlLink":"Apply Clippy's suggestions and reformat the code"}},{"before":"74baeb1af4fef985afb849da5e7f440165f258a3","after":"3893060e744f8e36b988851a167f6f181785526c","ref":"refs/heads/master","pushedAt":"2024-06-05T20:58:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Prepare for the out-of-SSA pass: allocate locals","shortMessageHtmlLink":"Prepare for the out-of-SSA pass: allocate locals"}},{"before":"85c6c2a2d21b197efd22ad04e65b1bd90cd700a5","after":"74baeb1af4fef985afb849da5e7f440165f258a3","ref":"refs/heads/master","pushedAt":"2024-05-27T21:56:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add a README\n\nCommunity standards checklist:\n[x] README\n[ ] a truckload of emoji in the repo description\n[ ] the crab surgeon logo\n[ ] weekly blog posts with uncanny nn-generated images\n[ ] everything else I'm forgetting","shortMessageHtmlLink":"Add a README"}},{"before":"cb73b03b955b089f621b8431e916e73799325dd5","after":"85c6c2a2d21b197efd22ad04e65b1bd90cd700a5","ref":"refs/heads/master","pushedAt":"2024-05-27T21:19:51.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add an SSA CFG IR for WebAssembly\n\nMonths working on the partial evaluator have convinced me that being\nable to refer to individual values would have been extremely helpful. In\naddition to that, a tree representation for expressions was a mistake\nand a hassle to work with, too.\n\nSo we get ourselves some SSA at last, with the delicious addition of a\nregularized IR to reduce the amount of pattern-matching.\n\nThe commit comes with an algorithm to lower an AST to the IR as well as\nvarious miscellaneous passes and analyses to make sure the IR is not too\nclumsy and can actually be used to do something useful.\n\nNext up is out-of-SSA transformation. I think I'll keep the non-SSA CFG\nIR (the work's already been done anyway) and target it for the\ntransformation.","shortMessageHtmlLink":"Add an SSA CFG IR for WebAssembly"}},{"before":"29a4eab8bbcd18bf40a34f8c6463897fe8065ad9","after":"cb73b03b955b089f621b8431e916e73799325dd5","ref":"refs/heads/master","pushedAt":"2024-05-22T07:04:15.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Choose a block with the least depth for processing\n\nSpeeds up specialization by 4.5x!","shortMessageHtmlLink":"Choose a block with the least depth for processing"}},{"before":"e9427a073933f3d4a485db921a83e5ea878808b6","after":"29a4eab8bbcd18bf40a34f8c6463897fe8065ad9","ref":"refs/heads/master","pushedAt":"2024-05-05T17:09:36.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Expose stitch API only with a feature enabled\n\nAllows the same codebase to be built with no stitch integration just by\ntoggling the feature off.","shortMessageHtmlLink":"Expose stitch API only with a feature enabled"}},{"before":"d3469ea05428960694dcf7439ec107fa7eb7485c","after":"e9427a073933f3d4a485db921a83e5ea878808b6","ref":"refs/heads/master","pushedAt":"2024-04-16T07:34:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Write specialization info to files","shortMessageHtmlLink":"Write specialization info to files"}},{"before":"3993fd8b13f19151e39c7e77d50b40b36e66fac0","after":"d3469ea05428960694dcf7439ec107fa7eb7485c","ref":"refs/heads/master","pushedAt":"2024-04-15T15:56:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Fix irreducible control flow","shortMessageHtmlLink":"Fix irreducible control flow"}},{"before":"3a3e241829f03cfc615fa4591c507283003c6466","after":"3993fd8b13f19151e39c7e77d50b40b36e66fac0","ref":"refs/heads/master","pushedAt":"2024-04-13T13:23:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add stitch/specialize-cases","shortMessageHtmlLink":"Add stitch/specialize-cases"}},{"before":"fddb050f2eb2eaa9cb8888dc63a0aafce0855829","after":"3a3e241829f03cfc615fa4591c507283003c6466","ref":"refs/heads/master","pushedAt":"2024-04-12T21:48:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Rework constant memory access\n\nThe spotlight of this commit is the move from marking pointers as\nconstant to marking memory regions as such. Not only is it a much easier\nconcept to understand on the user's side, it also:\n- allows making more precise delineation between constant and runtime\n data\n- is easier to track during specialization\n- reduces the chance of losing information\n- means the user has to annotate less in their code\n- and is generally safer (still unsafe tho)\n\nThe safety is further improved with the addition of the new\nstitch/assert-const-mem intrinsic, which does what's written on the tin.\n\nOn the subject of memory, the interpreter now tracks attributes of\nvalues written to memory and is able to restore these when loading.\nThe main reason why I deemed this necessary was a function pointer being\npassed via stack instead of locals, thereby losing its NO_INLINE\nattribute (which was there for a very good reason).\n\nThe cleanup resulting from removing constant pointers has allowed\nrestoring the specialized function caches. The new interpretation of\nmemory handling is as such:\n- Symbolic allocations are uninitialized on specialization entry: it's\n assumed the actual contents may change to anything during runtime.\n- Concrete pointers are assumed to be constant-dereferenceable if they\n point to a constant memory region. Both the concrete interpreter and\n the specializer ensure, the latter to the best of its ability, that no\n stores to constant memory take place. The contents are presumed to be\n alive the the 'static lifetime, in Rust's terms.\n\nBasically if you want to specialize a method taking a datum via a\npointer, you box it, leak it, concretize the pointer, and call\nstitch/const-mem. Then you can pass the pointer as a concrete argument\nto the specializer.\n\n---\n\nAs for tuna, it gets its own Freezer, which walks an AST and marks nodes\nas constant memory. Method evaluation asserts values used for operation\ndispatch are constant so that evaluating a Primitive does not emit a\nhundred basic blocks for every single call.\n\nThe result of all these shenanigans is that stitch successfully performs\nspecialization of my hello-world program. Again. This time it actually\ninlines a bit more than previously. Though the loop iterating over the\nblock body is still there, rolled-up.","shortMessageHtmlLink":"Rework constant memory access"}},{"before":"b7d0969ddf21bc93034658ecd0d826c5c6f9f556","after":"fddb050f2eb2eaa9cb8888dc63a0aafce0855829","ref":"refs/heads/master","pushedAt":"2024-04-10T20:33:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Make specialization work for tuna\n\nStitch still does next to nothing because it doesn't dereference the\nconcrete argument, but at least the resulting program works as expected.","shortMessageHtmlLink":"Make specialization work for tuna"}},{"before":"96ea13269e19d826d4371df8edde82e6266bb277","after":"b7d0969ddf21bc93034658ecd0d826c5c6f9f556","ref":"refs/heads/master","pushedAt":"2024-04-08T18:04:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Specialize SOM methods in the tuna VM\n\nThe specializer has undergone a lot of changes too, the most prominent\nbeing:\n- symbolic memory allocations are now modeled as a set of disjoint\n regions rather than one contiguous slice\n- variable maps have been rewritten to use copy-on-write semantics\n- inlining heuristics have been updated to inline way less aggressively\n\nWithout these stitch had been processing tuna for 12 hours straight, at\nwhich point I ran out of patience.","shortMessageHtmlLink":"Specialize SOM methods in the tuna VM"}},{"before":"9cd1d0fafd127b5381e37dca2e2af74e56c80638","after":"96ea13269e19d826d4371df8edde82e6266bb277","ref":"refs/heads/master","pushedAt":"2024-04-01T10:22:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Don't use the WASI API in stitch-start","shortMessageHtmlLink":"Don't use the WASI API in stitch-start"}},{"before":"5169e2efa559b2179d87a0c34b573661ff33f95d","after":"9cd1d0fafd127b5381e37dca2e2af74e56c80638","ref":"refs/heads/master","pushedAt":"2024-03-31T10:30:14.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Start integrating tuna with stitch","shortMessageHtmlLink":"Start integrating tuna with stitch"}},{"before":"c169cc97c91e45eb86224829447146c6b0734580","after":"5169e2efa559b2179d87a0c34b573661ff33f95d","ref":"refs/heads/master","pushedAt":"2024-03-13T14:39:08.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Evaluate $__stack_pointer symbolically","shortMessageHtmlLink":"Evaluate $__stack_pointer symbolically"}},{"before":"99696429eda00b0754ac6169bbcadd6cc4a2b3dd","after":"c169cc97c91e45eb86224829447146c6b0734580","ref":"refs/heads/master","pushedAt":"2024-03-13T14:34:54.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Evaluate $__stack_pointer symbolically","shortMessageHtmlLink":"Evaluate $__stack_pointer symbolically"}},{"before":"a212b4879e34a21a70406f37a3e5b52b27a2462f","after":"99696429eda00b0754ac6169bbcadd6cc4a2b3dd","ref":"refs/heads/master","pushedAt":"2024-03-13T02:37:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Don't store pointers to the stack in the specialized program","shortMessageHtmlLink":"Don't store pointers to the stack in the specialized program"}},{"before":"fc2f631644f9800844ec52de4175f12893cb0ce9","after":"a212b4879e34a21a70406f37a3e5b52b27a2462f","ref":"refs/heads/master","pushedAt":"2024-03-12T17:21:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Fix things to make stitch-test-calc work\n\nStill have to mark the stack pointer global as a symbolic pointer,\nthough.","shortMessageHtmlLink":"Fix things to make stitch-test-calc work"}},{"before":"7f13c4a3fc0ab4a969c7c8ca17972284249e1d7b","after":"fc2f631644f9800844ec52de4175f12893cb0ce9","ref":"refs/heads/master","pushedAt":"2024-03-10T20:00:08.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Process memory.copy and memory.fill instructions","shortMessageHtmlLink":"Process memory.copy and memory.fill instructions"}},{"before":"e1ed12af9652ec63be0624f5b5cf02f73067ba22","after":"7f13c4a3fc0ab4a969c7c8ca17972284249e1d7b","ref":"refs/heads/master","pushedAt":"2024-03-09T17:29:16.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add stitch bindings","shortMessageHtmlLink":"Add stitch bindings"}},{"before":"2c47971bd5f54ff5fbe26a99db8e3241f3c1fcc5","after":"e1ed12af9652ec63be0624f5b5cf02f73067ba22","ref":"refs/heads/master","pushedAt":"2024-03-08T19:55:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Make stronger assumptions for stitch/symbolic-ptr\n\nNow we additionally assume no one has an access to an allocation pointed\nto by a symbolic pointer created with stitch/symbolic-ptr. This\nassumption can be easily broken if the symbolic pointer is written to a\nglobal or memory, so it's rather dangerous. However, now the specialized\ncalc.wat is almost linear! The only branches are due to memory.size\nchecks.","shortMessageHtmlLink":"Make stronger assumptions for stitch/symbolic-ptr"}},{"before":"eb92a0a1dfb84bae58e328ab29f0d7c018f4fa34","after":"2c47971bd5f54ff5fbe26a99db8e3241f3c1fcc5","ref":"refs/heads/master","pushedAt":"2024-03-08T18:15:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Perform symbolic memory loads and stores\n\nWhile it does eliminate a few load/store instructions from the output,\nthe primary goal pursued by this work has not been achieved: calc.wat's\nvalue stack (used in $interpret to hold intermediate values) operations\nare still present in the result.\n\nThe problem is that the stack's backing storage is allocated via $malloc\nand a pointer to the allocation is then written to memory, whereupon it\nloses the metadata that allows the allocation to be tracked\nsymbolically. When $vec-push loads the pointer, it gets a plain I32 that\nit can't safely dereference, thus requiring emitting loads and stores\ntargetting it.\n\nOn the other hand, the two other fields of the stack — its length and\ncapacity — should have been possible to track during specialization. The\nfact that the output still contains rolled-up $memset loops points\notherwise and it implies that the values of these fields were not after\nall available to the specializer (as the loop exit conditionals could\nnot be eliminated). This behavior is unexpected and needs investigation.","shortMessageHtmlLink":"Perform symbolic memory loads and stores"}},{"before":"c0bfc27b0e3fad424c4fed2980c2d3737cc1192c","after":"eb92a0a1dfb84bae58e328ab29f0d7c018f4fa34","ref":"refs/heads/master","pushedAt":"2024-03-08T13:40:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add symbolic pointers","shortMessageHtmlLink":"Add symbolic pointers"}},{"before":"616f6e45dc1d8a454fa6daf4d5e0bf43779064e2","after":"c0bfc27b0e3fad424c4fed2980c2d3737cc1192c","ref":"refs/heads/master","pushedAt":"2024-02-29T16:13:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Replace imported intrinsics with dummy bodies","shortMessageHtmlLink":"Replace imported intrinsics with dummy bodies"}},{"before":"36531ab5d8ce793ff0030d0c26b1271cb485959a","after":"616f6e45dc1d8a454fa6daf4d5e0bf43779064e2","ref":"refs/heads/master","pushedAt":"2024-02-29T14:29:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add stitch/no-inline and don't assume mutable globals constant","shortMessageHtmlLink":"Add stitch/no-inline and don't assume mutable globals constant"}},{"before":"4620f5488a4040217f65687dbcf0c61c5c5304e4","after":"36531ab5d8ce793ff0030d0c26b1271cb485959a","ref":"refs/heads/master","pushedAt":"2024-02-29T12:11:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Add stitch/inline to force inlining","shortMessageHtmlLink":"Add stitch/inline to force inlining"}},{"before":"435942feab1b661846e62530ff669e3434c54a8f","after":"4620f5488a4040217f65687dbcf0c61c5c5304e4","ref":"refs/heads/master","pushedAt":"2024-02-29T11:37:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Inline functions","shortMessageHtmlLink":"Inline functions"}},{"before":"8a5e47630ea86dda77ff76ffeda5b94bb5c85b95","after":"435942feab1b661846e62530ff669e3434c54a8f","ref":"refs/heads/master","pushedAt":"2024-02-27T16:25:24.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Unswap left and right in the calculator","shortMessageHtmlLink":"Unswap left and right in the calculator"}},{"before":"4e0ee5a8e932df6a54ddcdcb2ee6059b6122d1cc","after":"8a5e47630ea86dda77ff76ffeda5b94bb5c85b95","ref":"refs/heads/master","pushedAt":"2024-02-26T15:02:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"slowlime","name":null,"path":"/slowlime","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/90332124?s=80&v=4"},"commit":{"message":"Implement loop unrolling","shortMessageHtmlLink":"Implement loop unrolling"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEYAi7twA","startCursor":null,"endCursor":null}},"title":"Activity · slowlime/stitch"}