<file src="..\inc\corinfo.h" target="inc\corinfo.h" />
<file src="..\inc\corjit.h" target="inc\corjit.h" />
<file src="..\inc\opcode.def" target="inc\opcode.def" />
- <file src="..\inc\openum.h" target="inc\openum.h" />
+ <file src="..\inc\openum.h" target="inc\openum.h" />
+ <file src="..\inc\gcinfoencoder.h" target="inc\gcinfoencoder.h" />
+ <file src="..\inc\gcinfotypes.h" target="inc\gcinfotypes.h" />
+ <file src="..\gcinfo\gcinfoencoder.cpp" target="gcinfo\gcinfoencoder.cpp" />
</files>
</package>
<file src="..\inc\corjit.h" target="inc\corjit.h" />
<file src="..\inc\opcode.def" target="inc\opcode.def" />
<file src="..\inc\openum.h" target="inc\openum.h" />
+ <file src="..\inc\gcinfoencoder.h" target="inc\gcinfoencoder.h" />
+ <file src="..\inc\gcinfotypes.h" target="inc\gcinfotypes.h" />
+ <file src="..\.\gcinfo\gcinfoencoder.cpp" target="gcinfo\gcinfoencoder.cpp" />
</files>
</package>
#define LOGGING
#endif
#endif
+
+#ifndef STANDALONE_BUILD
#include "log.h"
#include "simplerhash.h"
+#endif
#ifdef MDIL
#define MUST_CALL_JITALLOCATOR_FREE 1
#endif
-
+#ifndef DISABLE_EH_VECTORS
inline BOOL IsEssential(EE_ILEXCEPTION_CLAUSE *pClause)
{
_ASSERTE(pClause->TryEndPC >= pClause->TryStartPC);
return TRUE;
}
+#endif
GcInfoEncoder::GcInfoEncoder(
ICorJitInfo* pCorJitInfo,
7. Chunk pointers
8. Chunk encodings
+
+ STANDALONE_BUILD
+
+ The STANDALONE_BUILD switch can be used to build the GcInfoEncoder library
+ independently by clients outside the CoreClr tree.
+
+ The GcInfo library uses some custom data-structures (ex: ArrayList, SimplerHashTable)
+ and includes some utility libraries (ex: UtilCode) which pull in several other
+ headers with considerable unrelated content. Rather than porting all the
+ utility code to suite other clients, the STANDALONE_BUILD switch can be used
+ to include only the minimal set of headers specific to GcInfo encodings.
+
+ Clients of STANDALONE_BUILD will likely use standard library
+ implementations of data-structures like ArrayList, HashMap etc., in place
+ of the custom implementation currently used by GcInfoEncoder.
+
+ Rather than spew the GcInfoEnoder code with
+ #ifdef STANDALONE_BUILD ... #else .. #endif blocks, we include a special
+ header GcInfoUtil.h in STANDALONE_BUILD mode. GcInfoUtil.h is expected to
+ supply the interface/implementation for the data-structures and utilities
+ used by GcInfoEncoder. This header should be provided by the clients doing
+ the standalone build in their source tree.
+
*****************************************************************/
#ifndef __GCINFOENCODER_H__
#define __GCINFOENCODER_H__
-
+#ifdef STANDALONE_BUILD
+#include <wchar.h>
+#include <stdio.h>
+#include "GcInfoUtil.h"
+#include "corjit.h"
+#else
#include <windows.h>
-
#include <wchar.h>
#include <stdio.h>
-
#include "utilcode.h"
#include "corjit.h"
#include "slist.h" // for SList
#include "arraylist.h"
#include "iallocator.h"
-
#include "stdmacros.h"
-#include "gcinfotypes.h"
#include "eexcp.h"
+#endif
+#include "gcinfotypes.h"
#ifdef VERIFY_GCINFO
#include "dbggcinfoencoder.h"
//--------------------------------------------------------------------------------
__forceinline size_t SAFE_SHIFT_LEFT(size_t x, size_t count)
{
- LIMITED_METHOD_DAC_CONTRACT;
_ASSERTE(count <= BITS_PER_SIZE_T);
return (x << 1) << (count-1);
}