-
Notifications
You must be signed in to change notification settings - Fork 316
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
Implements compilation of the delete operator #461
Implements compilation of the delete operator #461
Conversation
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.
Nice! Overall looks good already, with a few suggestions
Regarding you comments:
|
Regarding 1), I initially had this in the code, but then I found out that an implicit global variable does not become a property of I did a quick check of how many files in test/mjsunit/* have |
Cool, just a question and one more suggestion. And sounds good, let's not bother with |
Thanks a lot! |
This branches enables compilation of the delete operator. Some thoughts I think are worth mentioning
1)
With this change, approximately 300 new seeds from test/mjsunit and the SpiderMonkey JIT test files will become compilable. If Fuzzilli treats the delete operation as a standard unary operator, delete might be applied to non-object properties, such as simple variables (var). If I understand correctly, semantic correctness will not be significantly impacted because delete does not cause a crash when called on unintended targets. For example, if applied to var, let, or parameters, it simply returns false and has no effect.
2)
It can happen that an object has a key that is a number. In that case DeleteElement will be called, even though it is not an array.
Example:
Similarly, we can delete elements from an array based on a computed index - in that case DeleteComputedProperty is called, not DeleteElement.
Example
Is that a problem? IIUC, the main difference between DeleteElement and Delete(Computed)Property In FuzzIL is only syntactical, not semantical.