-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Call cast_object handler from get_properties_for #11583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5be7394
to
db51bf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
Hi @iluuu1994, I just tested this change and, while I understand why you chose this implementation, I'm not sure it's actually an improvement... Before this change, while having to override After this change:
So I feel the situation might now be even more confusing for extension authors, especially given none of this is actually documented. A clean way to do this could be to just remove the What do you think? |
Coming back at it, in fact this PR doesn't really fix #11547. This check in the VM handler skips In other words, in order for
Which confirms that this issue cannot be fixed without some changes in the VM. In the light of this (IMO):
|
@ju1ius Hmm, you're right. I missed that this code is duplicated in the VM. I would rather not add another check there, because it will unnecessarily slow it down. Thus I think I will revert the change. We may improve the internals documentation instead. |
Reverted the commit here: efc73f2 |
Technically, I don't think another check is needed. The check just has to happen in the VM handler instead (I'm not sure a simple pointer comparison would significantly slow things down...). But this would most probably be a BC break and a bigger changeset, so yeah...
Oh man, is it needed 😄 !
Thanks for looking into this btw, and sorry for not being able to test this sooner. |
@ju1ius Yeah, what I meant is an additional check in the VM. The VM is generally more performance critical than other code since it gets called a lot. So we'd have to be checking for both special |
Fixes GH-11547