Use new atomis with allocated_heap.
[mono.git] / mono / metadata / domain-internals.h
index 139a81107c5819d1ce5cc9a7446cc91e30cc3229..f9bf57a3207f89003d812fce44540435852feb0b 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Appdomain-related internal data structures and functions.
+ * Copyright 2012 Xamarin Inc (http://www.xamarin.com)
  */
 #ifndef __MONO_METADATA_DOMAIN_INTERNALS_H__
 #define __MONO_METADATA_DOMAIN_INTERNALS_H__
@@ -97,9 +98,31 @@ typedef struct {
        int dummy;
 } MonoGenericSharingContext;
 
+/* Simplified DWARF location list entry */
+typedef struct {
+       /* Whenever the value is in a register */
+       gboolean is_reg;
+       /*
+        * If is_reg is TRUE, the register which contains the value. Otherwise
+        * the base register.
+        */
+       int reg;
+       /*
+        * If is_reg is FALSE, the offset of the stack location relative to 'reg'.
+        * Otherwise, 0.
+        */
+       int offset;
+       /*
+        * Offsets of the PC interval where the value is in this location.
+        */
+       int from, to;
+} MonoDwarfLocListEntry;
+
 typedef struct
 {
        MonoGenericSharingContext *generic_sharing_context;
+       int nlocs;
+       MonoDwarfLocListEntry *locations;
        gint32 this_offset;
        guint8 this_reg;
        gboolean has_this:1;
@@ -142,6 +165,11 @@ typedef struct
        MonoTryBlockHoleJitInfo holes [MONO_ZERO_LEN_ARRAY];
 } MonoTryBlockHoleTableJitInfo;
 
+typedef struct
+{
+       guint32 stack_size;
+} MonoArchEHJitInfo;
+
 struct _MonoJitInfo {
        /* NOTE: These first two elements (method and
           next_jit_code_hash) must be in the same order and at the
@@ -165,6 +193,7 @@ struct _MonoJitInfo {
        gboolean    cas_method_permitonly:1;
        gboolean    has_generic_jit_info:1;
        gboolean    has_try_block_holes:1;
+       gboolean    has_arch_eh_info:1;
        gboolean    from_aot:1;
        gboolean    from_llvm:1;
 
@@ -174,6 +203,7 @@ struct _MonoJitInfo {
        MonoJitExceptionInfo clauses [MONO_ZERO_LEN_ARRAY];
        /* There is an optional MonoGenericJitInfo after the clauses */
        /* There is an optional MonoTryBlockHoleTableJitInfo after MonoGenericJitInfo clauses*/
+       /* There is an optional MonoArchEHJitInfo after MonoTryBlockHoleTableJitInfo */
 };
 
 #define MONO_SIZEOF_JIT_INFO (offsetof (struct _MonoJitInfo, clauses))
@@ -342,6 +372,12 @@ struct _MonoDomain {
        MonoClass *socket_class;
        MonoClass *ad_unloaded_ex_class;
        MonoClass *process_class;
+
+       /* Cache function pointers for architectures  */
+       /* that require wrappers */
+       GHashTable *ftnptrs_hash;
+
+       guint32 execution_context_field_offset;
 };
 
 typedef struct  {
@@ -449,6 +485,9 @@ mono_domain_set_internal_with_options (MonoDomain *domain, gboolean migrate_exce
 MonoTryBlockHoleTableJitInfo*
 mono_jit_info_get_try_block_hole_table_info (MonoJitInfo *ji) MONO_INTERNAL;
 
+MonoArchEHJitInfo*
+mono_jit_info_get_arch_eh_info (MonoJitInfo *ji) MONO_INTERNAL;
+
 /* 
  * Installs a new function which is used to return a MonoJitInfo for a method inside
  * an AOT module.