refactor: remove ReturnValue instruction
This commit is contained in:
@@ -170,11 +170,6 @@ enum class instruction_t : byte {
|
||||
* @brief Pops the current call frame.
|
||||
*/
|
||||
Return,
|
||||
|
||||
/**
|
||||
* @brief Pops the current call frame and pushes the first element from the previous stack onto the new stack.
|
||||
*/
|
||||
ReturnValue,
|
||||
};
|
||||
|
||||
struct instruction {
|
||||
|
||||
@@ -297,11 +297,6 @@ void executor::step() {
|
||||
pop_frame();
|
||||
if (m_frames.empty()) m_flags = m_flags | executor_flags::Done;
|
||||
} break;
|
||||
case instruction_t::ReturnValue: {
|
||||
auto value = pop_thing();
|
||||
pop_frame();
|
||||
push_thing(std::move(value));
|
||||
} break;
|
||||
case instruction_t::PushConstant: throw std::runtime_error("unimplemented");
|
||||
default: throw std::runtime_error("unknown instruction");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user