On 02/02/2012 04:45 AM, Mark Roos wrote: > From Rémi > Anyway, you can optimize the last instructions, <= should > return a boolean > so the sequence should be: > > ldc 41000000 > aload 1 > indy <= (ILObject;)Z > if_eq LABEL 1 > > I am not sure how to handle this in a Smalltalk envrionment. All of > the objects are instances of the same > java type so <= is a method which returns an RtObject which is the > singular instance of true. I have to > compare that return to 'true' to get what the if bytecode wants.
<= should be a method that returns a boolean which is wrapped to a RtObject by invokedynamic if the return type is an Object but not if the return type is a boolean. > > <= could have been a block making type inference more interesting. 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. > > thanks for the thoughts > > mark cheers, Rémi _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev