* src/vm/jit/methodtree.c: New file.
[cacao.git] / src / vm / jit / code.c
index 1e1cbfb2c7004b70547bce6edcd6cc6cb9463689..3bdc4678f5e4467ae9d329bd1f6e7e1c50fe9684 100644 (file)
@@ -37,6 +37,7 @@
 #include "vm/jit/code.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/patcher-common.h"
+#include "vm/jit/methodtree.h"
 
 #include "vmcore/options.h"
 
@@ -97,7 +98,7 @@ codeinfo *code_codeinfo_new(methodinfo *m)
    Return the codeinfo for the compilation unit that contains the
    given PC.
 
-   IN:
+   ARGUMENTS:
        pc...............machine code position
 
    RETURN VALUE:
@@ -109,8 +110,7 @@ codeinfo *code_find_codeinfo_for_pc(void *pc)
 {
        void *pv;
 
-       pv = codegen_get_pv_from_pc(pc);
-       assert(pv);
+       pv = methodtree_find(pc);
 
        return code_get_codeinfo_for_pv(pv);
 }
@@ -134,7 +134,7 @@ codeinfo *code_find_codeinfo_for_pc_nocheck(void *pc)
 {
        void *pv;
 
-       pv = codegen_get_pv_from_pc_nocheck(pc);
+       pv = methodtree_find_nocheck(pc);
 
        if (pv == NULL)
                return NULL;