LibJS: Remove shift, pop, push functions from Array object

This abstraction isn't really that useful, as we can access the
underlying Vector<Value> using elements() and operate on it directly.
This commit is contained in:
Linus Groh 2020-04-13 16:21:54 +01:00 committed by Andreas Kling
commit 9fab52a390
Notes: sideshowbarker 2024-07-19 07:36:36 +09:00
6 changed files with 18 additions and 40 deletions

View file

@ -977,7 +977,7 @@ Value ArrayExpression::execute(Interpreter& interpreter) const
auto value = element.execute(interpreter);
if (interpreter.exception())
return {};
array->push(value);
array->elements().append(value);
}
return array;
}