mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
LibJS: Give argument vectors an inline capacity of 8
This avoids one malloc/free pair for every function call if there are 8 arguments or fewer.
This commit is contained in:
parent
be019f28ca
commit
5495f06af5
4 changed files with 8 additions and 6 deletions
|
@ -61,7 +61,7 @@ Interpreter::~Interpreter()
|
|||
{
|
||||
}
|
||||
|
||||
Value Interpreter::run(const Statement& statement, Vector<Argument> arguments, ScopeType scope_type)
|
||||
Value Interpreter::run(const Statement& statement, ArgumentVector arguments, ScopeType scope_type)
|
||||
{
|
||||
if (!statement.is_scope_node())
|
||||
return statement.execute(*this);
|
||||
|
@ -86,7 +86,7 @@ Value Interpreter::run(const Statement& statement, Vector<Argument> arguments, S
|
|||
return did_return ? m_last_value : js_undefined();
|
||||
}
|
||||
|
||||
void Interpreter::enter_scope(const ScopeNode& scope_node, Vector<Argument> arguments, ScopeType scope_type)
|
||||
void Interpreter::enter_scope(const ScopeNode& scope_node, ArgumentVector arguments, ScopeType scope_type)
|
||||
{
|
||||
HashMap<FlyString, Variable> scope_variables_with_declaration_type;
|
||||
for (auto& argument : arguments) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue