gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash/testsuite/actionscript.all Object.as


From: zou lunkai
Subject: Re: [Gnash-commit] gnash/testsuite/actionscript.all Object.as
Date: Tue, 8 Apr 2008 16:11:02 +0800

> > BTW, the recursion limit is more 4000 here!   That means for
> > Object-v7/8.swf in our testsuite, there are thousands of getter setter
> > invoked. Just hope you have awared this:)
>
> Are you talking about gnash or pp here ?
> Maybe I overlooked the gnash case (which could likely be the reason why the
> recursion count was implemented initially).

I meant pp.

On 4/8/08, Sandro Santilli <address@hidden> wrote:
> On Tue, Apr 08, 2008 at 03:39:10PM +0800, zou lunkai wrote:
> > > > I bet this is not the general way to use a getter.  It's easy to cause
> > > > recursions  in swf7 and above. More general code would be:
> > > > (1)
> > > >      simple_test_getter = function()  { return  test; };
> > >
> > > 'test' wouldn't necessarely look in 'this' first, right ?
> > >
> >
> > Right. But the above demo might be used in the class context:
> > Class  foo
> > {
> >     var  test;
> >     simple_test_getter = function()  { return  test; };
> > }
>
> Can you provide an example for this ? Maybe in mtasc ?
> I'm pretty sure there's no such thing as a 'class context' changing
> what I said. You still need the 'this' qualification to refer to class
> members, unless the compiler will syntetize one for you.
>
> > > > (2)
> > > >     simple_test_getter = function()  { return  this.test_cache; };
> > >
> > > Well, there seem to be a cache anyway, not causing recursion in SWF6,
> > > we want to be compatible...
> > >
> >
> > This demo would not cause any recursion from swf6~8. And it's an
> > example extracted from coding books. So I guess that's the recommended
> > coding style, and reflects how people uses getter-setter.
>
> We want to keep at least *one* test for recursion alone and one for recursion
> associated with 'watches'. In a previous test, we keep a count of recursion
> to exit after 3 iteration, take a look.
>
> > BTW, the recursion limit is more 4000 here!   That means for
> > Object-v7/8.swf in our testsuite, there are thousands of getter setter
> > invoked. Just hope you have awared this:)
>
> Are you talking about gnash or pp here ?
> Maybe I overlooked the gnash case (which could likely be the reason why the
> recursion count was implemented initially).
>
> --strk;
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]