merged the cli and metadata directories - everything is now in metadata
[mono.git] / mono / interpreter / interp.h
1
2 #include <glib.h>
3 #include <mono/metadata/loader.h>
4 #include <mono/metadata/object.h>
5
6 enum {
7         VAL_I32     = 0,
8         VAL_DOUBLE  = 1,
9         VAL_I64     = 2,
10         VAL_VALUET  = 3,
11         VAL_POINTER = 4,
12         VAL_NATI    = 0 + VAL_POINTER,
13         VAL_MP      = 1 + VAL_POINTER,
14         VAL_TP      = 2 + VAL_POINTER,
15         VAL_OBJ     = 3 + VAL_POINTER
16 };
17
18 /*
19  * Value types are represented on the eval stack as pointers to the
20  * actual storage. The size field tells how much storage is allocated.
21  * A value type can't be larger than 16 MB.
22  */
23 typedef struct {
24         union {
25                 gint32 i;
26                 gint64 l;
27                 double f;
28                 /* native size integer and pointer types */
29                 gpointer p;
30         } data;
31         unsigned int type : 8;
32         unsigned int size : 24; /* used for value types */
33 } stackval;
34
35 typedef struct _MonoInvocation MonoInvocation;
36
37 struct _MonoInvocation {
38         MonoInvocation *parent; /* parent */
39         MonoInvocation *child;
40         MonoMethod     *method; /* parent */
41         stackval       *retval; /* parent */
42         void           *obj;    /* this - parent */
43         char           *locals;
44         char           *args;
45         stackval       *stack_args; /* parent */
46         stackval       *stack;
47         /* exception info */
48         const unsigned char  *ip;
49         MonoObject     *ex;
50         MonoExceptionClause *ex_handler;
51 };
52
53 void mono_init_icall ();
54