* src/vm/jit/code.c (code_get_methodinfo_from_pv): New function.
authoredwin <none@none>
Mon, 5 Mar 2007 17:32:38 +0000 (17:32 +0000)
committeredwin <none@none>
Mon, 5 Mar 2007 17:32:38 +0000 (17:32 +0000)
src/vm/jit/code.c

index b9cff59188445498598688f0719480bd735216e2..fb88d79a427b763431466aee1f84bbe9fbc0fa39 100644 (file)
@@ -129,6 +129,28 @@ codeinfo *code_find_codeinfo_for_pc(u1 *pc)
 }
 
 
+/* code_get_methodinfo_for_pv **************************************************
+
+   Return the methodinfo for the given PV.
+
+   IN:
+       pv...............PV
+
+   RETURN VALUE:
+       the methodinfo *
+
+*******************************************************************************/
+
+methodinfo *code_get_methodinfo_for_pv(u1 *pv)
+{
+       codeinfo *code;
+
+       code = *((codeinfo **) (pv + CodeinfoPointer));
+
+       return code->m;
+}
+
+
 /* code_get_sync_slot_count ****************************************************
 
    Return the number of stack slots used for storing the synchronized object