First set of licensing changes
[mono.git] / mono / mini / seq-points.c
index c9f74b8e170b68359225bbc6e8a1fba44da6598c..fd9cc01200d0c9d3ba020853ac7b3f39e9a38732 100644 (file)
@@ -5,6 +5,7 @@
  *   Marcos Henrich (marcos.henrich@xamarin.com)
  *
  * Copyright 2014 Xamarin, Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
 #include "mini.h"
@@ -58,7 +59,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
 
        for (i = 0; i < cfg->seq_points->len; ++i) {
                SeqPoint *sp = &seq_points [i];
-               MonoInst *ins = g_ptr_array_index (cfg->seq_points, i);
+               MonoInst *ins = (MonoInst *)g_ptr_array_index (cfg->seq_points, i);
 
                sp->il_offset = ins->inst_imm;
                sp->native_offset = ins->inst_offset;
@@ -79,7 +80,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
                        bb_seq_points = g_slist_reverse (bb->seq_points);
                        last = NULL;
                        for (l = bb_seq_points; l; l = l->next) {
-                               MonoInst *ins = l->data;
+                               MonoInst *ins = (MonoInst *)l->data;
 
                                if (ins->inst_imm == METHOD_ENTRY_IL_OFFSET || ins->inst_imm == METHOD_EXIT_IL_OFFSET)
                                /* Used to implement method entry/exit events */
@@ -108,13 +109,13 @@ mono_save_seq_point_info (MonoCompile *cfg)
                                 */
                                l = g_slist_last (bb->seq_points);
                                if (l) {
-                                       endfinally_seq_point = l->data;
+                                       endfinally_seq_point = (MonoInst *)l->data;
 
                                        for (bb2 = cfg->bb_entry; bb2; bb2 = bb2->next_bb) {
                                                GSList *l = g_slist_last (bb2->seq_points);
 
                                                if (l) {
-                                                       MonoInst *ins = l->data;
+                                                       MonoInst *ins = (MonoInst *)l->data;
 
                                                        if (!(ins->inst_imm == METHOD_ENTRY_IL_OFFSET || ins->inst_imm == METHOD_EXIT_IL_OFFSET) && ins != endfinally_seq_point)
                                                                next [endfinally_seq_point->backend.size] = g_slist_append (next [endfinally_seq_point->backend.size], GUINT_TO_POINTER (ins->backend.size));
@@ -198,12 +199,12 @@ mono_get_seq_points (MonoDomain *domain, MonoMethod *method)
        }
 
        mono_loader_lock ();
-       seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, method);
+       seq_points = (MonoSeqPointInfo *)g_hash_table_lookup (domain_jit_info (domain)->seq_points, method);
        if (!seq_points && method->is_inflated) {
                /* generic sharing + aot */
-               seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, declaring_generic_method);
+               seq_points = (MonoSeqPointInfo *)g_hash_table_lookup (domain_jit_info (domain)->seq_points, declaring_generic_method);
                if (!seq_points)
-                       seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, shared_method);
+                       seq_points = (MonoSeqPointInfo *)g_hash_table_lookup (domain_jit_info (domain)->seq_points, shared_method);
        }
        mono_loader_unlock ();
 
@@ -294,11 +295,3 @@ mono_bb_deduplicate_op_il_seq_points (MonoCompile *cfg, MonoBasicBlock *bb)
                MONO_REMOVE_INS (bb, prev);
        };
 }
-
-void
-mono_image_get_aot_seq_point_path (MonoImage *image, char **str)
-{
-       int size = strlen (image->name) + strlen (SEQ_POINT_AOT_EXT) + 1;
-       *str = g_malloc (size);
-       g_sprintf (*str, "%s%s", image->name, SEQ_POINT_AOT_EXT);
-}