extensions
Steven Massey 5 years ago
parent 8bb8b262b7
commit 048bb4bd74

@ -34,7 +34,7 @@
# endif
# ifndef d_m3LogOutput
# define d_m3LogOutput true
# define d_m3LogOutput 1
# endif
# ifndef d_m3FixedHeap
@ -46,7 +46,7 @@
// It's enabled by default for Linux, OS X, Win32 and Android builds
// and disabled on other platforms, i.e. microcontrollers
# ifndef d_m3AllocateLinearMemory
# define d_m3AllocateLinearMemory false
# define d_m3AllocateLinearMemory true
# endif
# ifndef d_m3FixedHeapAlign
@ -64,13 +64,13 @@
// m3log (...) --------------------------------------------------------------------
# define d_m3LogParse 0
# define d_m3LogCompile 0
# define d_m3LogStack 0
# define d_m3LogEmit 0
# define d_m3LogCodePages 0
# define d_m3LogCompile 1
# define d_m3LogStack 1
# define d_m3LogEmit 1
# define d_m3LogCodePages 1
# define d_m3LogModule 0
# define d_m3LogRuntime 0
# define d_m3LogExec 0
# define d_m3LogExec 1
# define d_m3LogNativeStack 0

@ -384,4 +384,20 @@ void log_opcode (IM3Compilation o, u8 i_opcode)
o->block.depth++;
}
u16 GetMaxExecSlot (IM3Compilation o);
void emit_stack_dump (IM3Compilation o)
{
# if d_m3RuntimeStackDumps
if (o->numEmits)
{
EmitOp (o, op_DumpStack);
EmitConstant (o, o->numOpcodes);
EmitConstant (o, GetMaxExecSlot (o));
EmitConstant (o, (u64) o->function);
o->numEmits = 0;
}
# endif
}

@ -25,6 +25,7 @@ OpInfo find_operation_info (IM3Operation i_operation);
void dump_type_stack (IM3Compilation o);
void log_opcode (IM3Compilation o, u8 i_opcode);
const char * get_indention_string (IM3Compilation o);
void emit_stack_dump (IM3Compilation o);
#endif /* m3_info_h */

Loading…
Cancel
Save