Changes:
- $Id: patcher.c 2527 2005-05-25 08:07:57Z twisti $
+ $Id: patcher.c 2607 2005-06-08 19:26:04Z twisti $
*/
#include "vm/jit/alpha/types.h"
+
+#include "mm/memory.h"
#include "vm/builtin.h"
#include "vm/field.h"
#include "vm/initialize.h"
/* get the fieldinfo */
- if (!(fi = helper_resolve_fieldinfo(uf)))
+ if (!(fi = helper_resolve_fieldinfo(uf))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* check if the field's class is initialized */
- if (!fi->class->initialized)
- if (!initialize_class(fi->class))
+ if (!fi->class->initialized) {
+ if (!initialize_class(fi->class)) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
{
u1 *ra;
java_objectheader *o;
- u8 mcode;
+ u4 mcode;
unresolved_field *uf;
u1 *pv;
fieldinfo *fi;
/* get the fieldinfo */
- if (!(fi = helper_resolve_fieldinfo(uf)))
+ if (!(fi = helper_resolve_fieldinfo(uf))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the classinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the classinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the classinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the classinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the classinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(m = helper_resolve_methodinfo(um)))
+ if (!(m = helper_resolve_methodinfo(um))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(m = helper_resolve_methodinfo(um)))
+ if (!(m = helper_resolve_methodinfo(um))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(m = helper_resolve_methodinfo(um)))
+ if (!(m = helper_resolve_methodinfo(um))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* get the fieldinfo */
- if (!(c = helper_resolve_classinfo(cr)))
+ if (!(c = helper_resolve_classinfo(cr))) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}
/* check if the class is initialized */
- if (!c->initialized)
- if (!initialize_class(c))
+ if (!c->initialized) {
+ if (!initialize_class(c)) {
+ PATCHER_MONITOREXIT;
+
return false;
+ }
+ }
/* patch back original code */
asm_sync_instruction_cache();
- PATCHER_MONITOREXIT;
+ PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
}