* src/vm/jit/mips/codegen.c (codegen_emit_stub_native): Removed
[cacao.git] / src / vm / jit / powerpc / patcher.c
index 006c8914890affd3a77d621b642ceba3ff23233a..a543d00a25592ac27efb00ad8639375e3faa9e4c 100644 (file)
        md_icacheflush((u1 *) pr->mpc, 4);
 
 
-/* patcher_initialize_class ****************************************************
+/* patcher_patch_code **********************************************************
 
-   Initalizes a given classinfo pointer.  This function does not patch
-   any data.
+   Just patches back the original machine code.
 
 *******************************************************************************/
 
-bool patcher_initialize_class(patchref_t *pr)
+void patcher_patch_code(patchref_t *pr)
 {
-       classinfo *c;
-
-       /* get stuff from the stack */
-
-       c = (classinfo *) pr->ref;
-
-       /* check if the class is initialized */
-
-       if (!(c->state & CLASS_INITIALIZED))
-               if (!initialize_class(c))
-                       return false;
-
        PATCH_BACK_ORIGINAL_MCODE;
-
-       return true;
 }
 
 
-/* patcher_resolve_class *******************************************************
-
-   Resolves a given unresolved_class pointer.  This function does not
-   patch any data.
-
-*******************************************************************************/
-
-#ifdef ENABLE_VERIFIER
-bool patcher_resolve_class(patchref_t *pr)
-{
-       unresolved_class *uc;
-
-       /* get stuff from the stack */
-
-       uc = (unresolved_class *) pr->ref;
-
-       /* resolve the class and check subtype constraints */
-
-       if (!resolve_class_eager_no_access_check(uc))
-               return false;
-
-       PATCH_BACK_ORIGINAL_MCODE;
-
-       return true;
-}
-#endif /* ENABLE_VERIFIER */
-
-
 /* patcher_resolve_classref_to_classinfo ***************************************
 
    ACONST:
@@ -260,42 +217,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr)
 }
 
 
-/* patcher_resolve_native_function *********************************************
-
-   XXX
-
-*******************************************************************************/
-
-bool patcher_resolve_native_function(patchref_t *pr)
-{
-       methodinfo  *m;
-       u1          *datap;
-       functionptr  f;
-
-       /* get stuff from the stack */
-
-       m     = (methodinfo *) pr->ref;
-       datap = (u1 *)         pr->datap;
-
-       /* resolve native function */
-
-       if (!(f = native_resolve_function(m)))
-               return false;
-
-       PATCH_BACK_ORIGINAL_MCODE;
-
-       /* patch native function pointer */
-
-       *((ptrint *) datap) = (ptrint) f;
-
-       /* synchronize data cache */
-
-       md_dcacheflush(datap, SIZEOF_VOID_P);
-
-       return true;
-}
-
-
 /* patcher_get_putstatic *******************************************************
 
    Machine code: