91 #if !defined(TYPECHECK_TYPEINFERER)
93 if (!
OP1->is_reference()) {
94 VERIFY_ERROR(
"illegal instruction: ALOAD loading non-reference");
97 DST->typeinfo =
OP1->typeinfo;
104 DST->typeinfo =
OP1->typeinfo;
111 #if !defined(TYPECHECK_TYPEINFERER)
112 if (!
OP1->typeinfo.maybe_array_of_refs())
113 VERIFY_ERROR(
"illegal instruction: AALOAD on non-reference array");
116 if (!
DST->typeinfo.init_component(
OP1->typeinfo))
174 constvalue.type = fieldref->parseddesc.fd->type;
176 if (state->iptr->sx.val.anyptr) {
181 constvalue.typeinfo.init_class(cc);
184 constvalue.typeinfo.init_nulltype();
195 constvalue.type = fieldref->parseddesc.fd->type;
197 if (state->iptr->sx.val.anyptr) {
202 constvalue.typeinfo.init_class(cc);
205 constvalue.typeinfo.init_nulltype();
230 VERIFY_ERROR(
"illegal instruction: ARRAYLENGTH on non-array");
310 if (!
OP1->typeinfo.maybe_array_of_refs())
311 VERIFY_ERROR(
"illegal instruction: AASTORE to non-reference array");
346 DST->typeinfo.init_java_lang_class(
IPTR->sx.val.c);
349 if (
IPTR->sx.val.anyptr == NULL)
350 DST->typeinfo.init_nulltype();
362 #if !defined(TYPECHECK_TYPEINFERER)
364 if (!
OP1->typeinfo.is_reference())
365 VERIFY_ERROR(
"Illegal instruction: CHECKCAST on non-reference");
369 if (!
DST->typeinfo.init_class(
IPTR->sx.s23.s3.c))
375 if (!
OP1->typeinfo.is_reference())
376 VERIFY_ERROR(
"Illegal instruction: INSTANCEOF on non-reference");
429 table =
IPTR->dst.table;
430 i =
IPTR->sx.s23.s3.tablehigh
431 -
IPTR->sx.s23.s2.tablelow + 1 + 1;
445 lookup =
IPTR->dst.lookup;
446 i =
IPTR->sx.s23.s2.lookupcount;
450 REACH(lookup->target);
465 VERIFY_ERROR(
"illegal instruction: ATHROW on non-Throwable");
483 if (!
OP1->typeinfo.is_reference())
484 VERIFY_ERROR(
"illegal instruction: ARETURN on non-reference");
487 || (r =
OP1->typeinfo.is_assignable_to(&(
STATE->returntype.typeinfo)))
497 METHOD->parseddesc->returntype.classref,
535 OLD_LOG(
"Checking <init> marker");
536 #if defined(TYPECHECK_VARIABLESBASED)
541 VERIFY_ERROR(
"<init> method does not initialize 'this'");
549 DST->typeinfo.init_returnaddress(
BPTR->next);
555 tbptr =
IPTR->sx.s23.s3.jsrtarget.block;
557 stack[0].typeinfo.init_returnaddress(tbptr);
566 #if !defined(TYPECHECK_TYPEINFERER)
569 VERIFY_ERROR(
"illegal instruction: RET using non-returnAddress variable");
577 if (!
STATE->locals[
IPTR->s1.varindex].typeinfo.is_primitive())
578 VERIFY_ERROR(
"illegal instruction: RET using non-returnAddress variable");
609 stack -= md->paramslots;
616 stack[-1].type = md->returntype.type;
621 stack[0].type = md->returntype.type;
658 u1 rtype =
IPTR->sx.s23.s3.bte->md->returntype.type;
659 stack -=
IPTR->sx.s23.s3.bte->md->paramslots;
#define CHECK_LOCAL_TYPE(index, t)
static bool typecheck_stackbased_multianewarray(verifier_state *state, typedescriptor_t *stack, typedescriptor_t *stackfloor)
#define TYPECHECK_COUNT(cnt)
static bool handle_invocation(verifier_state *state)
#define DST(typed, index)
#define CHECK_STACK_SPACE(d)
#define CHECK_STACK_TYPE(s, t)
static bool typecheck_stackbased_ret(verifier_state *state, typedescriptor_t *stack, typedescriptor_t *stackfloor)
bool typevector_checkretaddr(varinfo *vec, int index)
classinfo * pseudo_class_Arraystub
classinfo * class_java_lang_Object
#define REACH_BLOCK(target)
#define IS_2_WORD_TYPE(a)
#define CHECK_STACK_DEPTH(d)
static bool handle_builtin(verifier_state *state)
#define VERIFY_ERROR(msg)
alloc::list< PassInfo::IDTy >::type & stack
#define INSTRUCTION_GET_FIELDREF(iptr, fref)
classinfo * class_java_lang_Class
static bool typecheck_stackbased_verify_invocation(verifier_state *state, typedescriptor_t *stack, typedescriptor_t *stackfloor)
constant_classref * class_get_classref(classinfo *cls, Utf8String name)
#define INSTRUCTION_GET_METHODDESC(iptr, md)
#define COPYTYPE(source, dest)
classinfo * class_java_lang_String
static bool typecheck_stackbased_verify_builtin(verifier_state *state, typedescriptor_t *stack, typedescriptor_t *stackfloor)
static typedescriptor_t * typecheck_stackbased_verify_fieldaccess(verifier_state *state, typedescriptor_t *instance, typedescriptor_t *value, typedescriptor_t *stack)
#define TYPECHECK_COUNTIF(cond, cnt)
#define INSTRUCTION_IS_UNRESOLVED(iptr)
static classref_or_classinfo to_classref_or_classinfo(classinfo *c)
Functions for casting a classref/classinfo to a classref_or_classinfo.
static typedescriptor_t * typecheck_stackbased_jsr(verifier_state *state, typedescriptor_t *stack, typedescriptor_t *stackfloor)
unresolved_class * create_unresolved_class(methodinfo *refmethod, constant_classref *classref, typeinfo_t *valuetype)
static bool handle_multianewarray(verifier_state *state)
classinfo * class_java_lang_Throwable
bool typevector_checktype(varinfo *vec, int index, int type)
static bool handle_fieldaccess(verifier_state *state, varinfo *instance, varinfo *value)