* Removed all Id tags.
[cacao.git] / src / vm / jit / i386 / patcher.c
index db1c9a8315d91de91c82111d13c24ba480dabfc6..42f138e1d63aab9d4d4e49c11b7bd3f219a872cd 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 7596 2007-03-28 21:05:53Z twisti $
-
 */
 
 
 #include "config.h"
+
+#include <stdint.h>
+
 #include "vm/types.h"
 
 #include "vm/jit/i386/codegen.h"
 
 *******************************************************************************/
 
-java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra)
+java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra)
 {
        stackframeinfo     sfi;
        u1                *xpc;
-       java_objectheader *o;
+       java_object_t     *o;
        functionptr        f;
        bool               result;
-       java_objectheader *e;
+       java_handle_t     *e;
 
        /* define the patcher function */
 
@@ -77,7 +78,7 @@ java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra)
        /* get stuff from the stack */
 
        xpc = (u1 *)                *((ptrint *) (sp + 6 * 4));
-       o   = (java_objectheader *) *((ptrint *) (sp + 4 * 4));
+       o   = (java_object_t *)     *((ptrint *) (sp + 4 * 4));
        f   = (functionptr)         *((ptrint *) (sp + 0 * 4));
 
        /* calculate and set the new return address */
@@ -171,7 +172,7 @@ bool patcher_get_putstatic(u1 *sp)
 
        /* patch the field value's address */
 
-       *((ptrint *) (ra + 1)) = (ptrint) &(fi->value);
+       *((intptr_t *) (ra + 1)) = (intptr_t) fi->value;
 
        return true;
 }
@@ -434,11 +435,6 @@ bool patcher_builtin_multianewarray(u1 *sp)
 
        *((ptrint *) (ra + 7 + 4)) = (ptrint) c;
 
-       /* patch new function address */
-
-       *((ptrint *) (ra + 7 + 8 + 2 + 3 + 4 + 1)) =
-               (ptrint) BUILTIN_multianewarray;
-
        return true;
 }