From 2b4c2301a9df38cf13e8020b7e9f402af30ab0e7 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sun, 25 Apr 2021 23:35:23 +0300 Subject: [PATCH] LibJS: Stop rolling back parser state that is immediately replaced This showed up on a profile (barely), so should help a tiny bit with perf in parsing arrow functions. --- Userland/Libraries/LibJS/Parser.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp index f34d6eb2e2..2132c20315 100644 --- a/Userland/Libraries/LibJS/Parser.cpp +++ b/Userland/Libraries/LibJS/Parser.cpp @@ -346,7 +346,6 @@ RefPtr Parser::try_parse_arrow_function_expression(bool expe auto rule_start = push_start(); ArmedScopeGuard state_rollback_guard = [&] { - m_parser_state.m_var_scopes.take_last(); load_state(); };