[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is this a sane idea?
I am, for various reasons, not all of which are classifiable sane :-),
thinking about writing java code that generates classfiles, then loads
those classes and runs them. (In passing, I am attempting to do some
Genetic Algorithm stuff, and writing an interpreter on top of another
interpreter sounded kind of silly.)
Of the various ways of generating class files - writing out java files
and thence calling the sparsely documented tools.jar compiler over it,
or mucking semi-directly with class files using various class file
hackers - i liked the sound of programatically creating grimple code
sounded the nicest.
So, first off, is programatically creating a grimple IR, and then
using soot to create a class file from this IR, a sane approach to
writing a mini-compiler? Is there some demo code some where of doing
something like this somewhere?
brett
--
Brett Morgan
Phone: +61-2-9004-5588
Email: morganb@news.com.au
And, now for something completely different:
Marriage always demands the greatest understanding of the art of
insincerity possible between two human beings.
-- Vicki Baum