|
|
|
@ -108,10 +108,8 @@ const void * const cvptr_t;
|
|
|
|
|
|
|
|
|
|
# ifdef DEBUG
|
|
|
|
|
# define d_m3Assert(ASS) assert (ASS)
|
|
|
|
|
# define d_m3AssertFatal(ASS) assert (ASS)
|
|
|
|
|
# else
|
|
|
|
|
# define d_m3Assert(ASS)
|
|
|
|
|
# define d_m3AssertFatal(ASS) m3AbortIfNot (ASS)
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
typedef void /*const*/ * code_t;
|
|
|
|
@ -173,11 +171,13 @@ static const char * const c_waCompactTypes [] = { "0", "i", "I", "f", "F", "v"
|
|
|
|
|
# define _m3Error(RESULT, RT, MOD, FUN, FILE, LINE, FORMAT, ...) (RESULT)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define ErrorRuntime(RESULT, RUNTIME, FORMAT, ...) _m3Error (RESULT, RUNTIME, NULL, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
#define ErrorModule(RESULT, MOD, FORMAT, ...) _m3Error (RESULT, MOD->runtime, MOD, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
#define ErrorCompile(RESULT, COMP, FORMAT, ...) _m3Error (RESULT, COMP->runtime, COMP->module, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
//#define ErrorExec(RESULT, MODULE, FORMAT, ...) _m3Error (RESULT, COMP->runtime, COMP->module, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
#define ErrorRuntime(RESULT, RUNTIME, FORMAT, ...) _m3Error (RESULT, RUNTIME, NULL, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
#define ErrorModule(RESULT, MOD, FORMAT, ...) _m3Error (RESULT, MOD->runtime, MOD, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
#define ErrorCompile(RESULT, COMP, FORMAT, ...) _m3Error (RESULT, COMP->runtime, COMP->module, NULL, __FILE__, __LINE__, FORMAT, ##__VA_ARGS__)
|
|
|
|
|
|
|
|
|
|
#if d_m3VerboseErrorMessages
|
|
|
|
|
M3Result m3Error (M3Result i_result, IM3Runtime i_runtime, IM3Module i_module, IM3Function i_function, const char * const i_file, u32 i_lineNum, const char * const i_errorMessage, ...);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if d_m3LogNativeStack
|
|
|
|
|
void m3StackCheckInit ();
|
|
|
|
@ -189,8 +189,8 @@ size_t m3StackGetMax ();
|
|
|
|
|
#define m3StackGetMax() 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void m3Abort (const char* message);
|
|
|
|
|
void m3NotImplemented (void);
|
|
|
|
|
void m3AbortIfNot (bool condition);
|
|
|
|
|
|
|
|
|
|
void m3Yield (void);
|
|
|
|
|
|
|
|
|
|