Julian wrote
An open question that I have is that of facilitating the support
of overloaded methods.
It's typically something dynamically-typed languages struggle
with, and doing it
correctly *and* efficiently is not that pretty.
Overloaded and multi methods have always been an interesting topic for me.
I see two parts to this, the
dispatch decision code and the view the programmer sees when coding. Of
these the later seems to be
the most difficult to envision in a object oriented dynamic language. This
issue I see is that usually its not
for a single type but for a family of types ( hierarchy) causing the
pattern match to explode or the use of
an isaFoo methods as part of the match.
Another use would be in specialization of a call site based on argument
types, perhaps using something like Truffle
or LLVM jit to generate a specialized path. In this case one would want
an efficient GWT which could pattern
match on some instance var of each argument on the stack. There would
probably only be a few of these per
call site so one could do this today with a tree of GWTs and a pattern
match test.
So once again an efficient compiler/optimizer for GWT constructs would
help along with counters and an handle
to invoke to do the optimization. I share some other's concerns on
performance impact of this.
Perhaps the solution is to have a means to build an efficient GWT using
Panama.
regards
mark
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev