[MacRuby-devel] Looking for info on MacRuby's JIT

ravenex ravenex at qq.com
Mon Dec 7 08:36:28 PST 2009


Hi all,
  
 Greetings. New to this list, and to MacRuby. I was just skimming over the source code from trunk, but wasn't able to find a document that describes the current design of Roxor. I only found requirements, build instructions, coding styles and the like.
  
 The thing I find very confusing is that in vm.cpp, RoxorCore::RoxorCore(), there's a call to ee->DisableLazyCompilation(). This disables LLVM JIT's lazy compilation. Is it the case that Roxor compiles every method called by the toplevel script? Or how is Roxor feeding stuff into the JIT?
 It seems to me that in main.cpp, main() calls ruby_options(), where the whole source file gets parsed into MRI's Ruby AST. That AST is supposed to go into RoxorCompiler::compile_main_method(), and out comes LLVM IR. And then after optimizations passes, GETCORE()->compile() puts the JIT in action, turns LLVM IR into native code, and then invoke the IMP. I must have missed something...but if Roxor JIT compiles a method upon first invocation, where is this behavior implemented.
  
 Any pointers to documents, blog posts or mails would be truely appreciated.
  
 Thanks in advance,
 Raven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20091208/af18c434/attachment.html>


More information about the MacRuby-devel mailing list