Phasor 2.2.0
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#include <stddef.h> // For size_t
5
6#ifdef _WIN32
7 #ifdef PHASOR_EXPORTS
8 #define PHASOR_API __declspec(dllexport)
9 #else
10 #define PHASOR_API __declspec(dllimport)
11 #endif
12#elif defined(__GNUC__) || defined(__clang__)
13 #ifdef PHASOR_EXPORTS
14 #define PHASOR_API __attribute__((visibility("default")))
15 #else
16 #define PHASOR_API
17 #endif
18#else
19 #define PHASOR_API
20#endif
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
36PHASOR_API void exec(const unsigned char embeddedBytecode[], size_t embeddedBytecodeSize, const char *moduleName,
37 const void *nativeFunctionsVector, const int argc, const char** argv);
38
46PHASOR_API void jitExec(const char *script, const char *moduleName, const void *nativeFunctionsVector);
47
54PHASOR_API void executeScript(void *vm, const char *script);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif // PHASOR_RT_H
#define PHASOR_API
Definition PhasorRT.h:19
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, const int argc, const char **argv)
Executes pre-compiled Phasor bytecode.