|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Result of one bytecode execution request. More...
#include <Bytecode_Interpreter.H>
Public Member Functions | |
| bool | ok () const noexcept |
| Returns whether execution completed without runtime errors. | |
Static Public Member Functions | |
| static Compiler_Bytecode_Execution_Result | returned (const Compiler_Bytecode_Value &value, const size_t executed_instructions) |
| Builds a successful return result. | |
| static Compiler_Bytecode_Execution_Result | halted (const Compiler_Bytecode_Value &value, const size_t executed_instructions) |
| Builds a successful halt result. | |
| static Compiler_Bytecode_Execution_Result | runtime_error (const Compiler_Bytecode_Runtime_Error &error, const size_t executed_instructions) |
| Builds a failed runtime result. | |
Public Attributes | |
| Compiler_Bytecode_Completion_Kind | kind = Compiler_Bytecode_Completion_Kind::Halted |
| Final completion category. | |
| Compiler_Bytecode_Value | value = Compiler_Bytecode_Value::make_unit() |
Produced return value or final Unit. | |
| Compiler_Bytecode_Runtime_Error | error |
Structured failure when kind == Runtime_Error. | |
| size_t | executed_instructions = 0 |
| Number of bytecode instructions observed by the VM. | |
Result of one bytecode execution request.
Definition at line 262 of file Bytecode_Interpreter.H.
|
inlinestatic |
Builds a successful halt result.
Definition at line 290 of file Bytecode_Interpreter.H.
References executed_instructions, Aleph::Halted, kind, and value.
Referenced by Aleph::Compiler_Bytecode_VM::complete_current_frame(), and Aleph::Compiler_Bytecode_VM::execute_loop().
|
inlinenoexcept |
Returns whether execution completed without runtime errors.
Definition at line 271 of file Bytecode_Interpreter.H.
References kind, and Aleph::Runtime_Error.
Referenced by Aleph::Compiler_Bytecode_VM::execute_loop().
|
inlinestatic |
Builds a successful return result.
Definition at line 278 of file Bytecode_Interpreter.H.
References executed_instructions, kind, Aleph::Returned, and value.
Referenced by Aleph::Compiler_Bytecode_VM::complete_current_frame().
|
inlinestatic |
Builds a failed runtime result.
Definition at line 302 of file Bytecode_Interpreter.H.
References error, executed_instructions, kind, Aleph::Compiler_Bytecode_Value::make_invalid(), Aleph::Runtime_Error, and value.
Referenced by Aleph::Compiler_Bytecode_VM::make_error().
| Compiler_Bytecode_Runtime_Error Aleph::Compiler_Bytecode_Execution_Result::error |
Structured failure when kind == Runtime_Error.
Definition at line 266 of file Bytecode_Interpreter.H.
Referenced by Aleph::Compiler_Bytecode_VM::execute_host_call(), and runtime_error().
| size_t Aleph::Compiler_Bytecode_Execution_Result::executed_instructions = 0 |
Number of bytecode instructions observed by the VM.
Definition at line 267 of file Bytecode_Interpreter.H.
Referenced by halted(), returned(), and runtime_error().
| Compiler_Bytecode_Completion_Kind Aleph::Compiler_Bytecode_Execution_Result::kind = Compiler_Bytecode_Completion_Kind::Halted |
Final completion category.
Definition at line 264 of file Bytecode_Interpreter.H.
Referenced by halted(), ok(), returned(), and runtime_error().
| Compiler_Bytecode_Value Aleph::Compiler_Bytecode_Execution_Result::value = Compiler_Bytecode_Value::make_unit() |
Produced return value or final Unit.
Definition at line 265 of file Bytecode_Interpreter.H.
Referenced by halted(), returned(), and runtime_error().