Phasor 3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
PhasorRT.h
Go to the documentation of this file.
1#ifndef PHASOR_RT_H
2#define PHASOR_RT_H
3
4#ifdef __cplusplus
5#include <cstddef>
6#else
7#include <stddef.h>
8#endif
9
10#ifdef _WIN32
11#ifdef PHASOR_EXPORTS
12#define PHASOR_API __declspec(dllexport)
13#else
14#define PHASOR_API __declspec(dllimport)
15#endif
16#elif defined(__GNUC__) || defined(__clang__)
17#ifdef PHASOR_EXPORTS
18#define PHASOR_API __attribute__((visibility("default")))
19#else
20#define PHASOR_API
21#endif
22#else
23#define PHASOR_API
24#endif
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif
30
42 PHASOR_API void exec(const unsigned char embeddedBytecode[], size_t embeddedBytecodeSize, const char *moduleName,
43 const void *nativeFunctionsVector, int argc, const char **argv);
44
53 PHASOR_API void jitExec(const char *script, const char *moduleName, const void *nativeFunctionsVector);
54
61 PHASOR_API void executeScript(void *vm, const char *script);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif // PHASOR_RT_H
#define PHASOR_API
Definition PhasorRT.h:23
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.
PHASOR_API void exec(const unsigned char embeddedBytecode[], size_t embeddedBytecodeSize, const char *moduleName, const void *nativeFunctionsVector, int argc, const char **argv)
Executes pre-compiled Phasor bytecode.