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; _______________________________________________ Gnash mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash
