32 #if !defined(TYPECHECK_TYPEINFERER)
42 #if defined(TYPECHECK_VARIABLESBASED)
59 um = state->iptr->sx.s23.s3.um;
65 mref = state->iptr->sx.s23.s3.fmiref;
73 #if !defined(TYPECHECK_TYPEINFERER)
87 opcode = state->iptr->opc;
90 specialmethod = (mname[0] ==
'<');
98 callinginit = (invokespecial && mname == utf8::init);
99 if (specialmethod && !callinginit)
108 #if defined(TYPECHECK_STACKBASED)
114 argindex = state->iptr->sx.s23.s2.args[
i];
125 if (i==0 && callinginit)
135 initclass = ins[-1].
sx.
val.
c;
137 initclass.
cls = state->m->clazz;
144 if (i==0 && !invokestatic) {
150 #if defined(TYPECHECK_STACKBASED)
156 OLD_LOG(
"\treplacing uninitialized object");
160 #if defined(TYPECHECK_VARIABLESBASED)
161 for (i=0; i<state->iptr->s1.argcount; ++
i) {
162 argindex = state->iptr->sx.s23.s2.args[
i];
165 for (av=stackfloor; av <=
stack; ++av) {
171 OLD_LOG(
"\treplacing uninitialized type");
173 #if defined(TYPECHECK_VARIABLESBASED)
179 if (state->bptr->invars
180 && argindex >= state->bptr->invars[0]
181 && argindex < state->bptr->varstart
182 && !state->savedinvars)
194 #if defined(TYPECHECK_VARIABLESBASED)
200 for (i=0; i<state->numlocals; ++
i) {
201 if (state->locals[i].type ==
TYPE_ADR
202 && state->locals[i].typeinfo.is_newobject()
203 && state->locals[
i].typeinfo.newobject_instruction() == ins)
205 if (!state->locals[i].typeinfo.init_class(initclass))
229 if (cls == NULL || (cls != state->m->clazz && cls != state->m->clazz->
super)) {
234 OLD_LOG(
"\tsetting <init> marker");
235 #if defined(TYPECHECK_VARIABLESBASED)
238 state->locals[state->numlocals-1].type =
TYPE_INT;
275 #if defined(TYPECHECK_VARIABLESBASED)
278 jd, state->m, state->iptr,
283 state->m, mi, invokestatic,
stack);
328 #if defined(TYPECHECK_VARIABLESBASED)
330 jd, um, state->m, state->iptr))
334 um, state->m,
stack))
340 state->iptr->sx.s23.s3.um = um;
350 if (!dv->typeinfo.init_from_typedesc(&md->
returntype, NULL))
void init_class(classinfo *c)
Initialize object type.
resolve_result_t resolve_method_verifier_checks(methodinfo *refmethod, constant_FMIref *methodref, methodinfo *mi, bool invokestatic)
bool resolve_constrain_unresolved_method_params(jitdata *jd, unresolved_method *ref, methodinfo *refmethod, instruction *iptr)
unresolved_method * resolve_create_unresolved_method(classinfo *referer, methodinfo *refmethod, constant_FMIref *methodref, bool invokestatic, bool invokespecial)
bool resolve_classref(methodinfo *refmethod, constant_classref *ref, resolve_mode_t mode, bool checkaccess, bool link, classinfo **result)
#define OLD_LOGINFO(info)
bool is_newobject() const
union constant_FMIref::@26 p
#define TYPECHECK_ASSERT(cond)
bool resolve_constrain_unresolved_method_instance(unresolved_method *ref, methodinfo *refmethod, typeinfo_t *instanceti, bool invokespecial)
bool resolve_constrain_unresolved_method_params_stackbased(unresolved_method *ref, methodinfo *refmethod, typedescriptor_t *stack)
bool typevector_init_object(varinfo *set, void *ins, classref_or_classinfo initclass, int size)
#define IS_2_WORD_TYPE(a)
resolve_result_t resolve_method_instance_type_checks(methodinfo *refmethod, methodinfo *mi, typeinfo_t *instanceti, bool invokespecial)
resolve_result_t resolve_method_lazy(methodinfo *refmethod, constant_FMIref *methodref, bool invokespecial)
alloc::list< PassInfo::IDTy >::type & stack
Type
Types used internally by JITTED code.
#define TYPECHECK_VERIFYERROR_bool(msg)
Fieldref, Methodref and InterfaceMethodref.
union instruction::@12 sx
#define CLASSREF_OR_CLASSINFO_NAME(value)
instruction * newobject_instruction() const
void params_from_paramtypes(s4 mflags)
static void typestate_save_invars(verifier_state *state)
resolve_result_t resolve_method_param_type_checks_stackbased(methodinfo *refmethod, methodinfo *mi, bool invokestatic, typedescriptor_t *stack)
constant_FMIref * methodref
void typevector_store(varinfo *vec, int index, Type type, typeinfo_t *info)
constant_classref * classref
#define INSTRUCTION_IS_UNRESOLVED(iptr)
const parseddesc_t parseddesc
bool resolve_method_loading_constraints(classinfo *referer, methodinfo *mi)
resolve_result_t resolve_method_param_type_checks(jitdata *jd, methodinfo *refmethod, instruction *iptr, methodinfo *mi, bool invokestatic)