calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 868 2004-01-10 20:12:10Z edwin $
+ $Id: builtin.c 890 2004-01-19 12:24:13Z edwin $
*/
#undef DEBUG /*define DEBUG 1*/
-/* XXX delete? */
-#if 0
-builtin_descriptor builtin_desc[] = {
- {(functionptr) builtin_instanceof, "instanceof"},
- {(functionptr) builtin_checkcast, "checkcast"},
- {(functionptr) asm_builtin_checkcast, "checkcast"},
- {(functionptr) builtin_arrayinstanceof, "arrayinstanceof"},
-#if defined(__I386__)
- {(functionptr) asm_builtin_arrayinstanceof,"arrayinstanceof"},
-#endif
- {(functionptr) builtin_checkarraycast, "checkarraycast"},
- {(functionptr) asm_builtin_checkarraycast, "checkarraycast"},
- {(functionptr) asm_builtin_aastore, "aastore"},
- {(functionptr) builtin_new, "new"},
- {(functionptr) builtin_newarray, "newarray"},
- {(functionptr) builtin_anewarray, "anewarray"},
-#if defined(__I386__)
- /*
- * have 2 parameters (needs stack manipulation)
- */
- {(functionptr) asm_builtin_newarray, "newarray"},
-#endif
- {(functionptr) builtin_newarray_boolean, "newarray_boolean"},
- {(functionptr) builtin_newarray_char, "newarray_char"},
- {(functionptr) builtin_newarray_float, "newarray_float"},
- {(functionptr) builtin_newarray_double, "newarray_double"},
- {(functionptr) builtin_newarray_byte, "newarray_byte"},
- {(functionptr) builtin_newarray_short, "newarray_short"},
- {(functionptr) builtin_newarray_int, "newarray_int"},
- {(functionptr) builtin_newarray_long, "newarray_long"},
- {(functionptr) builtin_displaymethodstart, "displaymethodstart"},
- {(functionptr) builtin_displaymethodstop, "displaymethodstop"},
- {(functionptr) builtin_monitorenter, "monitorenter"},
- {(functionptr) asm_builtin_monitorenter, "monitorenter"},
- {(functionptr) builtin_monitorexit, "monitorexit"},
- {(functionptr) asm_builtin_monitorexit, "monitorexit"},
-#if !SUPPORT_DIVISION
- {(functionptr) builtin_idiv, "idiv"},
- {(functionptr) asm_builtin_idiv, "idiv"},
- {(functionptr) builtin_irem, "irem"},
- {(functionptr) asm_builtin_irem, "irem"},
-#endif
- {(functionptr) builtin_ladd, "ladd"},
- {(functionptr) builtin_lsub, "lsub"},
- {(functionptr) builtin_lmul, "lmul"},
-#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
- {(functionptr) builtin_ldiv, "ldiv"},
- {(functionptr) asm_builtin_ldiv, "ldiv"},
- {(functionptr) builtin_lrem, "lrem"},
- {(functionptr) asm_builtin_lrem, "lrem"},
-#endif
- {(functionptr) builtin_lshl, "lshl"},
- {(functionptr) builtin_lshr, "lshr"},
- {(functionptr) builtin_lushr, "lushr"},
- {(functionptr) builtin_land, "land"},
- {(functionptr) builtin_lor, "lor"},
- {(functionptr) builtin_lxor, "lxor"},
- {(functionptr) builtin_lneg, "lneg"},
- {(functionptr) builtin_lcmp, "lcmp"},
- {(functionptr) builtin_fadd, "fadd"},
- {(functionptr) builtin_fsub, "fsub"},
- {(functionptr) builtin_fmul, "fmul"},
- {(functionptr) builtin_fdiv, "fdiv"},
- {(functionptr) builtin_frem, "frem"},
- {(functionptr) builtin_fneg, "fneg"},
- {(functionptr) builtin_fcmpl, "fcmpl"},
- {(functionptr) builtin_fcmpg, "fcmpg"},
- {(functionptr) builtin_dadd, "dadd"},
- {(functionptr) builtin_dsub, "dsub"},
- {(functionptr) builtin_dmul, "dmul"},
- {(functionptr) builtin_ddiv, "ddiv"},
- {(functionptr) builtin_drem, "drem"},
- {(functionptr) builtin_dneg, "dneg"},
- {(functionptr) builtin_dcmpl, "dcmpl"},
- {(functionptr) builtin_dcmpg, "dcmpg"},
- {(functionptr) builtin_i2l, "i2l"},
- {(functionptr) builtin_i2f, "i2f"},
- {(functionptr) builtin_i2d, "i2d"},
- {(functionptr) builtin_l2i, "l2i"},
- {(functionptr) builtin_l2f, "l2f"},
- {(functionptr) builtin_l2d, "l2d"},
- {(functionptr) builtin_f2i, "f2i"},
- {(functionptr) builtin_f2l, "f2l"},
- {(functionptr) builtin_f2d, "f2d"},
- {(functionptr) builtin_d2i, "d2i"},
- {(functionptr) builtin_d2l, "d2l"},
-#if defined(__I386__)
- {(functionptr) asm_builtin_f2i, "f2i"},
- {(functionptr) asm_builtin_f2l, "f2l"},
- {(functionptr) asm_builtin_d2i, "d2i"},
- {(functionptr) asm_builtin_d2l, "d2l"},
-#endif
- {(functionptr) builtin_d2f, "d2f"},
- {(functionptr) NULL, "unknown"}
-};
-#endif
-
/*****************************************************************************
TYPE CHECKS
return res;
}
-/* XXX inline this? */
s4 builtin_isanysubclass_vftbl(vftbl *sub,vftbl *super)
{
int base;
******************************************************************************/
-/* XXX inline this? */
static s4 builtin_descriptorscompatible(arraydescriptor *desc,arraydescriptor *target)
{
if (desc==target) return 1;
/* This is an optimized version where a is guaranteed to be a
* one-dimensional array of a class type */
-/* XXX this could be inlined by the code generator */
s4 builtin_canstore_onedim_class(java_objectarray *a, java_objectheader *o)
{
vftbl *elementvftbl;
/* get the vftbl of the components to create */
componentvftbl = arrayvftbl->arraydesc->componentvftbl;
- if (!componentvftbl) /* XXX the verifier could check this */
- panic ("multianewarray with too many dimensions");
+
+ /* The verifier guarantees this. */
+ /* if (!componentvftbl) */
+ /* panic ("multianewarray with too many dimensions"); */
/* create the component arrays */
for (i = 0; i < size; i++) {
Changes: Edwin Steiner
- $Id: builtin.h 879 2004-01-12 13:31:56Z twisti $
+ $Id: builtin.h 890 2004-01-19 12:24:13Z edwin $
*/
* must be an entry in the builtin_desc table in jit/jit.c.
*/
-/* XXX delete */
-#if 0
-typedef struct builtin_descriptor {
- functionptr bptr;
- char *name;
- } builtin_descriptor;
-#endif
-
typedef struct builtin_descriptor builtin_descriptor;
/* There is a builtin_descriptor in builtin_desc for every builtin
/* NOT AN OP */
#endif
#endif
-void builtin_displaymethodstart(methodinfo *method); /* XXX? */
+void builtin_displaymethodstart(methodinfo *method);
/* NOT AN OP */
void builtin_displaymethodstop(methodinfo *method, s8 l, double d, float f);
/* NOT AN OP */
-/* void builtin_displaymethodstop(methodinfo *method); */ /* XXX? */
-void builtin_displaymethodexception(methodinfo *method); /* XXX? */
+/* void builtin_displaymethodstop(methodinfo *method); */
+void builtin_displaymethodexception(methodinfo *method);
/* NOT AN OP */
void builtin_monitorenter(java_objectheader *o);
s4 builtin_lcmp(s8 a, s8 b);
#define BUILTIN_lcmp (functionptr) builtin_lcmp
-float builtin_fadd(float a, float b); /* XXX? */
+float builtin_fadd(float a, float b);
/* NOT AN OP */
-float builtin_fsub(float a, float b); /* XXX? */
+float builtin_fsub(float a, float b);
/* NOT AN OP */
-float builtin_fmul(float a, float b); /* XXX? */
+float builtin_fmul(float a, float b);
/* NOT AN OP */
-float builtin_fdiv(float a, float b); /* XXX? */
+float builtin_fdiv(float a, float b);
/* NOT AN OP */
-float builtin_fneg(float a); /* XXX? */
+float builtin_fneg(float a);
/* NOT AN OP */
-s4 builtin_fcmpl(float a, float b); /* XXX? */
+s4 builtin_fcmpl(float a, float b);
/* NOT AN OP */
-s4 builtin_fcmpg(float a, float b); /* XXX? */
+s4 builtin_fcmpg(float a, float b);
/* NOT AN OP */
float builtin_frem(float a, float b);
#define BUILTIN_frem (functionptr) builtin_frem
-double builtin_dadd(double a, double b); /* XXX? */
+double builtin_dadd(double a, double b);
/* NOT AN OP */
-double builtin_dsub(double a, double b); /* XXX? */
+double builtin_dsub(double a, double b);
/* NOT AN OP */
-double builtin_dmul(double a, double b); /* XXX? */
+double builtin_dmul(double a, double b);
/* NOT AN OP */
-double builtin_ddiv(double a, double b); /* XXX? */
+double builtin_ddiv(double a, double b);
/* NOT AN OP */
-double builtin_dneg(double a); /* XXX? */
+double builtin_dneg(double a);
/* NOT AN OP */
-s4 builtin_dcmpl(double a, double b); /* XXX? */
+s4 builtin_dcmpl(double a, double b);
/* NOT AN OP */
-s4 builtin_dcmpg(double a, double b); /* XXX? */
+s4 builtin_dcmpg(double a, double b);
/* NOT AN OP */
double builtin_drem(double a, double b);
#define BUILTIN_drem (functionptr) builtin_drem
s8 asm_builtin_f2l(float a);
/* NOT AN OP */
-double builtin_f2d(float a); /* XXX? */
+double builtin_f2d(float a);
/* NOT AN OP */
s4 builtin_d2i(double a);
s8 asm_builtin_d2l(double a);
/* NOT AN OP */
-float builtin_d2f(double a); /* XXX? */
+float builtin_d2f(double a);
/* NOT AN OP */
java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o);
Mark Probst
Edwin Steiner
- $Id: loader.c 881 2004-01-13 19:57:08Z edwin $
+ $Id: loader.c 890 2004-01-19 12:24:13Z edwin $
*/
/* check arguments */
while (utf_ptr != end_pos && *utf_ptr != ')') {
- /* XXX we cannot count the this argument here because
+ /* We cannot count the this argument here because
* we don't know if the method is static. */
if (*utf_ptr == 'J' || *utf_ptr == 'D')
argcount+=2;
/* XXX use the following if -noverify */
#if 0
- /* XXX check length */
/* check arguments */
while ((c = *utf_ptr++) != ')') {
start = utf_ptr-1;
panic("Method has more than 255 arguments");
/* check flag consistency */
- /* XXX could check if <clinit> is STATIC */
if (m->name != utf_clinit) {
i = (m->flags & (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED));
if (i != 0 && i != ACC_PUBLIC && i != ACC_PRIVATE && i != ACC_PROTECTED)
/* check ACC flags consistency */
if ((c->flags & ACC_INTERFACE) != 0) {
if ((c->flags & ACC_ABSTRACT) == 0) {
- /* XXX We work around this because interfaces in JDK 1.1 are
+ /* We work around this because interfaces in JDK 1.1 are
* not declared abstract. */
c->flags |= ACC_ABSTRACT;
methodinfo *clone;
int namelen;
- /* XXX remove */ /* dolog("class_new_array: %s",c->name->text); */
+ /* DEBUG */ /* dolog("class_new_array: %s",c->name->text); */
/* Array classes are not loaded from classfiles. */
list_remove(&unloadedclasses, c);
c->flags = ACC_PUBLIC | ACC_FINAL | ACC_ABSTRACT;
c->interfacescount = 2;
- c->interfaces = MNEW(classinfo*,2); /* XXX use GC? */
+ c->interfaces = MNEW(classinfo*,2);
c->interfaces[0] = class_java_lang_Cloneable;
c->interfaces[1] = class_java_io_Serializable;
c->methodscount = 1;
- c->methods = MNEW (methodinfo, c->methodscount); /* XXX use GC? */
+ c->methods = MNEW (methodinfo, c->methodscount);
clone = c->methods;
memset(clone, 0, sizeof(methodinfo));
- clone->flags = ACC_PUBLIC; /* XXX protected? */
+ clone->flags = ACC_PUBLIC;
clone->name = utf_new_char("clone");
clone->descriptor = utf_new_char("()Ljava/lang/Object;");
clone->class = c;
clone->stubroutine = createnativestub((functionptr) &builtin_clone_array, clone);
- clone->monoPoly = MONO; /* XXX should be poly? */
+ clone->monoPoly = MONO;
/* XXX: field: length? */
if (linkverbose)
dolog("Linking...");
- /* XXX added a hack to break infinite linking loops. A better
+ /* Added a hack to break infinite linking loops. A better
* linking algorithm would be nice. -Edwin */
notlinkable = NULL;
while ((c = list_first(&unlinkedclasses))) {
pthread_mutex_unlock(&compiler_mutex);
#endif
- /* XXX DEBUG */ if (linkverbose && !top) dolog("returning NULL from loader_load");
+ /* DEBUG */ /*if (linkverbose && !top) dolog("returning NULL from loader_load");*/
return top;
}
if (mode & CLASSLOAD_SKIP) return class_java_lang_Object;
name = utf_new(start,utf_ptr-start);
return (mode & CLASSLOAD_LOAD)
- ? loader_load(name) : class_new(name); /* XXX */
+ ? loader_load(name) : class_new(name); /* XXX handle errors */
}
}
calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 868 2004-01-10 20:12:10Z edwin $
+ $Id: builtin.c 890 2004-01-19 12:24:13Z edwin $
*/
#undef DEBUG /*define DEBUG 1*/
-/* XXX delete? */
-#if 0
-builtin_descriptor builtin_desc[] = {
- {(functionptr) builtin_instanceof, "instanceof"},
- {(functionptr) builtin_checkcast, "checkcast"},
- {(functionptr) asm_builtin_checkcast, "checkcast"},
- {(functionptr) builtin_arrayinstanceof, "arrayinstanceof"},
-#if defined(__I386__)
- {(functionptr) asm_builtin_arrayinstanceof,"arrayinstanceof"},
-#endif
- {(functionptr) builtin_checkarraycast, "checkarraycast"},
- {(functionptr) asm_builtin_checkarraycast, "checkarraycast"},
- {(functionptr) asm_builtin_aastore, "aastore"},
- {(functionptr) builtin_new, "new"},
- {(functionptr) builtin_newarray, "newarray"},
- {(functionptr) builtin_anewarray, "anewarray"},
-#if defined(__I386__)
- /*
- * have 2 parameters (needs stack manipulation)
- */
- {(functionptr) asm_builtin_newarray, "newarray"},
-#endif
- {(functionptr) builtin_newarray_boolean, "newarray_boolean"},
- {(functionptr) builtin_newarray_char, "newarray_char"},
- {(functionptr) builtin_newarray_float, "newarray_float"},
- {(functionptr) builtin_newarray_double, "newarray_double"},
- {(functionptr) builtin_newarray_byte, "newarray_byte"},
- {(functionptr) builtin_newarray_short, "newarray_short"},
- {(functionptr) builtin_newarray_int, "newarray_int"},
- {(functionptr) builtin_newarray_long, "newarray_long"},
- {(functionptr) builtin_displaymethodstart, "displaymethodstart"},
- {(functionptr) builtin_displaymethodstop, "displaymethodstop"},
- {(functionptr) builtin_monitorenter, "monitorenter"},
- {(functionptr) asm_builtin_monitorenter, "monitorenter"},
- {(functionptr) builtin_monitorexit, "monitorexit"},
- {(functionptr) asm_builtin_monitorexit, "monitorexit"},
-#if !SUPPORT_DIVISION
- {(functionptr) builtin_idiv, "idiv"},
- {(functionptr) asm_builtin_idiv, "idiv"},
- {(functionptr) builtin_irem, "irem"},
- {(functionptr) asm_builtin_irem, "irem"},
-#endif
- {(functionptr) builtin_ladd, "ladd"},
- {(functionptr) builtin_lsub, "lsub"},
- {(functionptr) builtin_lmul, "lmul"},
-#if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV)
- {(functionptr) builtin_ldiv, "ldiv"},
- {(functionptr) asm_builtin_ldiv, "ldiv"},
- {(functionptr) builtin_lrem, "lrem"},
- {(functionptr) asm_builtin_lrem, "lrem"},
-#endif
- {(functionptr) builtin_lshl, "lshl"},
- {(functionptr) builtin_lshr, "lshr"},
- {(functionptr) builtin_lushr, "lushr"},
- {(functionptr) builtin_land, "land"},
- {(functionptr) builtin_lor, "lor"},
- {(functionptr) builtin_lxor, "lxor"},
- {(functionptr) builtin_lneg, "lneg"},
- {(functionptr) builtin_lcmp, "lcmp"},
- {(functionptr) builtin_fadd, "fadd"},
- {(functionptr) builtin_fsub, "fsub"},
- {(functionptr) builtin_fmul, "fmul"},
- {(functionptr) builtin_fdiv, "fdiv"},
- {(functionptr) builtin_frem, "frem"},
- {(functionptr) builtin_fneg, "fneg"},
- {(functionptr) builtin_fcmpl, "fcmpl"},
- {(functionptr) builtin_fcmpg, "fcmpg"},
- {(functionptr) builtin_dadd, "dadd"},
- {(functionptr) builtin_dsub, "dsub"},
- {(functionptr) builtin_dmul, "dmul"},
- {(functionptr) builtin_ddiv, "ddiv"},
- {(functionptr) builtin_drem, "drem"},
- {(functionptr) builtin_dneg, "dneg"},
- {(functionptr) builtin_dcmpl, "dcmpl"},
- {(functionptr) builtin_dcmpg, "dcmpg"},
- {(functionptr) builtin_i2l, "i2l"},
- {(functionptr) builtin_i2f, "i2f"},
- {(functionptr) builtin_i2d, "i2d"},
- {(functionptr) builtin_l2i, "l2i"},
- {(functionptr) builtin_l2f, "l2f"},
- {(functionptr) builtin_l2d, "l2d"},
- {(functionptr) builtin_f2i, "f2i"},
- {(functionptr) builtin_f2l, "f2l"},
- {(functionptr) builtin_f2d, "f2d"},
- {(functionptr) builtin_d2i, "d2i"},
- {(functionptr) builtin_d2l, "d2l"},
-#if defined(__I386__)
- {(functionptr) asm_builtin_f2i, "f2i"},
- {(functionptr) asm_builtin_f2l, "f2l"},
- {(functionptr) asm_builtin_d2i, "d2i"},
- {(functionptr) asm_builtin_d2l, "d2l"},
-#endif
- {(functionptr) builtin_d2f, "d2f"},
- {(functionptr) NULL, "unknown"}
-};
-#endif
-
/*****************************************************************************
TYPE CHECKS
return res;
}
-/* XXX inline this? */
s4 builtin_isanysubclass_vftbl(vftbl *sub,vftbl *super)
{
int base;
******************************************************************************/
-/* XXX inline this? */
static s4 builtin_descriptorscompatible(arraydescriptor *desc,arraydescriptor *target)
{
if (desc==target) return 1;
/* This is an optimized version where a is guaranteed to be a
* one-dimensional array of a class type */
-/* XXX this could be inlined by the code generator */
s4 builtin_canstore_onedim_class(java_objectarray *a, java_objectheader *o)
{
vftbl *elementvftbl;
/* get the vftbl of the components to create */
componentvftbl = arrayvftbl->arraydesc->componentvftbl;
- if (!componentvftbl) /* XXX the verifier could check this */
- panic ("multianewarray with too many dimensions");
+
+ /* The verifier guarantees this. */
+ /* if (!componentvftbl) */
+ /* panic ("multianewarray with too many dimensions"); */
/* create the component arrays */
for (i = 0; i < size; i++) {
Changes: Edwin Steiner
- $Id: builtin.h 879 2004-01-12 13:31:56Z twisti $
+ $Id: builtin.h 890 2004-01-19 12:24:13Z edwin $
*/
* must be an entry in the builtin_desc table in jit/jit.c.
*/
-/* XXX delete */
-#if 0
-typedef struct builtin_descriptor {
- functionptr bptr;
- char *name;
- } builtin_descriptor;
-#endif
-
typedef struct builtin_descriptor builtin_descriptor;
/* There is a builtin_descriptor in builtin_desc for every builtin
/* NOT AN OP */
#endif
#endif
-void builtin_displaymethodstart(methodinfo *method); /* XXX? */
+void builtin_displaymethodstart(methodinfo *method);
/* NOT AN OP */
void builtin_displaymethodstop(methodinfo *method, s8 l, double d, float f);
/* NOT AN OP */
-/* void builtin_displaymethodstop(methodinfo *method); */ /* XXX? */
-void builtin_displaymethodexception(methodinfo *method); /* XXX? */
+/* void builtin_displaymethodstop(methodinfo *method); */
+void builtin_displaymethodexception(methodinfo *method);
/* NOT AN OP */
void builtin_monitorenter(java_objectheader *o);
s4 builtin_lcmp(s8 a, s8 b);
#define BUILTIN_lcmp (functionptr) builtin_lcmp
-float builtin_fadd(float a, float b); /* XXX? */
+float builtin_fadd(float a, float b);
/* NOT AN OP */
-float builtin_fsub(float a, float b); /* XXX? */
+float builtin_fsub(float a, float b);
/* NOT AN OP */
-float builtin_fmul(float a, float b); /* XXX? */
+float builtin_fmul(float a, float b);
/* NOT AN OP */
-float builtin_fdiv(float a, float b); /* XXX? */
+float builtin_fdiv(float a, float b);
/* NOT AN OP */
-float builtin_fneg(float a); /* XXX? */
+float builtin_fneg(float a);
/* NOT AN OP */
-s4 builtin_fcmpl(float a, float b); /* XXX? */
+s4 builtin_fcmpl(float a, float b);
/* NOT AN OP */
-s4 builtin_fcmpg(float a, float b); /* XXX? */
+s4 builtin_fcmpg(float a, float b);
/* NOT AN OP */
float builtin_frem(float a, float b);
#define BUILTIN_frem (functionptr) builtin_frem
-double builtin_dadd(double a, double b); /* XXX? */
+double builtin_dadd(double a, double b);
/* NOT AN OP */
-double builtin_dsub(double a, double b); /* XXX? */
+double builtin_dsub(double a, double b);
/* NOT AN OP */
-double builtin_dmul(double a, double b); /* XXX? */
+double builtin_dmul(double a, double b);
/* NOT AN OP */
-double builtin_ddiv(double a, double b); /* XXX? */
+double builtin_ddiv(double a, double b);
/* NOT AN OP */
-double builtin_dneg(double a); /* XXX? */
+double builtin_dneg(double a);
/* NOT AN OP */
-s4 builtin_dcmpl(double a, double b); /* XXX? */
+s4 builtin_dcmpl(double a, double b);
/* NOT AN OP */
-s4 builtin_dcmpg(double a, double b); /* XXX? */
+s4 builtin_dcmpg(double a, double b);
/* NOT AN OP */
double builtin_drem(double a, double b);
#define BUILTIN_drem (functionptr) builtin_drem
s8 asm_builtin_f2l(float a);
/* NOT AN OP */
-double builtin_f2d(float a); /* XXX? */
+double builtin_f2d(float a);
/* NOT AN OP */
s4 builtin_d2i(double a);
s8 asm_builtin_d2l(double a);
/* NOT AN OP */
-float builtin_d2f(double a); /* XXX? */
+float builtin_d2f(double a);
/* NOT AN OP */
java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o);
Mark Probst
Edwin Steiner
- $Id: loader.c 881 2004-01-13 19:57:08Z edwin $
+ $Id: loader.c 890 2004-01-19 12:24:13Z edwin $
*/
/* check arguments */
while (utf_ptr != end_pos && *utf_ptr != ')') {
- /* XXX we cannot count the this argument here because
+ /* We cannot count the this argument here because
* we don't know if the method is static. */
if (*utf_ptr == 'J' || *utf_ptr == 'D')
argcount+=2;
/* XXX use the following if -noverify */
#if 0
- /* XXX check length */
/* check arguments */
while ((c = *utf_ptr++) != ')') {
start = utf_ptr-1;
panic("Method has more than 255 arguments");
/* check flag consistency */
- /* XXX could check if <clinit> is STATIC */
if (m->name != utf_clinit) {
i = (m->flags & (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED));
if (i != 0 && i != ACC_PUBLIC && i != ACC_PRIVATE && i != ACC_PROTECTED)
/* check ACC flags consistency */
if ((c->flags & ACC_INTERFACE) != 0) {
if ((c->flags & ACC_ABSTRACT) == 0) {
- /* XXX We work around this because interfaces in JDK 1.1 are
+ /* We work around this because interfaces in JDK 1.1 are
* not declared abstract. */
c->flags |= ACC_ABSTRACT;
methodinfo *clone;
int namelen;
- /* XXX remove */ /* dolog("class_new_array: %s",c->name->text); */
+ /* DEBUG */ /* dolog("class_new_array: %s",c->name->text); */
/* Array classes are not loaded from classfiles. */
list_remove(&unloadedclasses, c);
c->flags = ACC_PUBLIC | ACC_FINAL | ACC_ABSTRACT;
c->interfacescount = 2;
- c->interfaces = MNEW(classinfo*,2); /* XXX use GC? */
+ c->interfaces = MNEW(classinfo*,2);
c->interfaces[0] = class_java_lang_Cloneable;
c->interfaces[1] = class_java_io_Serializable;
c->methodscount = 1;
- c->methods = MNEW (methodinfo, c->methodscount); /* XXX use GC? */
+ c->methods = MNEW (methodinfo, c->methodscount);
clone = c->methods;
memset(clone, 0, sizeof(methodinfo));
- clone->flags = ACC_PUBLIC; /* XXX protected? */
+ clone->flags = ACC_PUBLIC;
clone->name = utf_new_char("clone");
clone->descriptor = utf_new_char("()Ljava/lang/Object;");
clone->class = c;
clone->stubroutine = createnativestub((functionptr) &builtin_clone_array, clone);
- clone->monoPoly = MONO; /* XXX should be poly? */
+ clone->monoPoly = MONO;
/* XXX: field: length? */
if (linkverbose)
dolog("Linking...");
- /* XXX added a hack to break infinite linking loops. A better
+ /* Added a hack to break infinite linking loops. A better
* linking algorithm would be nice. -Edwin */
notlinkable = NULL;
while ((c = list_first(&unlinkedclasses))) {
pthread_mutex_unlock(&compiler_mutex);
#endif
- /* XXX DEBUG */ if (linkverbose && !top) dolog("returning NULL from loader_load");
+ /* DEBUG */ /*if (linkverbose && !top) dolog("returning NULL from loader_load");*/
return top;
}
if (mode & CLASSLOAD_SKIP) return class_java_lang_Object;
name = utf_new(start,utf_ptr-start);
return (mode & CLASSLOAD_LOAD)
- ? loader_load(name) : class_new(name); /* XXX */
+ ? loader_load(name) : class_new(name); /* XXX handle errors */
}
}