|
|
|
@ -10,8 +10,8 @@
|
|
|
|
|
|
|
|
|
|
#define M3_VERSION_MAJOR 0
|
|
|
|
|
#define M3_VERSION_MINOR 4
|
|
|
|
|
#define M3_VERSION_REV 8
|
|
|
|
|
#define M3_VERSION "0.4.8"
|
|
|
|
|
#define M3_VERSION_REV 9
|
|
|
|
|
#define M3_VERSION "0.4.9"
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
@ -29,8 +29,6 @@ struct M3Runtime; typedef struct M3Runtime * IM3Runtime;
|
|
|
|
|
struct M3Module; typedef struct M3Module * IM3Module;
|
|
|
|
|
struct M3Function; typedef struct M3Function * IM3Function;
|
|
|
|
|
|
|
|
|
|
#define M3_BACKTRACE_TRUNCATED (void*)(SIZE_MAX)
|
|
|
|
|
|
|
|
|
|
typedef struct M3ErrorInfo
|
|
|
|
|
{
|
|
|
|
|
M3Result result;
|
|
|
|
@ -61,6 +59,8 @@ typedef struct M3BacktraceInfo
|
|
|
|
|
}
|
|
|
|
|
M3BacktraceInfo, * IM3BacktraceInfo;
|
|
|
|
|
|
|
|
|
|
// Constants
|
|
|
|
|
#define M3_BACKTRACE_TRUNCATED (void*)(SIZE_MAX)
|
|
|
|
|
|
|
|
|
|
typedef enum M3ValueType
|
|
|
|
|
{
|
|
|
|
@ -135,7 +135,6 @@ d_m3ErrorConst (functionStackOverflow, "compiling function overran its
|
|
|
|
|
d_m3ErrorConst (functionStackUnderrun, "compiling function underran the stack")
|
|
|
|
|
d_m3ErrorConst (mallocFailedCodePage, "memory allocation failed when acquiring a new M3 code page")
|
|
|
|
|
d_m3ErrorConst (settingImmutableGlobal, "attempting to set an immutable global")
|
|
|
|
|
d_m3ErrorConst (optimizerFailed, "optimizer failed") // not a fatal error. a result,
|
|
|
|
|
|
|
|
|
|
// runtime errors
|
|
|
|
|
d_m3ErrorConst (missingCompiledCode, "function is missing compiled m3 code")
|
|
|
|
@ -263,8 +262,7 @@ d_m3ErrorConst (trapStackOverflow, "[trap] stack overflow")
|
|
|
|
|
void m3_PrintM3Info (void);
|
|
|
|
|
void m3_PrintProfilerInfo (void);
|
|
|
|
|
|
|
|
|
|
// The runtime owns the backtrace, do not free the backtrace you obtain
|
|
|
|
|
// Returns NULL if there's no backtrace
|
|
|
|
|
// The runtime owns the backtrace, do not free the backtrace you obtain. Returns NULL if there's no backtrace.
|
|
|
|
|
IM3BacktraceInfo m3_GetBacktrace (IM3Runtime i_runtime);
|
|
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
|