3 * Functions for creating IL methods at runtime.
6 * Paolo Molaro (lupus@ximian.com)
8 * (C) 2002 Ximian, Inc. http://www.ximian.com
12 #ifndef __MONO_METHOD_BUILDER_H__
13 #define __MONO_METHOD_BUILDER_H__
16 #include <mono/metadata/class.h>
17 #include <mono/metadata/object-internals.h>
18 #include <mono/metadata/class-internals.h>
19 #include <mono/metadata/opcodes.h>
20 #include <mono/metadata/reflection.h>
22 typedef struct _MonoMethodBuilder MonoMethodBuilder
;
24 #define MONO_METHOD_BUILDER_CALLBACKS_VERSION 1
28 MonoMethodBuilder
* (*new_base
) (MonoClass
*klass
, MonoWrapperType type
);
29 void (*free
) (MonoMethodBuilder
*mb
);
30 MonoMethod
* (*create_method
) (MonoMethodBuilder
*mb
, MonoMethodSignature
*signature
, int max_stack
);
31 } MonoMethodBuilderCallbacks
;
34 mono_mb_new (MonoClass
*klass
, const char *name
, MonoWrapperType type
);
37 mono_mb_new_no_dup_name (MonoClass
*klass
, const char *name
, MonoWrapperType type
);
40 mono_mb_free (MonoMethodBuilder
*mb
);
43 mono_mb_create_method (MonoMethodBuilder
*mb
, MonoMethodSignature
*signature
, int max_stack
);
46 mono_mb_add_data (MonoMethodBuilder
*mb
, gpointer data
);
49 mono_install_method_builder_callbacks (MonoMethodBuilderCallbacks
*cb
);
51 #endif /* __MONO_METHOD_BUILDER_H__ */