(resolve_class_eager_no_access_check): New function.
* src/vm/jit/powerpc/patcher.c: Use resolve_class_eager_no_access_check.
* src/vm/jit/arm/patcher.c: Likewise.
* src/vm/jit/sparc64/patcher.c: Likewise.
* src/vm/jit/alpha/patcher.c: Likewise.
* src/vm/jit/s390/patcher.c: Likewise.
* src/vm/jit/mips/patcher.c: Likewise.
* src/vm/jit/powerpc64/patcher.c: Likewise.
* src/vm/jit/i386/patcher.c: Likewise.
* src/vm/jit/x86_64/patcher.c: Likewise.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7251 2007-01-29 20:24:53Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
bool patcher_resolve_class(u1 *sp)
{
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
return true;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7259 2007-01-30 13:58:35Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
bool patcher_athrow_areturn(u1 *sp)
{
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
uc = (unresolved_class *) *((ptrint *) (sp + 1 * 4));
- /* check if the class is initialized */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
return true;
memory. All functions writing values into the data area return the offset
relative the begin of the code area (start of procedure).
- $Id: codegen-common.c 7403 2007-02-25 21:31:58Z pm $
+ $Id: codegen-common.c 7407 2007-02-26 19:12:03Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7255 2007-01-29 21:39:38Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
u1 *ra;
u8 mcode;
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
mcode = *((u8 *) (sp + 2 * 4));
uc = (unresolved_class *) *((ptrint *) (sp + 1 * 4));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
/* patch back original code */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7252 2007-01-29 21:09:01Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
bool patcher_athrow_areturn(u1 *sp)
{
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
return true;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7246 2007-01-29 18:49:05Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
bool patcher_resolve_class(u1 *sp)
{
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 4));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
return true;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7311 2007-02-09 13:20:27Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
u1 *ra;
u4 mcode;
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
mcode = *((u4 *) (sp + 3 * 8));
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
/* patch back original code */
Changes:
- $Id: patcher.c 7373 2007-02-18 20:16:14Z pm $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
u1 *ra;
u4 mcode;
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
mcode = *((u4 *) (sp + 3 * 4));
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 4));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
/* patch back original code */
bool patcher_athrow_areturn(u1 *sp)
{
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
return true;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7248 2007-01-29 19:28:12Z twisti $
+ $Id: patcher.c 7431 2007-03-01 13:49:14Z edwin $
*/
u1 *ra;
u8 mcode;
unresolved_class *uc;
- classinfo *c;
/* get stuff from the stack */
mcode = *((u8 *) (sp + 3 * 8));
uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8));
- /* resolve the class */
+ /* resolve the class and check subtype constraints */
- if (!resolve_class(uc, resolveEager, false, &c))
+ if (!resolve_class_eager_no_access_check(uc))
return false;
/* patch back original code */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: resolve.c 7427 2007-03-01 12:32:10Z edwin $
+ $Id: resolve.c 7431 2007-03-01 13:49:14Z edwin $
*/
}
#endif /* ENABLE_VERIFIER */
+/* resolve_class_eager_no_access_check *****************************************
+
+ Resolve an unresolved class reference eagerly. The class is also linked.
+ Access rights are _not_ checked.
+
+ IN:
+ ref..............struct containing the reference
+
+ RETURN VALUE:
+ classinfo * to the class, or
+ NULL if an exception has been thrown
+
+*******************************************************************************/
+
+#ifdef ENABLE_VERIFIER
+classinfo * resolve_class_eager_no_access_check(unresolved_class *ref)
+{
+ classinfo *c;
+
+ if (!resolve_class(ref, resolveEager, false, &c))
+ return NULL;
+
+ return c;
+}
+#endif /* ENABLE_VERIFIER */
+
/******************************************************************************/
/* FIELD RESOLUTION */
/******************************************************************************/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: resolve.h 7246 2007-01-29 18:49:05Z twisti $
+ $Id: resolve.h 7431 2007-03-01 13:49:14Z edwin $
*/
classinfo **result);
classinfo * resolve_class_eager(unresolved_class *ref);
+classinfo * resolve_class_eager_no_access_check(unresolved_class *ref);
#endif /* ENABLE_VERIFIER */
bool resolve_field(unresolved_field *ref,