Rémi your comment

The idea is just to propagate the type you need if you can.
So
   for a = 2 <= 3, '<=' will return a RtObject but
   for if (2 <= 3),  '<=' will return a boolean because it's called in 
an if.

Ah yes,
this is something that ST compilers do and I think is a good idea. 
Basically some selectors ( message names)
are known to be  mostly between say Integers and result in booleans.  The 
compiler inlines some guards and the op
to eliminate message sends for the most expected case.  The downside is 
that you cannot overwrite these
selectors for the types the compiler recognizes.  So aInt = aInt => 
aBoolean will always occur even if you add
a selector to Integer overriding =.

I have left that out for now as I focus on a solid implementation of the 
environment but it,  along with adding
type hints and embedded jvm code, is a way to improve performance

thanks
amrk

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to