Hello! Better late than never...
Noah Lavine <[email protected]> writes: [...] > The goal of Jitgen is to generate both of these from the following > instructions: > > '((ip <- ip + ipup) > (tmp1 <- fp - spup) > (tmp2 <- sp - tmp1) > (tmp3 <- tmp2 == (n_val & 0x7)) > (branch-if tmp3 good_path) > (store-relative ipp 0 ip) > (store-relative spp 0 sp) > (store-relative fpp 0 fp) > (return jit_return_wrong_num_args) > (label good_path) > (sp <- sp + spup) > (store-relative sp 0 SCM_UNDEFINED) > ) Excellent! The challenge will be to see if it’s sufficiently expressive to express all the actual VM instructions, and allows the generated code to be about the same as the hand-written one. > My biggest question is, is this something that you would be interested > in having in Guile? I think so, yes. Not in 2.0, I guess, but when it starts stabilizing it could go into a branch. > If so, then also what do you think of the code style and interfaces, > and do you have any other feedback? The code style looks OK to me. This approach raises bootstrapping issues, or semi-issues. For instance, tarballs could come with all the pre-generated C files containing the VM instructions, but we may also have to check them in. That’s how psyntax bootstrapping is handled already, so it’s probably OK. Thanks, Ludo’.
