You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Musachy Barroso <mu...@gmail.com> on 2009/07/03 00:45:34 UTC
Re: confused about OGNL
It seems like we wont be able to use the new OGNL byte code, as we
will end up using reflection in most cases anyway. The first problem
is the value stack, given and expression "A.B", it is always evaluated
as "Root.A.B" where Root is the CompundRoot. That would be translated
into root.getA().getB(), the problem is that root is a wrapper of a
list of objects, so we never know the type of getA() which makes it
impossible to compile it into byte code.
Enter the hack: I managed to get the compilation nodes from OGNL, so I
would use reflection to get X=Root.A, and then generate the bytecode
for X.B, this kinda works but defeats the whole purpose as the
expressions could not be cached properly, so it is useless.
Even if we use the hack described above, expressions like A[C].B would
need to use reflection as the type of A[C] cannot be determined (if
you thought: use the hack again on A[C], go ahead and smack yourself
around a bit :) )
so we are out of luck on this, until invokedynamic is supported by the
jvm(http://jcp.org/en/jsr/detail?id=292) (good article:
http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html)
musachy
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: confused about OGNL
Posted by Musachy Barroso <mu...@gmail.com>.
:)
On Fri, Jul 3, 2009 at 3:46 PM, Dale Newfield<da...@newfield.org> wrote:
> Musachy Barroso wrote:
>>
>> It seems like we wont be able to use the new OGNL byte code
>
> Oh, well.
>
> I think it's been too long since you've received public kudos, Musachy, for
> all the work you've put in of late to support the struts community:
>
> Musachy++!
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: confused about OGNL
Posted by Dale Newfield <da...@newfield.org>.
Musachy Barroso wrote:
> It seems like we wont be able to use the new OGNL byte code
Oh, well.
I think it's been too long since you've received public kudos, Musachy,
for all the work you've put in of late to support the struts community:
Musachy++!
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org