mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibJS: Remove now unused VM::{set_,}last_value()
This was effectively replaced by correct use of completions, including UpdateEmpty semantics.
This commit is contained in:
parent
eb60d16549
commit
963b0f76cf
4 changed files with 0 additions and 16 deletions
|
@ -45,8 +45,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
|
||||||
|
|
||||||
TemporaryChange restore_executable { m_current_executable, &executable };
|
TemporaryChange restore_executable { m_current_executable, &executable };
|
||||||
|
|
||||||
vm().set_last_value(Badge<Interpreter> {}, {});
|
|
||||||
|
|
||||||
ExecutionContext execution_context(vm().heap());
|
ExecutionContext execution_context(vm().heap());
|
||||||
if (vm().execution_context_stack().is_empty()) {
|
if (vm().execution_context_stack().is_empty()) {
|
||||||
execution_context.this_value = &global_object();
|
execution_context.this_value = &global_object();
|
||||||
|
@ -137,8 +135,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vm().set_last_value(Badge<Interpreter> {}, accumulator());
|
|
||||||
|
|
||||||
OwnPtr<RegisterWindow> frame;
|
OwnPtr<RegisterWindow> frame;
|
||||||
if (!m_manually_entered_frames.last()) {
|
if (!m_manually_entered_frames.last()) {
|
||||||
frame = m_register_windows.take_last();
|
frame = m_register_windows.take_last();
|
||||||
|
|
|
@ -47,8 +47,6 @@ ThrowCompletionOr<Value> Interpreter::run(GlobalObject& global_object, const Pro
|
||||||
|
|
||||||
VM::InterpreterExecutionScope scope(*this);
|
VM::InterpreterExecutionScope scope(*this);
|
||||||
|
|
||||||
vm.set_last_value(Badge<Interpreter> {}, {});
|
|
||||||
|
|
||||||
ExecutionContext execution_context(heap());
|
ExecutionContext execution_context(heap());
|
||||||
execution_context.current_node = &program;
|
execution_context.current_node = &program;
|
||||||
execution_context.this_value = &global_object;
|
execution_context.this_value = &global_object;
|
||||||
|
@ -60,7 +58,6 @@ ThrowCompletionOr<Value> Interpreter::run(GlobalObject& global_object, const Pro
|
||||||
execution_context.is_strict_mode = program.is_strict_mode();
|
execution_context.is_strict_mode = program.is_strict_mode();
|
||||||
MUST(vm.push_execution_context(execution_context, global_object));
|
MUST(vm.push_execution_context(execution_context, global_object));
|
||||||
auto completion = program.execute(*this, global_object);
|
auto completion = program.execute(*this, global_object);
|
||||||
vm.set_last_value(Badge<Interpreter> {}, completion.value().value_or(js_undefined()));
|
|
||||||
|
|
||||||
// At this point we may have already run any queued promise jobs via on_call_stack_emptied,
|
// At this point we may have already run any queued promise jobs via on_call_stack_emptied,
|
||||||
// in which case this is a no-op.
|
// in which case this is a no-op.
|
||||||
|
|
|
@ -97,9 +97,6 @@ void VM::gather_roots(HashTable<Cell*>& roots)
|
||||||
|
|
||||||
roots.set(m_exception);
|
roots.set(m_exception);
|
||||||
|
|
||||||
if (m_last_value.is_cell())
|
|
||||||
roots.set(&m_last_value.as_cell());
|
|
||||||
|
|
||||||
auto gather_roots_from_execution_context_stack = [&roots](Vector<ExecutionContext*> const& stack) {
|
auto gather_roots_from_execution_context_stack = [&roots](Vector<ExecutionContext*> const& stack) {
|
||||||
for (auto& execution_context : stack) {
|
for (auto& execution_context : stack) {
|
||||||
if (execution_context->this_value.is_cell())
|
if (execution_context->this_value.is_cell())
|
||||||
|
|
|
@ -148,10 +148,6 @@ public:
|
||||||
|
|
||||||
ThrowCompletionOr<Value> resolve_this_binding(GlobalObject&);
|
ThrowCompletionOr<Value> resolve_this_binding(GlobalObject&);
|
||||||
|
|
||||||
Value last_value() const { return m_last_value; }
|
|
||||||
void set_last_value(Badge<Bytecode::Interpreter>, Value value) { m_last_value = value; }
|
|
||||||
void set_last_value(Badge<Interpreter>, Value value) { m_last_value = value; }
|
|
||||||
|
|
||||||
const StackInfo& stack_info() const { return m_stack_info; };
|
const StackInfo& stack_info() const { return m_stack_info; };
|
||||||
|
|
||||||
bool underscore_is_last_value() const { return m_underscore_is_last_value; }
|
bool underscore_is_last_value() const { return m_underscore_is_last_value; }
|
||||||
|
@ -261,8 +257,6 @@ private:
|
||||||
|
|
||||||
Vector<Vector<ExecutionContext*>> m_saved_execution_context_stacks;
|
Vector<Vector<ExecutionContext*>> m_saved_execution_context_stacks;
|
||||||
|
|
||||||
Value m_last_value;
|
|
||||||
|
|
||||||
StackInfo m_stack_info;
|
StackInfo m_stack_info;
|
||||||
|
|
||||||
HashMap<String, Symbol*> m_global_symbol_map;
|
HashMap<String, Symbol*> m_global_symbol_map;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue