3 #include <mono/metadata/loader.h>
4 #include <mono/metadata/object.h>
5 #include <mono/metadata/domain-internals.h>
6 #include <mono/metadata/class-internals.h>
15 VAL_NATI = 0 + VAL_POINTER,
16 VAL_MP = 1 + VAL_POINTER,
17 VAL_TP = 2 + VAL_POINTER,
18 VAL_OBJ = 3 + VAL_POINTER
21 #if SIZEOF_VOID_P == 4
22 typedef guint32 mono_u;
23 typedef gint32 mono_i;
24 #elif SIZEOF_VOID_P == 8
25 typedef guint64 mono_u;
26 typedef gint64 mono_i;
30 * Value types are represented on the eval stack as pointers to the
31 * actual storage. The size field tells how much storage is allocated.
32 * A value type can't be larger than 16 MB.
39 /* native size integer and pointer types */
44 #if defined(__ppc__) || defined(__powerpc__)
49 typedef struct _MonoInvocation MonoInvocation;
51 typedef void (*MonoFunc) (void);
52 typedef void (*MonoPIFunc) (MonoFunc callme, void *retval, void *obj_this, stackval *arguments);
55 * Structure representing a method transformed for the interpreter
56 * This is domain specific
63 guint32 vt_stack_size;
66 unsigned short *new_body_start; /* after all STINARG instrs */
70 MonoExceptionClause *clauses;
74 guint32 *local_offsets;
75 unsigned int param_count;
77 unsigned int valuetype;
80 struct _MonoInvocation {
81 MonoInvocation *parent; /* parent */
82 RuntimeMethod *runtime_method; /* parent */
83 MonoMethod *method; /* parent */
84 stackval *retval; /* parent */
85 void *obj; /* this - parent */
87 stackval *stack_args; /* parent */
89 stackval *sp; /* For GC stack marking */
91 unsigned char invoke_trap;
92 const unsigned short *ip;
94 MonoExceptionClause *ex_handler;
99 MonoInvocation *base_frame;
100 MonoInvocation *current_frame;
101 MonoInvocation *env_frame;
102 jmp_buf *current_env;
103 unsigned char search_for_handler;
104 unsigned char managed_code;
107 void mono_init_icall (void);
110 mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context);
113 mono_interp_ftnptr_to_delegate (MonoClass *klass, gpointer ftn);
116 mono_interp_transform_init (void);
118 void inline stackval_from_data (MonoType *type, stackval *result, char *data, gboolean pinvoke);
119 void inline stackval_to_data (MonoType *type, stackval *val, char *data, gboolean pinvoke);
120 void ves_exec_method (MonoInvocation *frame);
123 * defined in an arch specific file.
126 mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor);
129 mono_interp_get_runtime_method (MonoMethod *method);
131 void *mono_arch_create_method_pointer (MonoMethod *method);
133 extern int mono_interp_traceopt;