[Mono-dev] JaCIL Project
Jonathan Pryor
jonpryor at vt.edu
Sun May 21 11:15:28 EDT 2006
On Sun, 2006-05-21 at 09:59 +0200, Andreas Nahr wrote:
> Nice project, however my guess would be that it will be extremely hard
> to translate arbitrary CIL to Java bytecode.
> The hard part is likely that CIL has lots of construcs that Java
> bytecode does not have. Just to name a few common/important ones:
> Generics, Pointers and Pointer arithmetic, unchecked exceptions,
> events, delegates, ...
To be fair, workarounds can be generated for most of those with minimal
thought -- pointers & pointer arithmetic become indexing into
compiler-generated arrays, unchecked exceptions becomes `throws
Throwable` on all methods, events are only compiler magic around
methods, so they should be trivial, and delegates are really just
classes with an Invoke() method matching the delegate signature, so
anonymous inner classes would be the logical mapping...
I'm not saying this would be _easy_. Nor am I implying that it would
perform with any reasonable speed (especially for pointers, pointer
arithmetic, and generics), but it should be possible to do some type of
mapping for these...
- Jon
More information about the Mono-devel-list
mailing list