On 6/1/22 15:48, Gabriel Ivăncescu wrote:
On 01/06/2022 03:07, Jacek Caban wrote:
On 5/31/22 16:56, Gabriel Ivăncescu wrote:
Instead of only interpreted functions. Property retrievals or setters are allowed though, as long as they are not accessors.
Signed-off-by: Gabriel Ivăncescugabrielopcode@gmail.com
Note that native GetDispID seem to fail when retrieving builtin/prototype functions (?) if script is uninitialized, but retrieving the DISPID before and using it after it's uninitialized still works, though (that's what the tests do). I don't think it's worth replicating this GetDispID quirk for the moment.
I'm not really concerned about GetDispID quirks, but implication of your choice for the next patch. I think that releasing objects sooner is better, so it would be good to have a better argument for moving that. Your reasoning there is based on details of how you decided to not follow native here.
More generally, creating function objects in response for property get is an implementation detail that supposed to be transparent. If it's causing problems elsewhere, I'd first look at making it more transparent. In this case, maybe we should create function objects sooner, in response to GetDispID. This would both match all tests and allow us to release function constructor sooner.
Jacek
Right, but how is releasing such objects not an implementation detail as well?
It's an exposed behaviour, see the attached test. BTW, having tests like that may be nice to catch leaks and test GC in the future.
Jacek