Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
PhasorRT.h File Reference
#include <stddef.h>
Include dependency graph for PhasorRT.h:

Go to the source code of this file.

Macros

#define PHASOR_API

Functions

PHASOR_API void exec (const unsigned char embeddedBytecode[], size_t embeddedBytecodeSize, const char *moduleName, const void *nativeFunctionsVector, const int argc, const char **argv)
 Executes pre-compiled Phasor bytecode.
PHASOR_API void jitExec (const char *script, const char *moduleName, const void *nativeFunctionsVector)
 Executes a Phasor script using Just-In-Time (JIT) compilation.
PHASOR_API void executeScript (void *vm, const char *script)
 Executes a Phasor script within an existing VM instance.

Macro Definition Documentation

◆ PHASOR_API

#define PHASOR_API

Definition at line 19 of file PhasorRT.h.

Function Documentation

◆ exec()

PHASOR_API void exec ( const unsigned char embeddedBytecode[],
size_t embeddedBytecodeSize,
const char * moduleName,
const void * nativeFunctionsVector,
const int argc,
const char ** argv )

Executes pre-compiled Phasor bytecode.

Parameters
embeddedBytecodeAn array of unsigned chars containing the Phasor bytecode.
embeddedBytecodeSizeThe size of the bytecode array.
moduleNameThe name of the module, used for error reporting.
nativeFunctionsVectorA pointer to a vector of pairs, where each pair contains a function name and a function pointer.
argcThe number of command-line arguments.
argvAn array of strings representing the command-line arguments.

Definition at line 37 of file NativeRuntime_library.cpp.

Here is the call graph for this function:

◆ executeScript()

PHASOR_API void executeScript ( void * vm,
const char * script )

Executes a Phasor script within an existing VM instance.

Parameters
vmA pointer to the Phasor VM instance.
scriptA string containing the Phasor script to execute.

Definition at line 97 of file NativeRuntime_library.cpp.

Here is the call graph for this function:

◆ jitExec()

PHASOR_API void jitExec ( const char * script,
const char * moduleName,
const void * nativeFunctionsVector )

Executes a Phasor script using Just-In-Time (JIT) compilation.

Parameters
scriptA string containing the Phasor script to execute.
moduleNameThe name of the module, used for error reporting.
nativeFunctionsVectorA pointer to a vector of pairs, where each pair contains a function name and a function pointer.

Definition at line 68 of file NativeRuntime_library.cpp.

Here is the call graph for this function: