1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 11:25:07 +00:00

LibJS/Bytecode: Rename Call and SuperCall to &WithArgumentArray

Forcing every function call to allocate a new Array just to accommodate
spread parameters is not very nice, so let's start moving towards making
this a special case rather than the general (and only) case.
This commit is contained in:
Andreas Kling 2023-07-02 15:59:54 +02:00
parent dc884aa0d3
commit 7eb87dec9f
5 changed files with 38 additions and 40 deletions

View file

@ -124,7 +124,7 @@ static NonnullOwnPtr<BasicBlock> eliminate_loads(BasicBlock const& block, size_t
// Attribute accesses (`a.o` or `a[o]`) may result in calls to getters or setters
// or may trigger proxies
// So these are treated like calls
case Call:
case CallWithArgumentArray:
// Calls, especially to local functions and eval, may poison visible and
// cached variables, hence we need to clear the lookup cache after emitting them
// FIXME: In strict mode and with better identifier metrics, we might be able