bool doLateDisasm; // Run the late disassembler
#endif // LATE_DISASM
-#if DUMP_GC_TABLES && !defined(DEBUG) && defined(JIT32_GCENCODER)
-// Only the JIT32_GCENCODER implements GC dumping in non-DEBUG code.
+#if DUMP_GC_TABLES && !defined(DEBUG)
#pragma message("NOTE: this non-debug build has GC ptr table dumping always enabled!")
static const bool dspGCtbls = true;
#endif
template class JitHashTable<RegSlotIdKey, RegSlotIdKey, GcSlotId>;
template class JitHashTable<StackSlotIdKey, StackSlotIdKey, GcSlotId>;
-#ifdef DEBUG
+#if defined(DEBUG) || DUMP_GC_TABLES
+
+// This is a copy of GcStackSlotBaseNames from gcinfotypes.h so we can compile in to non-DEBUG builds.
+const char* const JitGcStackSlotBaseNames[] = {"caller.sp", "sp", "frame"};
static const char* const GcSlotFlagsNames[] = {"",
"(byref) ",
public:
GcInfoEncoderWithLogging(GcInfoEncoder* gcInfoEncoder, bool verbose)
- : m_gcInfoEncoder(gcInfoEncoder), m_doLogging(verbose || JitConfig.JitGCInfoLogging() != 0)
+ : m_gcInfoEncoder(gcInfoEncoder), m_doLogging(verbose INDEBUG(|| JitConfig.JitGCInfoLogging() != 0))
{
}
if (m_doLogging)
{
printf("Stack slot id for offset %d (0x%x) (%s) %s= %d.\n", spOffset, spOffset,
- GcStackSlotBaseNames[spBase], GcSlotFlagsNames[flags & 7], newSlotId);
+ JitGcStackSlotBaseNames[spBase], GcSlotFlagsNames[flags & 7], newSlotId);
}
return newSlotId;
}
};
#define GCENCODER_WITH_LOGGING(withLog, realEncoder) \
- GcInfoEncoderWithLogging withLog##Var(realEncoder, compiler->verbose || compiler->opts.dspGCtbls); \
+ GcInfoEncoderWithLogging withLog##Var(realEncoder, INDEBUG(compiler->verbose ||) compiler->opts.dspGCtbls); \
GcInfoEncoderWithLogging* withLog = &withLog##Var;
-#else // DEBUG
+#else // !(defined(DEBUG) || DUMP_GC_TABLES)
#define GCENCODER_WITH_LOGGING(withLog, realEncoder) GcInfoEncoder* withLog = realEncoder;
-#endif // DEBUG
+#endif // !(defined(DEBUG) || DUMP_GC_TABLES)
void GCInfo::gcInfoBlockHdrSave(GcInfoEncoder* gcInfoEncoder, unsigned methodSize, unsigned prologSize)
{
#endif // DISPLAY_SIZES
}
-#ifdef DEBUG
+#if defined(DEBUG) || DUMP_GC_TABLES
#define Encoder GcInfoEncoderWithLogging
#else
#define Encoder GcInfoEncoder
static const enum ArgOrder g_tgtArgOrder;
};
-#if defined(DEBUG) || defined(LATE_DISASM)
+#if defined(DEBUG) || defined(LATE_DISASM) || DUMP_GC_TABLES
const char* getRegName(unsigned reg, bool isFloat = false); // this is for gcencode.cpp and disasm.cpp that don't use
// the regNumber type
const char* getRegName(regNumber reg, bool isFloat = false);
-#endif // defined(DEBUG) || defined(LATE_DISASM)
+#endif // defined(DEBUG) || defined(LATE_DISASM) || DUMP_GC_TABLES
#ifdef DEBUG
const char* getRegNameFloat(regNumber reg, var_types type);
return varTypeNames[vt];
}
-#if defined(DEBUG) || defined(LATE_DISASM)
+#if defined(DEBUG) || defined(LATE_DISASM) || DUMP_GC_TABLES
/*****************************************************************************
*
* Return the name of the given register.
{
return getRegName((regNumber)reg, isFloat);
}
-#endif // defined(DEBUG) || defined(LATE_DISASM)
+#endif // defined(DEBUG) || defined(LATE_DISASM) || DUMP_GC_TABLES
#if defined(DEBUG)