3 #include <mono/metadata/loader.h>
4 #include <mono/metadata/object.h>
13 VAL_NATI = 0 + VAL_POINTER,
14 VAL_MP = 1 + VAL_POINTER,
15 VAL_TP = 2 + VAL_POINTER,
16 VAL_OBJ = 3 + VAL_POINTER
19 #if SIZEOF_VOID_P == 4
20 typedef guint32 mono_u;
21 typedef gint32 mono_i;
22 #elif SIZEOF_VOID_P == 8
23 typedef guint64 mono_u;
24 typedef gint64 mono_i;
28 * Value types are represented on the eval stack as pointers to the
29 * actual storage. The size field tells how much storage is allocated.
30 * A value type can't be larger than 16 MB.
37 /* native size integer and pointer types */
42 #if defined(__ppc__) || defined(__powerpc__)
47 typedef struct _MonoInvocation MonoInvocation;
49 typedef void (*MonoFunc) (void);
50 typedef void (*MonoPIFunc) (MonoFunc callme, void *retval, void *obj_this, stackval *arguments);
53 * Structure representing a method transformed for the interpreter
54 * This is domain specific
61 guint32 vt_stack_size;
64 unsigned short *new_body_start; /* after all STINARG instrs */
68 MonoExceptionClause *clauses;
72 guint32 *local_offsets;
73 unsigned int param_count;
75 unsigned int valuetype;
78 struct _MonoInvocation {
79 MonoInvocation *parent; /* parent */
80 RuntimeMethod *runtime_method; /* parent */
81 MonoMethod *method; /* parent */
82 stackval *retval; /* parent */
83 void *obj; /* this - parent */
85 stackval *stack_args; /* parent */
87 stackval *sp; /* For GC stack marking */
89 unsigned char invoke_trap;
90 const unsigned short *ip;
92 MonoExceptionClause *ex_handler;
97 MonoInvocation *base_frame;
98 MonoInvocation *current_frame;
99 MonoInvocation *env_frame;
100 jmp_buf *current_env;
101 unsigned char search_for_handler;
102 unsigned char managed_code;
105 void mono_init_icall (void);
108 mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context);
111 mono_interp_transform_init (void);
113 void inline stackval_from_data (MonoType *type, stackval *result, char *data, gboolean pinvoke);
114 void inline stackval_to_data (MonoType *type, stackval *val, char *data, gboolean pinvoke);
115 void ves_exec_method (MonoInvocation *frame);
118 * defined in an arch specific file.
121 mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor);
124 mono_interp_get_runtime_method (MonoMethod *method);
126 void *mono_arch_create_method_pointer (MonoMethod *method);
128 extern int mono_interp_traceopt;