Execution Engine Macros

BEGIN_FORBID
ENDFORBID

Defined in clr/src/vm/threads.h, these macros bracket code in which garbage collection is forbidden. They are activated in debug-enabled builds only.

COMPlusThrow

This macro, defined in clr/src/vm/exceptmacros.h, is used to throw exceptions from within execution engine code.

COMPLUS_TRY
COMPLUS_CATCH
COMPLUS_END_CATCH
COMPLUS_FINALLY
COMPLUS_END_FINALLY

These macros wrap the PAL_TRY family of macros with additional code that maintains internal execution engine data structures. In particular, these protect the integrity of the frame chain. They are defined in clr/src/vm/exceptmacros.h.

EE_TRY_FOR_FINALLY
EE_FINALLY
EE_END_FINALLY

This is a simplified version of the COMPLUS_TRY macro that supports only finally clauses. (COMPLUS_TRY supports both catch and finally clauses.) It is defined in clr/src/vm/exceptmacros.h.

FCDECL*
FCIMPL*

The macros from this large series, defined and documented in clr/src/vm/fcall.h, are used to declare and implement FCalls. Platform-to-platform differences in FCall calling conventions are encapsulated inside these macros.

FCThrow

This macro is used to throw exceptions from within FCall implementations when a helper frame is not erected for the FCall. (COMPlusThrow would be used to throw exceptions if a helper frame were erected.) It is defined in clr/src/vm/frames.h.

GCPROTECT_BEGIN
GCPROTECT_ARRAY_BEGIN
GCPROTECT_BEGININTERIOR
GCPROTECT_END

This series of macros is used to mark memory locations ...

Get Shared Source CLI Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.