On Thu, Dec 17, 2009 at 1:26 PM, Matt Fowles <[email protected]> wrote: > John~ > I can pretty much guarantee that the new maintainer will be amenable to > patches that help Janino as a utility to use in compilers. As it turns out, > I am the new maintainer ;-)
Oh, cool. I missed that point, sorry. Unfortunately I don't have a patch (and probably won't be able to provide one), but I still think supporting "goto" would be an Excellent Thing. I'd much rather generate Java than byte code, even with ASM or a similar library; but allowing "goto" makes life much simpler for TRO (though not for proper tail calling, alas) and for compiling languages that have gotos already. > My current idea is not to do heavy duty optimizations like register coloring > and variable minimization, but to focus on optimizations that will be a > clear win (dead code elimination, constant propagation, conditional > result propagation (is there a better term for that?)). Fair enough: that sort of optimization is well worth doing, and the nice thing is that it's modular: you can improve things incrementally without tearing up the framework and starting over. Charlie's examples are good ones too. > Matt > > On Thu, Dec 17, 2009 at 1:17 PM, John Cowan <[email protected]> wrote: >> >> On Thu, Dec 17, 2009 at 12:34 PM, Charles Oliver Nutter >> <[email protected]> wrote: >> >> > You bet your bippy I would. I've been wishing for something like "LLVM >> > for JVM bytecode" for a long time. I've been meaning to look at Janino >> > to replace our current compiler backend, but have been spending more >> > time on integration aspects of JRuby lately. >> >> Janino has been dead for about a year, but there is now a new official >> maintainer (Codehaus just flipped the necessary bits a week ago), so >> we can expect to see some movement. Note that Janino is deliberately >> Java 1.4, so if you want generics you have to erase them yourself. I >> don't consider that a serious problem for generated code. >> >> I proposed a long time ago to add "goto" to Janino, which would remove >> a huge amount of the incentive to generate bytecode directly. The >> proposal was turned down, but the new moderator might be more >> receptive, especially if a patch was provided. (You can do a lot of >> what goto does with "do ... while (false)" and judicious use of break, >> but it's messy.) >> >> I'm not sure that making Janino do its own optimizations is really a >> win: too-clever bytecode generators, as we know, can cause JITs to >> pessimize the code. But I'm willing to be convinced otherwise. >> >> -- >> GMail doesn't have rotating .sigs, but you can see mine at >> http://www.ccil.org/~cowan/signatures >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "JVM Languages" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/jvm-languages?hl=en. >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "JVM Languages" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/jvm-languages?hl=en. > -- GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en.
