1 #ifndef __MONO_MINI_INTERPRETER_INTERNALS_H__
2 #define __MONO_MINI_INTERPRETER_INTERNALS_H__
6 #include <mono/metadata/loader.h>
7 #include <mono/metadata/object.h>
8 #include <mono/metadata/domain-internals.h>
9 #include <mono/metadata/class-internals.h>
18 VAL_NATI = 0 + VAL_POINTER,
19 VAL_MP = 1 + VAL_POINTER,
20 VAL_TP = 2 + VAL_POINTER,
21 VAL_OBJ = 3 + VAL_POINTER
24 #if SIZEOF_VOID_P == 4
25 typedef guint32 mono_u;
26 typedef gint32 mono_i;
27 #elif SIZEOF_VOID_P == 8
28 typedef guint64 mono_u;
29 typedef gint64 mono_i;
33 * Value types are represented on the eval stack as pointers to the
34 * actual storage. The size field tells how much storage is allocated.
35 * A value type can't be larger than 16 MB.
42 /* native size integer and pointer types */
47 #if defined(__ppc__) || defined(__powerpc__)
52 typedef struct _MonoInvocation MonoInvocation;
54 typedef void (*MonoFuncV) (void);
55 typedef void (*MonoPIFunc) (MonoFuncV callme, void *margs);
58 * Structure representing a method transformed for the interpreter
59 * This is domain specific
61 typedef struct _RuntimeMethod
63 /* NOTE: These first two elements (method and
64 next_jit_code_hash) must be in the same order and at the
65 same offset as in MonoJitInfo, because of the jit_code_hash
66 internal hash table in MonoDomain. */
68 struct _RuntimeMethod *next_jit_code_hash;
72 guint32 vt_stack_size;
75 unsigned short *new_body_start; /* after all STINARG instrs */
78 MonoExceptionClause *clauses;
82 guint32 *local_offsets;
83 unsigned int param_count;
87 MonoMethodSignature *jit_sig;
90 MonoType **param_types;
93 struct _MonoInvocation {
94 MonoInvocation *parent; /* parent */
95 RuntimeMethod *runtime_method; /* parent */
96 MonoMethod *method; /* parent */
97 stackval *retval; /* parent */
99 stackval *stack_args; /* parent */
101 stackval *sp; /* For GC stack marking */
103 unsigned char invoke_trap;
104 const unsigned short *ip;
106 MonoExceptionClause *ex_handler;
111 MonoInvocation *base_frame;
112 MonoInvocation *current_frame;
113 MonoInvocation *env_frame;
114 jmp_buf *current_env;
115 unsigned char search_for_handler;
116 unsigned char managed_code;
119 extern int mono_interp_traceopt;
120 extern GSList *jit_classes;
123 mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context);
126 mono_interp_transform_init (void);
129 mono_interp_get_runtime_method (MonoDomain *domain, MonoMethod *method, MonoError *error);
131 #endif /* __MONO_MINI_INTERPRETER_INTERNALS_H__ */