Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / cfgdump.h
1 /**
2  * \file
3  * Copyright (C) 2016 Xamarin Inc
4  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5  */
6
7 #ifndef __MINI_CFGDUMP_H__
8 #define __MINI_CFGDUMP_H__
9 #include <glib.h>
10
11 #define CONSTANT_POOL_MAX_SIZE 8000
12
13 #define BEGIN_GROUP 0x00
14 #define BEGIN_GRAPH 0x01
15 #define CLOSE_GROUP 0x02
16
17 #define POOL_NEW 0x00
18 #define POOL_STRING 0x01
19 #define POOL_ENUM 0x02
20 #define POOL_KLASS 0x03
21 #define POOL_METHOD 0x04
22 #define POOL_NULL 0x05
23 #define POOL_NODE_CLASS 0x06
24 #define POOL_FIELD 0x07
25 #define POOL_SIGNATURE 0x08
26
27 #define PROPERTY_POOL 0x00
28 #define PROPERTY_INT 0x01
29 #define PROPERTY_LONG 0x02
30 #define PROPERTY_DOUBLE 0x03
31 #define PROPERTY_FLOAT 0x04
32 #define PROPERTY_TRUE 0x05
33 #define PROPERTY_FALSE 0x06
34 #define PROPERTY_ARRAY 0x07
35 #define PROPERTY_SUBGRAPH 0x08
36
37 #define KLASS 0x00
38 #define ENUM_KLASS 0x01
39
40
41 #define DEFAULT_PORT 4445
42 #define DEFAULT_HOST "127.0.0.1"
43
44 typedef enum {
45         PT_STRING,
46         PT_METHOD,
47         PT_KLASS,
48         PT_OPTYPE,
49         PT_INPUTTYPE,
50         PT_ENUMKLASS,
51         PT_SIGNATURE
52 } pool_type;
53
54 struct _MonoGraphDumper {
55         int fd;
56         GHashTable *constant_pool;
57         short next_cp_id;
58         GHashTable *insn2id;
59         int next_insn_id;
60 };
61
62 typedef struct _MonoGraphDumper MonoGraphDumper;
63
64 struct _ConstantPoolEntry {
65         pool_type pt;
66         void *data;
67 };
68
69 typedef struct _ConstantPoolEntry ConstantPoolEntry;
70 #endif /* __MINI_CFGDUMP_H__ */