diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-26 13:53:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-26 15:51:07 +0200 |
commit | f897c410927817050c9f98081d45a32e893e6d73 (patch) | |
tree | 1b45402c82e1785b649d29c3252f1df9bdceb677 /Libraries/LibJS/AST.h | |
parent | 1617be1e6f1bb356ce1ae08d5443795a9c5f2f33 (diff) | |
download | serenity-f897c410927817050c9f98081d45a32e893e6d73.zip |
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.
Diffstat (limited to 'Libraries/LibJS/AST.h')
-rw-r--r-- | Libraries/LibJS/AST.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h index ba37df528a..bec3f2910a 100644 --- a/Libraries/LibJS/AST.h +++ b/Libraries/LibJS/AST.h @@ -400,6 +400,7 @@ enum class UnaryOp { Minus, Typeof, Void, + Delete, }; class UnaryExpression : public Expression { |