ActionScriptSuper
From Gnash Project Wiki
'super' is a symbol which is supposedly available inside class method bodies to refer to the superclass.
Observable behaviour of the super object
- Super is a special type of object bound to a constructor and to a prototype
- Calling this special object yeld a call to the associated constructor
- Fetching properties of this special object yeld properties of the associated prototype
- Association with the constructor and with the prototype are set when the 'super' object is created, and cannot be changed by ActionScript.
- Assigning new members to this special object seems to do nothing (doesn't assign to the associated prototype, nor can be fetched from super itsef)
- super.hasOwnProperty() returns true for __proto__, constructor and __constructor__ but could find no other 'own' member, and no way to add to that set (enumerate doesn't return them, even after ASSetPropFlags calls).
- typeof(super) returns 'object', but it can be called as a function.
Availability
- Available when instantiating a class. This is using 'new CONSTRUCTOR' (ActionNew). In this case the associated constructor will be the base class of CONSTRUCTOR (CONSTRUCTOR.prototype.__constructor__) and the associated prototype will be the prototype (exported interface) of the base class of CONSTRUCTOR (CONSTRUCTOR.prototype.__proto__). Note that if CONSTRUCTOR.prototype.__constructor__ is not available (setting to undefined counts as being defined) the constructor will be derived from the prototype (CONSTRUCTOR.prototype.__proto__.__constructor__) This might be normal lookup. Note that when calling the CONSTRUCTOR function directly, 'super' is undefined.
- ActionCallFunction. When calling a function we only know the function name and find out the object that function is defined into. When the function being called is a 'super' we must construct a new super for use inside it that references the super's super class. This would be referencing the __constructor__ and __proto__ members of the super-associated constructor's prototype.
- ActionCallMethod. Here we know an object a method of which is called, and the method name.
- Construction of MovieClip instances of symbols for which registerClass was called.
- Execution of the actionscript method Function.call
References
See Task #7373.

