53 #ifdef ENABLE_VERIFIER
56 #define TYPEINFO_DEBUG
58 #define TYPECHECK_DEBUG
62 #if defined(TYPECHECK_VERBOSE) || defined(TYPECHECK_VERBOSE_IMPORTANT)
63 #define TYPECHECK_VERBOSE_OPT
68 #ifdef TYPECHECK_VERBOSE_OPT
69 extern bool opt_typecheckverbose;
78 #define TYPECHECK_MAYBE 0x02
79 #define TYPECHECK_FAIL 0x04
89 #if TYPECHECK_MAYBE == true
90 #error "`typecheck_MAYBE` must not be the same as `true`"
92 #if TYPECHECK_MAYBE == false
93 #error "`typecheck_MAYBE` must not be the same as `false`"
97 #if (true & TYPECHECK_FAIL) != 0
98 #error "`true` must not have bit 0x02 set (conflicts with typecheck_FAIL)"
400 #define TYPEVECTOR_SIZE(size) \
401 ((size) * sizeof(varinfo))
403 #define DNEW_TYPEVECTOR(size) \
404 ((varinfo *) DumpMemory::allocate(TYPEVECTOR_SIZE(size)))
406 #define DMNEW_TYPEVECTOR(num,size) \
407 ((varinfo *) DumpMemory::allocate((num) * TYPEVECTOR_SIZE(size)))
409 #define MGET_TYPEVECTOR(array,index,size) \
410 ((varinfo*) (((u1*)(array)) + TYPEVECTOR_SIZE(size) * (index)))
446 int buflen,
bool twoword,
int startindex,
450 int buflen,
int startindex,
456 #ifdef TYPEINFO_DEBUG
bool typeinfo_init_varinfos_from_methoddesc(varinfo *vars, methoddesc *desc, int buflen, int startindex, s4 *map, typedescriptor_t *returntype)
void init_class(classinfo *c)
Initialize object type.
void init_newobject(instruction *instr)
bool maybe_primitive_array(ArrayType at) const
classref_or_classinfo list[1]
int typedescriptors_init_from_methoddesc(typedescriptor_t *td, methoddesc *desc, int buflen, bool twoword, int startindex, typedescriptor_t *returntype)
bool maybe_array_of_refs() const
bool init_component(const typeinfo_t &srcarray)
void init_non_array_classinfo(classinfo *cls)
classref_or_classinfo elementclass
bool is_newobject() const
bool typevector_checkretaddr(varinfo *vec, int index)
bool init_class(constant_classref *c)
void init_primitive_array(ArrayType arraytype)
bool is_reference() const
JNIEnv jthread jobject jclass jlong size
classinfo * pseudo_class_Null
bool is_primitive_array(ArrayType at) const
void typevector_print(FILE *file, const varinfo *vec, int size)
void typeinfo_init_classinfo(typeinfo_t *info, classinfo *c)
typecheck_result typevector_merge(methodinfo *m, varinfo *dst, varinfo *y, int size)
bool typevector_init_object(varinfo *set, void *ins, classref_or_classinfo initclass, int size)
typecheck_result merge(methodinfo *m, const typeinfo_t *t)
functions for merging types
bool is_array_of_refs() const
void init_returnaddress(void *adr)
classinfo * class_java_lang_Class
void typeinfo_print_type(FILE *file, int type, const typeinfo_t *info)
Type
Types used internally by JITTED code.
static void clone_merged(const typeinfo_t &src, typeinfo_t &dst)
void typevector_copy_inplace(varinfo *src, varinfo *dst, int size)
typeinfo_mergedlist_t * merged
typecheck_result is_assignable_to(typeinfo_t *dest) const
bool typevector_checkreference(varinfo *vec, int index)
void * returnaddress() const
typecheck_result is_assignable_to_class(classref_or_classinfo dest) const
bool is_primitive() const
void typeinfo_print(FILE *file, const typeinfo_t *info, int indent)
instruction * newobject_instruction() const
#define EXPENSIVE_ASSERT(EXPR)
An assertion that performs computations too expensive even for a normal debug build.
bool is_simple_array() const
bool init_from_typedesc(const typedesc *desc, u1 *type)
classref_or_classinfo typeclass
void typeinfo_print_short(FILE *file, const typeinfo_t *info)
void typevector_store(varinfo *vec, int index, Type type, typeinfo_t *info)
classinfo * pseudo_class_New
void typevector_store_retaddr(varinfo *vec, int index, typeinfo_t *info)
jmethodID jint const void jint const jvmtiAddrLocationMap * map
Additional assertion macros.
void typeinfo_print_class(FILE *file, classref_or_classinfo c)
bool is_returnaddress() const
void typedescriptor_print(FILE *file, const typedescriptor_t *td)
static classref_or_classinfo to_classref_or_classinfo(classinfo *c)
Functions for casting a classref/classinfo to a classref_or_classinfo.
primitivetypeinfo primitivetype_table[PRIMITIVETYPE_MAX]
bool typevector_checktype(varinfo *vec, int index, int type)
bool is_reference() const
static void clone(const typeinfo_t &src, typeinfo_t &dst)
void init_java_lang_class(classref_or_classinfo cls)
Initialize object type java.lang.Class.
varinfo * typevector_copy(varinfo *src, int size)