Aspect Oriented Programming with LLVM
Is there some way to integrate aspects i开发者_C百科nto LLVM-bytecode?
If you mean an existing way, I haven't seen anything that's stable/in production, but there are a number of papers, for example:
http://www.cs.rochester.edu/meetings/TRANSACT07/papers/felber.pdf
http://llvm.org/pubs/2005-03-14-ACP4IS-AspectsKernel.pdf
Your best bet would be to find an LLVM-supported language you're interested in, then look for projects that have an AOP framework for that language. Some are pre-compilers, which would work "as-is" (assuming you can run whatever the pre-compiler is written in). Frameworks that directly manipulate compiler output would have to be modified to operate on LLVM code.
The general answer is "of course"--any system that allows access to generated code or the compilation process will support aspects, it's just a matter of how much effort you want to put in to it.
LLVM has great tools for poking at bytecode, which IMO make things like AOP a lot more fun to play with.
精彩评论