Skip to content
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

Mark writes that are really reads if working on an object #5273

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Mar 18, 2020

Alternative to #5250 that I think handles the readonly property case more comprehensively.

We add a flag to the FETCH_OBJ_W/RW/UNSET opcodes that tells us whether the write should be interpreted as a read if the fetched value is an object. This is passed on to read_property as an extra flag in the BP_VAR mode.

Here this is used to make the "indirect modification" warning more accurate -- but the same check would also apply to readonly properties.

This change is likely incomplete because it makes BP_VAR a mask, so some equality comparisons may need to be adjusted.

@nikic
Copy link
Member Author

nikic commented Apr 16, 2020

As readonly properties were declined, and this implementation does not require BC breaks, I'm closing this for now...

@nikic nikic closed this Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant