mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibJS: Some optimizations for ObjectExpression
- move() the property map when constructing ObjectExpression instead of making a copy. - Use key+value iterators to traverse the property map in the execute() and dump() functions.
This commit is contained in:
parent
6c3afca686
commit
00feef8642
2 changed files with 6 additions and 8 deletions
|
@ -574,7 +574,7 @@ private:
|
|||
class ObjectExpression : public Expression {
|
||||
public:
|
||||
ObjectExpression(HashMap<String, NonnullRefPtr<Expression>> properties = {})
|
||||
: m_properties(properties)
|
||||
: m_properties(move(properties))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue