Possibilities for type inference in CLISP

Charles Zhang <[email protected]> Thu, 14 Jun 2018 22:03:04 -0400
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAB=SSSmiyny0NhtUBBz1CXdnLRWb6JcKyGN9YcaKKX_75RQzqw@mail.gmail.com>
Hello clisp, Bruno, Sam,

What would be an approach to leveraging type inference information
from Cleavir? SICL handles all the front end parsing and actual type
inference, but there are no backend VM instructions that actually
perform raw operations without type checking.

One possible approach would be to add some instructions in the virtual
machine for certain common operations like CAR, CDR, +, etc which
don't do any type checks at runtime. The compiler would have to
guarantee the types of the operands. These raw operations could be
emitted only when the compiler can prove the object is already of the
right type, so code space wouldn't be affected. Maybe there can be
seperate CALL instructions in the VM that turn off a type checking bit
in the runtime.

Thoughts? Would CLISP benefit performance-wise from such an
optimization? Is it feasible at the virtual machine level to add such
opcodes?

Charles

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel