4 ms·
This will kill baseline JIT performance. I am trying out a couple of new directions, e.g. generating more of the tiers from a more abstract description, consta
by titzer 2y ago
This will kill baseline JIT performance.
I am trying out a couple of new directions, e.g. generating more of the tiers from a more abstract description, constantly shrinking the amount of hand-written compiler/interpreter code. My hard requirement is the end result has to be pretty darn close to what I'd write by hand.
One thing I am thinking about now is how to make more use of the implementation language's (e.g. Virgil) compiler to be able to paste together machine code templates gotten from writing in the implementation language. Think copy-and-patch compilation, but as language primitive. E.g. "please emit an inlined copy of the machine code for this function (first-class ref to said function) into memory here, under this ABI".
- pizlonator 2y ago> This will kill baseline JIT performance. You say that and then you describe exactly what I would have used as a solution: copy and patch. Just have the checker check the templates that the baseline JIT is stitching together and then have a safe way to ask for the prechecked templates to be stitched together. Bunch of details in getting that right obviously, but it doesn’t seem impossible.
- titzer 2y agoWe're not that far off from each other. > Just have the checker check the templates that the baseline JIT is stitching together Sure, from my second paragraph, the templates it's using could be opaque things it got from requesting the static compiler generate a template from a first class function ref (at compile time), in which case the verification has already been done.
- pizlonator 2y agoI think we're saying the same thing