missed example?
2007/4/5, Alexei Fedotov <[EMAIL PROTECTED]>:
Folks,
Thank you for expressing your thoughts - this is very useful. I agree
with performance reasoning to skip dead code verification.
Here is one more example:
On 4/2/07, Mikhail Loenko <[EMAIL PROTECTED]> wrote:
> 02 Apr 2007 01:57:39 +0400, Egor Pasko <[EMAIL PROTECTED]>:
> > On the 0x2AB day of Apache Harmony Alexei Fedotov wrote:
> > > Hello, Pavel, community,
> > >
> > > Could you here help me to understand the following issue? Consider the
> > > following example:
> > > ;
> > > ; test method
> > > .method public test([Ljava/lang/String;)I
> > > .limit stack 3
> > > .limit locals 2
> > >
> > >
> > > sipush 555
> > > iconst_1 ; push int 1
> > > iconst_2 ; push int 2
> > > if_icmplt Next
> > > Next:
> > > sipush 555
> > > if_icmpne Fail
> > > ; pass
> > > sipush 104
> > > ireturn
> > >
> > > Fail:
> > > sipush 105
> > > ireturn // <<<<<< look here
> > >
> > >
> > > return // <<<<<< look here
> > > .end method
> > >
> > > In VM validation test suite we have a big number of tests like this
> > > which have several different return instructions one method. JVM spec
> > > says about this: "Each return instruction must match its method's
> > > return type." Strangely, Sun's verifier allows this code to pass
> > > verification, probably due to the fact that invalid "return" statement
> > > is unreachable.
> > >
> > > Do you think we should be compatible with Sun on this issue?
> >
> > I think, skipping analysis of unreachable code pieces would make
> > verification easier and faster not sacrificing JVM security, real apps
> > and such. JIT does not touch unreachable code too. So, let's decide if
> > real TCK/compat issues appear and forget unreachable code until then.
>
> +1
>
> Thanks,
> Mikhail
>
>
> >
> > --
> > Egor Pasko
> >
> >
>
--
With best regards,
Alexei,
ESSD, Intel