Le 01/11/2009 19:22, Charles Oliver Nutter a écrit : > Very nice! I want to actually implement this in Duby+Surinx merged > into a single language, but also start implementing it for JRuby. We > are moving toward an SSA-based compiler IR for future versions of > JRuby which may make it easier to propagate type information when > possible. >
Hi Charles, Fortunately, you're exist. I have a reader :) When I was writing this entry I was wondering how many people will really take a look to bytecode dumps. In pseudo, I don't do any type propagation, i.e no more that what a classical typechecking do. I just do only one thing to avoid some dynamic cast, I back-propagate expected type from the node to the leaf. i.e if a function is dynamic but is assigned to an int, I encode that this function need an int as return type. I wonder if a SSA-based compiler IR is a good idea, you will need something like a back transformation to come back to a bytecode form (without phis). And as far as I know, the transformation that you can do on a SSA form are low levels i.e you will have lot of informations but no way to encode them in the bytecode. Moreover in case of JRuby you have a lot more than just types, you can do some kind of type profiling because your code need first to be interpreted. And so you can propage these informations to your bytecode compiler. cheers, Rémi > On Sun, Nov 1, 2009 at 9:04 AM, Rémi Forax<[email protected]> wrote: > >> It can interest some of you, >> I've written a blog entry on a newly language which allow gradual typing: >> http://weblogs.java.net/blog/forax/archive/2009/11/01/tales-four-fibonaccis >> >> Rémi >> >> >>> >> > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
