[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / opcodes.h
blob107755cd89729f4e5e00a6720589973053d98d02
1 /**
2 * \file
3 */
5 #ifndef __MONO_METADATA_OPCODES_H__
6 #define __MONO_METADATA_OPCODES_H__
8 /*
9 * opcodes.h: CIL instruction information
11 * Author:
12 * Paolo Molaro (lupus@ximian.com)
14 * (C) 2002 Ximian, Inc.
17 #include <mono/utils/mono-publib.h>
19 MONO_BEGIN_DECLS
21 #define MONO_CUSTOM_PREFIX 0xf0
23 #define OPDEF(a,b,c,d,e,f,g,h,i,j) \
24 MONO_ ## a,
26 typedef enum MonoOpcodeEnum {
27 MonoOpcodeEnum_Invalid = -1,
28 #include "mono/cil/opcode.def"
29 MONO_CEE_LAST
30 } MonoOpcodeEnum;
32 #undef OPDEF
34 enum {
35 MONO_FLOW_NEXT,
36 MONO_FLOW_BRANCH,
37 MONO_FLOW_COND_BRANCH,
38 MONO_FLOW_ERROR,
39 MONO_FLOW_CALL,
40 MONO_FLOW_RETURN,
41 MONO_FLOW_META
44 enum {
45 MonoInlineNone = 0,
46 MonoInlineType = 1,
47 MonoInlineField = 2,
48 MonoInlineMethod = 3,
49 MonoInlineTok = 4,
50 MonoInlineString = 5,
51 MonoInlineSig = 6,
52 MonoInlineVar = 7,
53 MonoShortInlineVar = 8,
54 MonoInlineBrTarget = 9,
55 MonoShortInlineBrTarget = 10,
56 MonoInlineSwitch = 11,
57 MonoInlineR = 12,
58 MonoShortInlineR = 13,
59 MonoInlineI = 14,
60 MonoShortInlineI = 15,
61 MonoInlineI8 = 16,
64 typedef struct {
65 unsigned char argument;
66 unsigned char flow_type;
67 unsigned short opval;
68 } MonoOpcode;
70 MONO_API_DATA const MonoOpcode mono_opcodes [];
72 MONO_API const char*
73 mono_opcode_name (int opcode);
75 MONO_API MonoOpcodeEnum
76 mono_opcode_value (const mono_byte **ip, const mono_byte *end);
78 MONO_END_DECLS
80 #endif /* __MONO_METADATA_OPCODES_H__ */