gnash
[Top][All Lists]
Advanced

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

Re: [Gnash] Testcases for Gnash


From: strk
Subject: Re: [Gnash] Testcases for Gnash
Date: Thu, 9 Feb 2006 21:14:33 +0100

On Thu, Feb 09, 2006 at 06:33:55PM +0100, Nicolas Cannasse wrote:
> >>Push [MyInterface]
> >>Push [1]; // number of interfaces on the stack
> >>Push [MyClass]
> >>Implements
> >
> >
> >Should there be a getVariable after the first and last push ?
> >I mean, will the stack contain strings or actual functions 
> >references ?
> 
> True. It should be more like :
> 
> Push [MyInterface]
> Eval
> Push [1]; // number of interfaces on the stack
> Push [MyClass]
> Eval
> Implements

What's expected as typeof(MyInterface) and typeof(MyClass) ?
Is the interface always a "Function" ?
Can the class be an "Object" ?
Remember, i'm trying to implement instanceOf, so I need to 
understand what needs to be taken track of in which type
of value.

> >>As for [Extends], in AS1 you would write the following when inheriting :
> >>
> >>MyClass.prototype.__proto__ = SuperClass.prototype;
> >>MyClass.prototype.__constructor__ = SuperClass;
> >
> >
> >Should this make (MyClass instanceOf SuperClass) evaluate to true ?
> >
> >>While AS2 generates the following bytecode :
> >>
> >>Push [SuperClass]
> >>Push [MyClass]
> >>Extends
> 
> Should be :
> 
> Push [SuperClass]
> Eval
> Push [MyClass]
> Eval
> Extends

Again, what's expected as types of SuperClass and MyClass ?

> I think both will have instanceOf return true. You might want to check 
> that by yourself since my AS1 days are quite far now. I'm not sure 
> exactly what is the semantical difference between the two.

My tests tells that the __proto__ hack doesn't give a true result
for instanceOf, but as you say that might change from version to version.

--strk;




reply via email to

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