![]() |
ArkScript
A small, fast, functional and scripting language for video games
|
#include <ExecutionContext.hpp>
Public Member Functions | |
ExecutionContext () noexcept | |
Public Attributes | |
std::size_t | ip {} |
Instruction pointer. | |
std::size_t | pp {} |
Page pointer. | |
uint16_t | sp {} |
Stack pointer. | |
uint16_t | fc {} |
Frame count. | |
uint16_t | last_symbol |
const bool | primary |
Tells if the current ExecutionContext is the primary one or not. | |
std::optional< Scope > | saved_scope {} |
Scope created by CAPTURE <x> instructions, used by the MAKE_CLOSURE instruction. | |
std::vector< Scope > | locals {} |
std::vector< std::shared_ptr< Scope > > | stacked_closure_scopes {} |
Stack the closure scopes to keep the closure alive as long as we are calling them. | |
std::array< Value, VMStackSize > | stack {} |
Static Public Attributes | |
static unsigned | Count = 0 |
Definition at line 30 of file ExecutionContext.hpp.
|
inlinenoexcept |
Definition at line 46 of file ExecutionContext.hpp.
References Count.
|
inlinestatic |
Definition at line 32 of file ExecutionContext.hpp.
Referenced by ExecutionContext().
uint16_t Ark::internal::ExecutionContext::fc {} |
Frame count.
Definition at line 37 of file ExecutionContext.hpp.
Referenced by Ark::VM::init(), and Ark::VM::safeRun().
std::size_t Ark::internal::ExecutionContext::ip {} |
Instruction pointer.
Definition at line 34 of file ExecutionContext.hpp.
Referenced by Ark::VM::safeRun().
uint16_t Ark::internal::ExecutionContext::last_symbol |
Definition at line 38 of file ExecutionContext.hpp.
Referenced by Ark::VM::safeRun().
std::vector<Scope> Ark::internal::ExecutionContext::locals {} |
Definition at line 42 of file ExecutionContext.hpp.
Referenced by Ark::VM::createAndGetContext(), Ark::VM::init(), Ark::VM::loadPlugin(), and Ark::VM::safeRun().
std::size_t Ark::internal::ExecutionContext::pp {} |
const bool Ark::internal::ExecutionContext::primary |
Tells if the current ExecutionContext is the primary one or not.
Definition at line 39 of file ExecutionContext.hpp.
std::optional<Scope> Ark::internal::ExecutionContext::saved_scope {} |
Scope created by CAPTURE <x> instructions, used by the MAKE_CLOSURE instruction.
Definition at line 41 of file ExecutionContext.hpp.
Referenced by Ark::VM::init(), and Ark::VM::safeRun().
uint16_t Ark::internal::ExecutionContext::sp {} |
Stack pointer.
Definition at line 36 of file ExecutionContext.hpp.
Referenced by Ark::VM::init(), and Ark::VM::safeRun().
std::array<Value, VMStackSize> Ark::internal::ExecutionContext::stack {} |
Definition at line 44 of file ExecutionContext.hpp.
Referenced by Ark::VM::safeRun().
std::vector<std::shared_ptr<Scope> > Ark::internal::ExecutionContext::stacked_closure_scopes {} |
Stack the closure scopes to keep the closure alive as long as we are calling them.
Definition at line 43 of file ExecutionContext.hpp.
Referenced by Ark::VM::createAndGetContext(), and Ark::VM::init().