opal icon indicating copy to clipboard operation
opal copied to clipboard

Allow VirtualFormalParameters to be extended on demand

Open johannesduesing opened this issue 4 months ago • 1 comments

Currently, the VirtualFormalParameters are computed once and are then final. They depend on the number of DeclaredMethods that have a single defined method upon initialization. Since the set of declared methods can be extended on demand, this is not deterministic - we likely want to update the virtual formal parameters in a similar way.

This issue came up in this PR discussion

johannesduesing avatar Sep 17 '25 09:09 johannesduesing

This will likely be more complicated than expected. VirtualFormalParameters represent the receiver object for non-static methods. For virtual declared emthods, we do not know whether they are static or not. Thus, we might need to pass a "static-hint" when creating VirtualDeclaredMethod objects in order to correctly compute virtual formal parameters.

johannesduesing avatar Sep 18 '25 09:09 johannesduesing