Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by mrugiero on Friday June 07, 2024 @09:36PM
(#40614608)
I see. I'll try to read the links over the weekend, they seem really interesting.
It's sad that the terms are so overloaded though, as it makes it hard to reach preexisting approaches and leads to rediscoveries of the same idea (I see that both Jitter and C&P seem to implement this very same idea, except maybe in the way the templates are created, and both seem to believe their invention is novel).
Re:Copy-and-Patch Compilation: fast compilation algorithm fo...
by MaxBarraclough on Saturday June 08, 2024 @04:24AM
(#40616147)
Regarding threaded-code strategies I think the terminology is reasonable. There's a real sense in which context threading is just another kind of threaded code, although it does make it awkward to describe conventional direct or indirect threading.
The creator of Jitter has read a lot about Gforth, as evidenced in [0][1].
You're not the only one to suspect there's some reinvention going on here somewhere though. [2] I'm not familiar enough with these topics (copy-and-patch and Jitter) to weigh in.
[0] (PDF) https://ageinghacker.net/talks/jitter-slides--saiu--ghm2017-...
[1] (PDF) https://ageinghacker.net/talks/jitter-slides--saiu--bts-2022...
The term context threading refers to generation of native code that behaves much like conventional threaded-code interpretation, except specialised to the particular input code. [0][1]
See also dynamic superinstructions, a term used by gforth to refer to its runtime generation of native code for input Forth code. [2]
Disclaimer: I'm no Forth expert. I should give [1] a proper read, it looks interesting.
[0] https://webkit.org/blog/214/introducing-squirrelfish-extreme...
[1] (PDF) https://csng.cs.toronto.edu/publication_files/0000/0162/demk...
[2] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html-his...