ArkScript
A small, lisp-inspired, functional scripting language
Ark::VM Class Referencefinal

The ArkScript virtual machine, executing ArkScript bytecode. More...

#include <VM.hpp>

Collaboration diagram for Ark::VM:
[legend]

Public Member Functions

 VM (State &state) noexcept
 Construct a new vm t object.
 
int run (bool fail_with_exception=false)
 Run the bytecode held in the state.
 
Valueoperator[] (const std::string &name) noexcept
 Retrieve a value from the virtual machine, given its symbol name.
 
template<typename... Args>
Value call (const std::string &name, Args &&... args)
 Call a function from ArkScript, by giving it arguments.
 
Value resolve (internal::ExecutionContext *context, const std::vector< Value > &n)
 Resolves a function call (called by plugins and builtins)
 
void exit (int code) noexcept
 Ask the VM to exit with a given exit code.
 
internal::ExecutionContextgetDefaultContext ()
 Return a pointer to the first execution context, for the main thread of the app.
 
internal::ExecutionContextcreateAndGetContext ()
 Create an execution context and returns it.
 
void deleteContext (internal::ExecutionContext *ec)
 Free a given execution context.
 
internal::FuturecreateFuture (std::vector< Value > &args)
 Create a Future object from a function and its arguments and return a managed pointer to it.
 
void deleteFuture (internal::Future *f)
 Free a given future.
 
bool forceReloadPlugins () const
 Used by the REPL to force reload all the plugins and their bound methods.
 

Static Public Member Functions

static void throwVMError (internal::ErrorKind kind, const std::string &message)
 Throw a VM error message.
 

Private Member Functions

int safeRun (internal::ExecutionContext &context, std::size_t untilFrameCount=0, bool fail_with_exception=false)
 Run ArkScript bytecode inside a try catch to retrieve all the exceptions and display a stack trace if needed.
 
void init () noexcept
 Initialize the VM according to the parameters.
 
ValueloadSymbol (uint16_t id, internal::ExecutionContext &context)
 Load a symbol by its id in the current context. Performs a lookup in the scope stack, in reverse order.
 
ValueloadSymbolFromIndex (uint16_t index, internal::ExecutionContext &context)
 Load a symbol by its (reversed) index in the current scope.
 
ValueloadConstAsPtr (uint16_t id) const
 Load a constant from the constant table by its id.
 
void store (uint16_t id, const Value *val, internal::ExecutionContext &context)
 Create a new symbol with an associated value in the current scope.
 
void setVal (uint16_t id, const Value *val, internal::ExecutionContext &context)
 Change the value of a symbol given its identifier.
 
Value getField (Value *closure, uint16_t id, internal::ExecutionContext &context)
 
Value createList (std::size_t count, internal::ExecutionContext &context)
 
void listAppendInPlace (Value *list, std::size_t count, internal::ExecutionContext &context)
 
Valuepop (internal::ExecutionContext &context)
 Pop a value from the stack.
 
ValuepeekAndResolveAsPtr (internal::ExecutionContext &context)
 Return a pointer to the top of the stack without consuming it, and resolve it if possible.
 
void push (const Value &value, internal::ExecutionContext &context)
 Push a value on the stack.
 
void push (Value &&value, internal::ExecutionContext &context)
 Push a value on the stack.
 
void push (Value *valptr, internal::ExecutionContext &context)
 Push a value on the stack as a reference.
 
ValuepopAndResolveAsPtr (internal::ExecutionContext &context)
 Pop a value from the stack and resolve it if possible, then return it.
 
ValuefindNearestVariable (uint16_t id, internal::ExecutionContext &context) noexcept
 Find the nearest variable of a given id.
 
void returnFromFuncCall (internal::ExecutionContext &context)
 Destroy the current frame and get back to the previous one, resuming execution.
 
void loadPlugin (uint16_t id, internal::ExecutionContext &context)
 Load a plugin from a constant id.
 
uint16_t findNearestVariableIdWithValue (const Value &value, internal::ExecutionContext &context) const noexcept
 Find the nearest variable id with a given value.
 
void throwArityError (std::size_t passed_arg_count, std::size_t expected_arg_count, internal::ExecutionContext &context)
 
void showBacktraceWithException (const std::exception &e, internal::ExecutionContext &context)
 
std::optional< internal::InstLocfindSourceLocation (std::size_t ip, std::size_t pp)
 Find the nearest source location information given instruction and page pointers.
 
std::string debugShowSource ()
 
void backtrace (internal::ExecutionContext &context, std::ostream &os=std::cout, bool colorize=true)
 Display a backtrace when the VM encounter an exception.
 
void call (internal::ExecutionContext &context, uint16_t argc, Value *function_ptr=nullptr, internal::PageAddr_t or_address=0)
 Function called when the CALL instruction is met in the bytecode.
 
void callBuiltin (internal::ExecutionContext &context, const Value &builtin, uint16_t argc, bool remove_return_address=true)
 Builtin called when the CALL_BUILTIN instruction is met in the bytecode.
 

Private Attributes

Statem_state
 
std::vector< std::unique_ptr< internal::ExecutionContext > > m_execution_contexts
 
int m_exit_code
 VM exit code, defaults to 0. Can be changed through sys:exit
 
bool m_running
 
std::mutex m_mutex
 
std::vector< std::shared_ptr< internal::SharedLibrary > > m_shared_lib_objects
 
std::vector< std::unique_ptr< internal::Future > > m_futures
 Storing the promises while we are resolving them.
 
Value m_no_value = internal::Builtins::nil
 
Value m_undefined_value
 

Friends

class Value
 
class internal::Closure
 
class Repl
 

Detailed Description

The ArkScript virtual machine, executing ArkScript bytecode.

Definition at line 45 of file VM.hpp.

Constructor & Destructor Documentation

◆ VM()

Ark::VM::VM ( State & state)
explicitnoexcept

Construct a new vm t object.

Parameters
statea reference to an ArkScript state, which can be reused for multiple VMs

Definition at line 118 of file VM.cpp.

Member Function Documentation

◆ backtrace()

◆ call() [1/2]

template<typename... Args>
Value Ark::VM::call ( const std::string & name,
Args &&... args )

Call a function from ArkScript, by giving it arguments.

Template Parameters
Args
Parameters
namethe function name in the ArkScript code
argsC++ argument list, converted to internal representation
Returns
Value

Definition at line 6 of file VM.hpp.

Referenced by safeRun().

◆ call() [2/2]

void Ark::VM::call ( internal::ExecutionContext & context,
uint16_t argc,
Value * function_ptr = nullptr,
internal::PageAddr_t or_address = 0 )
inlineprivate

Function called when the CALL instruction is met in the bytecode.

Parameters
context
argcnumber of arguments already sent
function_ptroptional pointer to the function to call. If not provided, obtain it from the stack (unless or_address is not 0)
or_addressoptional page address, used if non-zero and function_ptr is nullptr

Definition at line 229 of file VM.hpp.

◆ callBuiltin()

void Ark::VM::callBuiltin ( internal::ExecutionContext & context,
const Value & builtin,
uint16_t argc,
bool remove_return_address = true )
inlineprivate

Builtin called when the CALL_BUILTIN instruction is met in the bytecode.

Parameters
context
builtinthe builtin to call
argcnumber of arguments already sent
remove_return_addressremove the return address pushed by the compiler

Definition at line 340 of file VM.hpp.

Referenced by safeRun().

◆ createAndGetContext()

ExecutionContext * Ark::VM::createAndGetContext ( )

Create an execution context and returns it.

This method is thread-safe VM wise.

Returns
internal::ExecutionContext*

Definition at line 343 of file VM.cpp.

References Ark::internal::ExecutionContext::locals, m_execution_contexts, m_mutex, Ark::internal::ExecutionContext::scopes_storage, and Ark::internal::ExecutionContext::stacked_closure_scopes.

Referenced by createFuture().

◆ createFuture()

Future * Ark::VM::createFuture ( std::vector< Value > & args)

Create a Future object from a function and its arguments and return a managed pointer to it.

This method is thread-safe VM wise.

Parameters
args
Returns
internal::Future*

Definition at line 378 of file VM.cpp.

References createAndGetContext(), Ark::internal::ExecutionContext::last_symbol, m_execution_contexts, m_futures, and m_mutex.

◆ createList()

Value Ark::VM::createList ( std::size_t count,
internal::ExecutionContext & context )
private

Definition at line 205 of file VM.cpp.

References Ark::List, Ark::Value::list(), popAndResolveAsPtr(), and Ark::Value::push_back().

Referenced by safeRun().

◆ debugShowSource()

std::string Ark::VM::debugShowSource ( )
private

Definition at line 2010 of file VM.cpp.

References findSourceLocation(), m_execution_contexts, Ark::State::m_filenames, and m_state.

◆ deleteContext()

void Ark::VM::deleteContext ( internal::ExecutionContext * ec)

Free a given execution context.

This method is thread-safe VM wise.

Parameters
ec

Definition at line 364 of file VM.cpp.

References m_execution_contexts, and m_mutex.

◆ deleteFuture()

void Ark::VM::deleteFuture ( internal::Future * f)

Free a given future.

This method is thread-safe VM wise.

Parameters
f

Definition at line 393 of file VM.cpp.

References m_futures, and m_mutex.

◆ exit()

void Ark::VM::exit ( int code)
noexcept

Ask the VM to exit with a given exit code.

Parameters
codean exit code

Definition at line 337 of file VM.cpp.

◆ findNearestVariable()

Value * Ark::VM::findNearestVariable ( uint16_t id,
internal::ExecutionContext & context )
inlineprivatenoexcept

Find the nearest variable of a given id.

Parameters
idthe id to find
context
Returns
Value*

Definition at line 212 of file VM.hpp.

Referenced by safeRun().

◆ findNearestVariableIdWithValue()

uint16_t Ark::VM::findNearestVariableIdWithValue ( const Value & value,
internal::ExecutionContext & context ) const
privatenoexcept

Find the nearest variable id with a given value.

Only used to display the call stack traceback

Parameters
valuethe value to search for
context
Returns
uint16_t

Definition at line 1905 of file VM.cpp.

Referenced by backtrace().

◆ findSourceLocation()

std::optional< InstLoc > Ark::VM::findSourceLocation ( std::size_t ip,
std::size_t pp )
private

Find the nearest source location information given instruction and page pointers.

Parameters
ip
pp
Returns
std::optional<InstLoc>

Definition at line 1987 of file VM.cpp.

References Ark::State::m_inst_locations, and m_state.

Referenced by backtrace(), and debugShowSource().

◆ forceReloadPlugins()

bool Ark::VM::forceReloadPlugins ( ) const
nodiscard

Used by the REPL to force reload all the plugins and their bound methods.

Returns
true on success
false if one or more plugins couldn't be reloaded

Definition at line 407 of file VM.cpp.

References m_execution_contexts, m_shared_lib_objects, m_state, Ark::State::m_symbols, and Ark::mapping::name.

Referenced by Ark::Repl::run().

◆ getDefaultContext()

internal::ExecutionContext * Ark::VM::getDefaultContext ( )
inline

Return a pointer to the first execution context, for the main thread of the app.

Returns
internal::ExecutionContext*

Definition at line 106 of file VM.hpp.

◆ getField()

◆ init()

◆ listAppendInPlace()

void Ark::VM::listAppendInPlace ( Value * list,
std::size_t count,
internal::ExecutionContext & context )
private

Definition at line 217 of file VM.cpp.

References Ark::Any, Ark::List, popAndResolveAsPtr(), Ark::Value::push_back(), and Ark::Value::valueType().

Referenced by safeRun().

◆ loadConstAsPtr()

Value * Ark::VM::loadConstAsPtr ( uint16_t id) const
inlinenodiscardprivate

Load a constant from the constant table by its id.

Parameters
id
Returns
Value*

Definition at line 124 of file VM.hpp.

Referenced by safeRun().

◆ loadPlugin()

void Ark::VM::loadPlugin ( uint16_t id,
internal::ExecutionContext & context )
private

◆ loadSymbol()

Value * Ark::VM::loadSymbol ( uint16_t id,
internal::ExecutionContext & context )
inlinenodiscardprivate

Load a symbol by its id in the current context. Performs a lookup in the scope stack, in reverse order.

Parameters
idsymbol id
context
Returns
Value* nullptr if the symbol could not be loaded

Definition at line 99 of file VM.hpp.

Referenced by safeRun().

◆ loadSymbolFromIndex()

Value * Ark::VM::loadSymbolFromIndex ( uint16_t index,
internal::ExecutionContext & context )
inlinenodiscardprivate

Load a symbol by its (reversed) index in the current scope.

Parameters
indexindex of the symbol to load, starting from the end
context
Returns
Value*

Definition at line 114 of file VM.hpp.

Referenced by safeRun().

◆ operator[]()

Value & Ark::VM::operator[] ( const std::string & name)
noexcept

Retrieve a value from the virtual machine, given its symbol name.

Parameters
namethe name of the variable to retrieve
Returns
Value&

Definition at line 234 of file VM.cpp.

References Ark::internal::Builtins::nil.

◆ peekAndResolveAsPtr()

Value * Ark::VM::peekAndResolveAsPtr ( internal::ExecutionContext & context)
inlineprivate

Return a pointer to the top of the stack without consuming it, and resolve it if possible.

Parameters
context
Returns
Value*

Definition at line 171 of file VM.hpp.

Referenced by safeRun().

◆ pop()

Value * Ark::VM::pop ( internal::ExecutionContext & context)
inlineprivate

Pop a value from the stack.

Parameters
context
Returns
Value*

Definition at line 161 of file VM.hpp.

Referenced by backtrace(), and safeRun().

◆ popAndResolveAsPtr()

Value * Ark::VM::popAndResolveAsPtr ( internal::ExecutionContext & context)
inlineprivate

Pop a value from the stack and resolve it if possible, then return it.

Parameters
context
Returns
Value*

Definition at line 202 of file VM.hpp.

Referenced by backtrace(), createList(), listAppendInPlace(), and safeRun().

◆ push() [1/3]

void Ark::VM::push ( const Value & value,
internal::ExecutionContext & context )
inlineprivate

Push a value on the stack.

Parameters
value
context

Definition at line 183 of file VM.hpp.

Referenced by safeRun().

◆ push() [2/3]

void Ark::VM::push ( Value && value,
internal::ExecutionContext & context )
inlineprivate

Push a value on the stack.

Parameters
value
context

Definition at line 189 of file VM.hpp.

◆ push() [3/3]

void Ark::VM::push ( Value * valptr,
internal::ExecutionContext & context )
inlineprivate

Push a value on the stack as a reference.

Parameters
valptr
context

Definition at line 195 of file VM.hpp.

◆ resolve()

Value Ark::VM::resolve ( internal::ExecutionContext * context,
const std::vector< Value > & n )
inline

Resolves a function call (called by plugins and builtins)

Parameters
contextthe execution context to use
nthe function and its arguments
Returns
Value

Definition at line 61 of file VM.hpp.

◆ returnFromFuncCall()

void Ark::VM::returnFromFuncCall ( internal::ExecutionContext & context)
inlineprivate

Destroy the current frame and get back to the previous one, resuming execution.

Doing the job nobody wants to do: cleaning after everyone has finished to play. This is a sort of primitive garbage collector

Parameters
context

Definition at line 222 of file VM.hpp.

Referenced by backtrace(), safeRun(), and throwArityError().

◆ run()

int Ark::VM::run ( bool fail_with_exception = false)

Run the bytecode held in the state.

Parameters
fail_with_exceptionthrow if true, display a stacktrace if false
Returns
int the exit code (default to 0 if no error)

Definition at line 443 of file VM.cpp.

References init(), m_execution_contexts, m_exit_code, and safeRun().

Referenced by __attribute__(), and main().

◆ safeRun()

int Ark::VM::safeRun ( internal::ExecutionContext & context,
std::size_t untilFrameCount = 0,
bool fail_with_exception = false )
private

Run ArkScript bytecode inside a try catch to retrieve all the exceptions and display a stack trace if needed.

Parameters
context
untilFrameCountthe frame count we need to reach before stopping the VM
fail_with_exceptionthrow if true, display a stacktrace if false
Returns
int the exit code

Definition at line 450 of file VM.cpp.

References Ark::internal::ADD, Ark::Any, Ark::internal::APPEND, Ark::internal::APPEND_IN_PLACE, Ark::internal::APPEND_IN_PLACE_SYM, Ark::internal::APPEND_IN_PLACE_SYM_INDEX, Ark::internal::ASSERT, Ark::internal::AT, Ark::helper::at(), Ark::internal::AT_AT, Ark::internal::AT_SYM_INDEX_SYM_INDEX, Ark::internal::AT_SYM_SYM, backtrace(), Ark::internal::BUILTIN, Ark::internal::Builtins::builtins, Ark::internal::CALL, call(), Ark::internal::CALL_BUILTIN, Ark::internal::CALL_BUILTIN_WITHOUT_RETURN_ADDRESS, Ark::internal::CALL_CURRENT_PAGE, Ark::internal::CALL_SYMBOL, callBuiltin(), Ark::internal::CAPTURE, Ark::internal::CHECK_TYPE_OF, Ark::internal::CHECK_TYPE_OF_BY_INDEX, Ark::Closure, Ark::internal::CONCAT, Ark::internal::CONCAT_IN_PLACE, Ark::Value::constList(), Ark::internal::CREATE_SCOPE, createList(), Ark::internal::DECREMENT, Ark::internal::DECREMENT_BY_INDEX, Ark::internal::DECREMENT_STORE, Ark::internal::DEL, Ark::Error::details(), DISPATCH, Ark::internal::DIV, Ark::internal::EMPTY, Ark::internal::EQ, Ark::internal::EQ_CONST_JUMP_IF_TRUE, Ark::internal::EQ_SYM_INDEX_JUMP_IF_TRUE, Ark::internal::Builtins::falseSym, Ark::internal::ExecutionContext::fc, findNearestVariable(), Ark::internal::GE, Ark::internal::GET_CURRENT_PAGE_ADDR, Ark::internal::GET_FIELD, Ark::internal::GET_FIELD_FROM_SYMBOL, Ark::internal::GET_FIELD_FROM_SYMBOL_INDEX, getField(), GOTO_HALT, Ark::internal::GT, Ark::internal::GT_CONST_JUMP_IF_FALSE, Ark::internal::GT_CONST_JUMP_IF_TRUE, Ark::internal::GT_SYM_JUMP_IF_FALSE, Ark::internal::HALT, Ark::internal::HASFIELD, Ark::internal::HEAD, Ark::helper::head(), Ark::internal::INCREMENT, Ark::internal::INCREMENT_BY_INDEX, Ark::internal::INCREMENT_STORE, Ark::InstPtr, internal::Closure, Ark::internal::ExecutionContext::ip, Ark::Utils::isDouble(), Ark::Value::isIndexable(), Ark::internal::ISNIL, Ark::internal::JUMP, Ark::internal::ExecutionContext::last_symbol, Ark::internal::LE, Ark::internal::LEN, Ark::internal::LIST, Ark::List, Ark::Value::list(), listAppendInPlace(), Ark::internal::LOAD_CONST, Ark::internal::LOAD_CONST_LOAD_CONST, Ark::internal::LOAD_CONST_SET_VAL, Ark::internal::LOAD_CONST_STORE, Ark::internal::LOAD_SYMBOL, Ark::internal::LOAD_SYMBOL_BY_INDEX, loadConstAsPtr(), loadPlugin(), loadSymbol(), loadSymbolFromIndex(), Ark::internal::ExecutionContext::locals, Ark::internal::LT, Ark::internal::LT_CONST_JUMP_IF_FALSE, Ark::internal::LT_CONST_JUMP_IF_TRUE, Ark::internal::LT_SYM_JUMP_IF_FALSE, Ark::State::m_constants, m_exit_code, m_running, m_state, Ark::State::m_symbols, Ark::internal::MAKE_CLOSURE, Ark::internal::MOD, Ark::internal::MUL, Ark::internal::NEQ, Ark::internal::NEQ_CONST_JUMP_IF_TRUE, Ark::internal::NEQ_SYM_JUMP_IF_FALSE, Ark::internal::Builtins::nil, Ark::internal::NOP, Ark::internal::NOT, Ark::Number, Ark::Value::number(), Ark::Value::pageAddr(), peekAndResolveAsPtr(), Ark::internal::PLUGIN, Ark::internal::POP, pop(), Ark::internal::POP_JUMP_IF_FALSE, Ark::internal::POP_JUMP_IF_TRUE, Ark::internal::POP_LIST, Ark::internal::POP_LIST_IN_PLACE, Ark::internal::POP_SCOPE, popAndResolveAsPtr(), Ark::internal::ExecutionContext::pp, push(), Ark::internal::PUSH_RETURN_ADDRESS, Ark::Value::refClosure(), Ark::Reference, Ark::Value::reference(), Ark::internal::Closure::refScope(), Ark::internal::RESET_SCOPE_JUMP, Ark::internal::RET, returnFromFuncCall(), Ark::internal::ExecutionContext::saved_scope, Ark::internal::ExecutionContext::scopes_storage, Ark::internal::SET_AT_2_INDEX, Ark::internal::SET_AT_INDEX, Ark::internal::SET_VAL, Ark::internal::SET_VAL_FROM, Ark::internal::SET_VAL_FROM_INDEX, Ark::internal::SET_VAL_HEAD, Ark::internal::SET_VAL_HEAD_BY_INDEX, Ark::internal::SET_VAL_TAIL, Ark::internal::SET_VAL_TAIL_BY_INDEX, setVal(), Ark::internal::SHORTCIRCUIT_AND, Ark::internal::SHORTCIRCUIT_OR, showBacktraceWithException(), Ark::internal::STORE, store(), Ark::internal::STORE_FROM, Ark::internal::STORE_FROM_INDEX, Ark::internal::STORE_HEAD, Ark::internal::STORE_HEAD_BY_INDEX, Ark::internal::STORE_LIST, Ark::internal::STORE_TAIL, Ark::internal::STORE_TAIL_BY_INDEX, Ark::String, Ark::Value::string(), Ark::Value::stringRef(), Ark::internal::SUB, Ark::internal::TAIL, Ark::helper::tail(), TARGET, throwVMError(), Ark::internal::TO_NUM, Ark::internal::TO_STR, Ark::Value::toString(), Ark::internal::Builtins::trueSym, Ark::internal::TYPE, Ark::types_to_str, UNPACK_ARGS, Ark::User, Value, and Ark::Value::valueType().

Referenced by Ark::Repl::run(), and run().

◆ setVal()

void Ark::VM::setVal ( uint16_t id,
const Value * val,
internal::ExecutionContext & context )
inlineprivate

Change the value of a symbol given its identifier.

Parameters
id
val
context

Definition at line 139 of file VM.hpp.

Referenced by safeRun().

◆ showBacktraceWithException()

void Ark::VM::showBacktraceWithException ( const std::exception & e,
internal::ExecutionContext & context )
private

Definition at line 1972 of file VM.cpp.

References backtrace(), and m_exit_code.

Referenced by safeRun().

◆ store()

void Ark::VM::store ( uint16_t id,
const Value * val,
internal::ExecutionContext & context )
inlineprivate

Create a new symbol with an associated value in the current scope.

Parameters
id
val
context

Definition at line 129 of file VM.hpp.

Referenced by safeRun().

◆ throwArityError()

◆ throwVMError()

void Ark::VM::throwVMError ( internal::ErrorKind kind,
const std::string & message )
static

Throw a VM error message.

Parameters
kindtype of VM error
message

Definition at line 438 of file VM.cpp.

References Ark::internal::errorKinds.

Referenced by Ark::helper::at(), getField(), loadPlugin(), safeRun(), and throwArityError().

Friends And Related Symbol Documentation

◆ internal::Closure

friend class internal::Closure
friend

Definition at line 161 of file VM.hpp.

Referenced by getField(), and safeRun().

◆ Repl

friend class Repl
friend

Definition at line 162 of file VM.hpp.

◆ Value

friend class Value
friend

Definition at line 160 of file VM.hpp.

Referenced by backtrace(), getField(), safeRun(), and throwArityError().

Member Data Documentation

◆ m_execution_contexts

std::vector<std::unique_ptr<internal::ExecutionContext> > Ark::VM::m_execution_contexts
private

◆ m_exit_code

int Ark::VM::m_exit_code
private

VM exit code, defaults to 0. Can be changed through sys:exit

Definition at line 167 of file VM.hpp.

Referenced by init(), run(), safeRun(), and showBacktraceWithException().

◆ m_futures

std::vector<std::unique_ptr<internal::Future> > Ark::VM::m_futures
private

Storing the promises while we are resolving them.

Definition at line 171 of file VM.hpp.

Referenced by createFuture(), and deleteFuture().

◆ m_mutex

std::mutex Ark::VM::m_mutex
private

Definition at line 169 of file VM.hpp.

Referenced by createAndGetContext(), createFuture(), deleteContext(), and deleteFuture().

◆ m_no_value

Value Ark::VM::m_no_value = internal::Builtins::nil
private

Definition at line 174 of file VM.hpp.

◆ m_running

bool Ark::VM::m_running
private

Definition at line 168 of file VM.hpp.

Referenced by safeRun().

◆ m_shared_lib_objects

std::vector<std::shared_ptr<internal::SharedLibrary> > Ark::VM::m_shared_lib_objects
private

Definition at line 170 of file VM.hpp.

Referenced by forceReloadPlugins(), init(), and loadPlugin().

◆ m_state

State& Ark::VM::m_state
private

◆ m_undefined_value

Value Ark::VM::m_undefined_value
private

Definition at line 175 of file VM.hpp.


The documentation for this class was generated from the following files: