ruffle/core/src/avm2
David Wendt e8fbac6cf2 Refactor the base_proto system to more accurately record what prototype methods come from.
The previous system primarily relied on `Executable` to automatically start and continue a super chain. This works, but only for class hierarchies without *override gaps* - methods that override another method not defined by the direct superclass of the method. In that case, the override method would be called twice as the `base_class` was moved up one prototype at a time, which is wrong.

The new system relies on the call site to accurately report the prototype from which the current method was retrieved from. Super calls then start the resolution process *from the superclass of this prototype*, to ensure that the already-called method is skipped.

It should be noted that the proper `base_class` for things like `callmethod`, `callstatic`, `call`, `get`/`set` methods, and other call opcodes that don't use property look-up are best-effort guesses that may need to be amended later with better tests.

To facilitate `base_proto` resolution, a new `Object` method has been added. It's similar to `get_property`, but instead returns the closest prototype that can resolve the given `QName`, rather than the actual property's `ReturnValue`. Call operations use this to resolve the `base_proto`, and then resolve the method being called in `base_proto`. The existing `exec_super` method was removed and a `base_proto` method added to `exec` and `call`.
2020-07-13 17:44:21 -04:00
..
globals Impl `callmethod`, `callproperty`, `callproplex`, `callpropvoid`, and `callstatic`. 2020-07-13 17:43:49 -04:00
activation.rs Impl `callsuper`, `callsupervoid`, and `constructsuper`. 2020-07-13 17:44:15 -04:00
function.rs Refactor the base_proto system to more accurately record what prototype methods come from. 2020-07-13 17:44:21 -04:00
globals.rs Impl `callmethod`, `callproperty`, `callproplex`, `callpropvoid`, and `callstatic`. 2020-07-13 17:43:49 -04:00
names.rs Debug all multiname resolutions 2020-07-13 17:43:44 -04:00
object.rs Refactor the base_proto system to more accurately record what prototype methods come from. 2020-07-13 17:44:21 -04:00
property.rs Refactor the base_proto system to more accurately record what prototype methods come from. 2020-07-13 17:44:21 -04:00
return_value.rs Implement namespaces as a value type 2020-07-13 17:42:49 -04:00
scope.rs Fix the error messages for `findpropstrict` and `getlex` to be more informative. 2020-07-13 17:43:47 -04:00
script_object.rs Implement prototype awareness for `get_property`, `has_property`, and `resolve_multiname`. 2020-07-13 17:44:19 -04:00
slot.rs Impl `initproperty` 2020-07-13 17:43:45 -04:00
value.rs Implement slot traits. 2020-07-13 17:43:28 -04:00