mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibJS: Implement basic support for the "delete" operator
It turns out "delete" is actually a unary op :) This patch implements deletion of object properties, it doesn't yet work for casually deleting properties from the global object. When deleting a property from an object, we switch that object to having a unique shape, no longer sharing shapes with others. Once an object has a unique shape, it no longer needs to care about shape transitions.
This commit is contained in:
parent
1617be1e6f
commit
f897c41092
9 changed files with 190 additions and 8 deletions
|
@ -400,6 +400,7 @@ enum class UnaryOp {
|
|||
Minus,
|
||||
Typeof,
|
||||
Void,
|
||||
Delete,
|
||||
};
|
||||
|
||||
class UnaryExpression : public Expression {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue