diff --git a/Userland/Libraries/LibJS/Bytecode/Instruction.h b/Userland/Libraries/LibJS/Bytecode/Instruction.h index 91647cb433..fdf4c115e3 100644 --- a/Userland/Libraries/LibJS/Bytecode/Instruction.h +++ b/Userland/Libraries/LibJS/Bytecode/Instruction.h @@ -89,7 +89,6 @@ O(NewString) \ O(NewTypeError) \ O(Not) \ - O(PushDeclarativeEnvironment) \ O(PutById) \ O(PutByIdWithThis) \ O(PutByValue) \ diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 87fc27342d..441d8eb771 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -1038,14 +1038,6 @@ ThrowCompletionOr ContinuePendingUnwind::execute_impl(Bytecode::Interprete __builtin_unreachable(); } -ThrowCompletionOr PushDeclarativeEnvironment::execute_impl(Bytecode::Interpreter& interpreter) const -{ - auto environment = interpreter.vm().heap().allocate_without_realm(interpreter.vm().lexical_environment()); - interpreter.vm().running_execution_context().lexical_environment = environment; - interpreter.vm().running_execution_context().variable_environment = environment; - return {}; -} - ThrowCompletionOr Yield::execute_impl(Bytecode::Interpreter& interpreter) const { auto yielded_value = interpreter.accumulator().value_or(js_undefined()); @@ -1592,21 +1584,6 @@ DeprecatedString ContinuePendingUnwind::to_deprecated_string_impl(Bytecode::Exec return DeprecatedString::formatted("ContinuePendingUnwind resume:{}", m_resume_target); } -DeprecatedString PushDeclarativeEnvironment::to_deprecated_string_impl(Bytecode::Executable const& executable) const -{ - StringBuilder builder; - builder.append("PushDeclarativeEnvironment"sv); - if (!m_variables.is_empty()) { - builder.append(" {"sv); - Vector names; - for (auto& it : m_variables) - names.append(executable.get_string(it.key)); - builder.append('}'); - builder.join(", "sv, names); - } - return builder.to_deprecated_string(); -} - DeprecatedString Yield::to_deprecated_string_impl(Bytecode::Executable const&) const { if (m_continuation_label.has_value()) diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h index 7a67528c1b..8b004c4144 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.h +++ b/Userland/Libraries/LibJS/Bytecode/Op.h @@ -1319,21 +1319,6 @@ private: Label m_continuation_label; }; -class PushDeclarativeEnvironment final : public Instruction { -public: - explicit PushDeclarativeEnvironment(HashMap variables) - : Instruction(Type::PushDeclarativeEnvironment, sizeof(*this)) - , m_variables(move(variables)) - { - } - - ThrowCompletionOr execute_impl(Bytecode::Interpreter&) const; - DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; - -private: - HashMap m_variables; -}; - class GetIterator final : public Instruction { public: GetIterator(IteratorHint hint = IteratorHint::Sync)