Re:Show HN: Cannoli – A compiler for a subset of Python writ...
by carry_bit on Thursday May 17, 2018 @03:34PM
(#17094711)
Instead of an exception you could fall back to a generic version of the function/block, like deoptimization in JITs.
[ Parent
| on HN ]
Re:Show HN: Cannoli – A compiler for a subset of Python writ...
by ufo on Thursday May 17, 2018 @04:19PM
(#17095253)
Deoptimization is actually really hard to implement if you have an ahead of time compiler like Cannoli. You need to get all the stuff that is living in machine registers or in the C stack and then convert them back to whatever representation your generic interpreter uses.
I think this is actually one of the things that most get in the way if you want to use traditional AOT compiler technology (like gcc or LLVM) to implement a JIT. In state of the art JIT compilers this part is always a nest of highly complex and nonportable assembly language.