Cliff Hacks Things.

Sunday, March 19, 2006

M2VM status report

M2VM is coming along. It's proving as flexible as I'd hoped — even changes to pretty fundamental structures, like the layout of an activation record, go off without a hitch.

Hooray for metaprogramming, I say.

Some notes:

- My strict adherance to standard C (the GNU99 dialect, anyway, which I consider a standard) has kept portability simple. The current codebase works great on all combinations of {Linux, Mac OS X} x { PPC32, PPC64, x86 }, without any architecture-specific defines or conditional compilation. Of course, it also forces me to fight GCC's decisions in some areas, but I'm working on that.

- Holy crap the Core Duos are fast.

- Basically all of my development right now is in Mongoose; the C layer is mostly finalized, for now. Even metaprogramming stuff like exception handling (which has to interact with the callstack), reflection, and dynamic loading is in Mongoose. It's fun like Forth, but with better abstractions.

- My Module abstraction seems to be good. Modules contain classes and/or other modules, and serve as the largest granule of access control and scoping. You can provide a filter when you load a Module, to prevent it from accessing, say, the reflection classes.

The exception-handling facilities are coming along. I've put together a brief (and possibly cryptic) slide stack explaining the Mongoose exception mechanisms (244k PDF), explaining the various nuances. (It supports Java-style unwind-and-abort handling, PL/1-style resumption, and a few other options.)


Post a Comment

<< Home