Tuesday, November 17, 2009

NewCompiler

I want to use the NewCompiler in SecureSqueak.

The main reason for this is that I want to use its IR ("intermediate representation") objects for moving code between images. The IR is effectively the bytecodes, but in object form, one object for one instruction, such that a final compilation step can be run on them to make CompiledMethods.

This is important in SecureSqueak as it makes implementing a "bytecode verifier" much easier. Instead of verifying the bytecodes for incorrect variable accesses, invalid jump destinations and so forth, we just get the kernel to run the last step of compilation itself. This makes it impossible (*ahem* less possible) for malicious bytecodes to be injected into SecureSqueak.

The rest of the compiler is completely optional. You merely need *something* that can generate the IR — it doesn't even need to be Smalltalk code.

The current NewCompiler maintainers use Pharo, so I'll be moving development over to that for now.

1 comment:

said...
This comment has been removed by a blog administrator.