Edwin Steiner
Christian Thalinger
- $Id: linker.c 2725 2005-06-16 19:10:35Z edwin $
+ $Id: linker.c 3267 2005-09-21 20:21:48Z twisti $
*/
primitive class.
CAUTION: Don't change the order of the types. This table is indexed
- by the ARRAYTYPE_ constants (expcept ARRAYTYPE_OBJECT).
+ by the ARRAYTYPE_ constants (except ARRAYTYPE_OBJECT).
*******************************************************************************/
/* create primitive class */
c = class_create_classinfo(utf_new_char(primitivetype_table[i].name));
+
+ c->flags = ACC_PUBLIC | ACC_FINAL | ACC_ABSTRACT;
c->classUsed = NOTUSED; /* not used initially CO-RT */
c->impldBy = NULL;
/* prevent loader from loading primitive class */
c->loaded = true;
- if (!classcache_store_unique(c)) {
- log_text("Could not cache primitive class");
- return false;
- }
+
+ /* INFO: don't put primitive classes into the classcache */
+
if (!link_class(c))
return false;
/* resolve this super interface */
if (!resolve_classref_or_classinfo(NULL, c->interfaces[i], resolveEager,
- false, &tc))
+ true, false, &tc))
return NULL;
c->interfaces[i].cls = tc;
} else {
/* resolve super class */
- if (!resolve_classref_or_classinfo(NULL, c->super, resolveEager, false,
+ if (!resolve_classref_or_classinfo(NULL, c->super, resolveEager, true, false,
&super))
return NULL;
c->super.cls = super;
/* Methods in ABSTRACT classes from interfaces maybe already have a */
/* stubroutine. */
- if (!m->stubroutine) {
- if (!(m->flags & ACC_NATIVE)) {
- m->stubroutine = createcompilerstub(m);
-
- } else {
- functionptr f = native_findfunction(c->name,
- m->name, m->descriptor,
- (m->flags & ACC_STATIC));
-#if defined(STATIC_CLASSPATH)
- if (f)
-#endif
- m->stubroutine = codegen_createnativestub(f, m);
- }
- }
+ if (!m->stubroutine)
+ m->stubroutine = createcompilerstub(m);
if (!(m->flags & ACC_STATIC))
- v->table[m->vftblindex] = (methodptr) m->stubroutine;
+ v->table[m->vftblindex] = (methodptr) (ptrint) m->stubroutine;
}
/* compute instance size and offset of each field */
continue;
if (!resolve_classref_or_classinfo(NULL,
m->exceptiontable[j].catchtype,
- resolveEager, false,
+ resolveEager, true, false,
&(m->exceptiontable[j].catchtype.cls)))
return NULL;
}
for (j = 0; j < m->thrownexceptionscount; j++)
if (!resolve_classref_or_classinfo(NULL, m->thrownexceptions[j],
- resolveEager, false,
+ resolveEager, true, false,
&(m->thrownexceptions[j].cls)))
return NULL;
}
break;
default:
- log_text("Invalid array class name");
- assert(0);
+ *exceptionptr = new_classnotfoundexception(c->name);
+ return NULL;
}
desc->componentvftbl = NULL;