[mini] Always emit safepoints, except WASM
[mono-project.git] / mono / metadata / method-builder.h
blob22b6e0027a8bbcd1b74fe837a4940bdb1727fde6
1 /**
2 * \file
3 * Functions for creating IL methods at runtime.
4 *
5 * Author:
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__
15 #include "config.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
26 typedef struct {
27 int version;
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;
33 MonoMethodBuilder *
34 mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type);
36 MonoMethodBuilder *
37 mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType type);
39 void
40 mono_mb_free (MonoMethodBuilder *mb);
42 MonoMethod *
43 mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack);
45 guint32
46 mono_mb_add_data (MonoMethodBuilder *mb, gpointer data);
48 void
49 mono_install_method_builder_callbacks (MonoMethodBuilderCallbacks *cb);
51 #endif /* __MONO_METHOD_BUILDER_H__ */