+2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ssa.c:
+ * ssa2.c:
+ * mini.c:
+ * regalloc2.c:
+ * dominators.c: Remove duplicated functions that now are in
+ mempool-internals.h.
+
2008-08-19 Zoltan Varga <vargaz@gmail.com>
* aot-compiler.c: Fix warnings.
*/
#include <string.h>
#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
#include "mini.h"
*/
#define HAS_DFN(bb, entry) ((bb)->dfn || ((bb) == entry))
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList *list,
- gpointer data)
-{
- GSList *new_list;
-
- new_list = mono_mempool_alloc (mp, sizeof (GSList));
- new_list->data = data;
- new_list->next = list;
-
- return new_list;
-}
-
/*
* Compute dominators and immediate dominators using the algorithm in the
* paper "A Simple, Fast Dominance Algorithm" by Keith D. Cooper,
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/verify.h>
#include <mono/metadata/verify-internals.h>
+#include <mono/metadata/mempool-internals.h>
#include <mono/utils/mono-math.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-counters.h>
GSList *slots;
} StackSlotInfo;
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList *list,
- gpointer data)
-{
- GSList *new_list;
-
- new_list = mono_mempool_alloc (mp, sizeof (GSList));
- new_list->data = data;
- new_list->next = list;
-
- return new_list;
-}
-
static gint
compare_by_interval_start_pos_func (gconstpointer a, gconstpointer b)
{
#define dreg_is_fp(spec) (spec [MONO_INST_DEST] == 'f')
#endif
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList *list,
- gpointer data)
-{
- GSList *new_list;
-
- new_list = mono_mempool_alloc (mp, sizeof (GSList));
- new_list->data = data;
- new_list->next = list;
-
- return new_list;
-}
-
static inline GSList*
g_slist_append_mempool (MonoMemPool *mp, GSList *list,
gpointer data)
*/
#include <string.h>
#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
#include "mini.h"
(dest)->type = STACK_I4; \
} while (0)
-
-static GList*
-g_list_prepend_mempool (GList* l, MonoMemPool* mp, gpointer datum)
-{
- GList* n = mono_mempool_alloc (mp, sizeof (GList));
- n->next = l;
- n->prev = NULL;
- n->data = datum;
- return n;
-}
-
static void
unlink_target (MonoBasicBlock *bb, MonoBasicBlock *target)
{
//printf ("FOUND %d\n", idx);
ui->bb = bb;
ui->inst = root;
- info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+ info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
}
}
}
//printf ("FOUND %d\n", idx);
ui->bb = bb;
ui->inst = root;
- info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+ info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
} else {
if (arity) {
//if (inst->ssa_op != MONO_SSA_STORE)
*/
#include <string.h>
#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
#define NEW_IR
#include "mini.h"
MonoInst *inst;
} MonoVarUsageInfo;
-static inline GList*
-g_list_prepend_mempool (GList* l, MonoMemPool* mp, gpointer datum)
-{
- GList* n = mono_mempool_alloc (mp, sizeof (GList));
- n->next = l;
- n->prev = NULL;
- n->data = datum;
- return n;
-}
-
static void
unlink_target (MonoBasicBlock *bb, MonoBasicBlock *target)
{
ui->bb = bb;
ui->inst = ins;
- info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+ info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
}
typedef struct {
{
GList *tmp;
- *wl = g_list_prepend_mempool (*wl, cfg->mempool, use);
+ *wl = g_list_prepend_mempool (cfg->mempool, *wl, use);
for (tmp = use->uses; tmp; tmp = tmp->next) {
MonoVarUsageInfo *ui = (MonoVarUsageInfo *)tmp->data;
work_list = NULL;
for (i = 0; i < cfg->num_varinfo; i++) {
MonoMethodVar *info = MONO_VARINFO (cfg, i);
- work_list = g_list_prepend_mempool (work_list, cfg->mempool, info);
+ work_list = g_list_prepend_mempool (cfg->mempool, work_list, info);
}
while (work_list) {