Authors: Dieter Thuernbeck
- $Id: inline.c 846 2004-01-05 10:40:42Z twisti $
+ $Id: inline.c 1009 2004-03-31 22:44:07Z edwin $
*/
methodinfo *imi;
imr = class_getconstant(m->class, i, CONSTANT_Methodref);
- imi = class_fetchmethod(imr->class, imr->name, imr->descriptor);
+ imi = class_resolveclassmethod (imr->class, imr->name, imr->descriptor, class, true);
+ if (!imi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
if (opcode == JAVA_INVOKEVIRTUAL) {
if (!is_unique_method(imi->class, imi, imr->name, imr->descriptor))
Changes: Carolyn Oates
Edwin Steiner
- $Id: parse.c 991 2004-03-29 11:22:34Z stefan $
+ $Id: parse.c 1009 2004-03-31 22:44:07Z edwin $
*/
constant_FMIref *fr;
fieldinfo *fi;
fr = class_getconstant(class, i, CONSTANT_Fieldref);
- fi = class_findfield(fr->class, fr->name, fr->descriptor);
+ fi = class_resolvefield(fr->class, fr->name, fr->descriptor, class, true);
+ if (!fi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
OP2A(opcode, fi->type, fi,currentline);
if (!fi->class->initialized) {
isleafmethod = false;
constant_FMIref *fr;
fieldinfo *fi;
fr = class_getconstant (class, i, CONSTANT_Fieldref);
- fi = class_findfield (fr->class, fr->name, fr->descriptor);
+ fi = class_resolvefield(fr->class, fr->name, fr->descriptor, class, true);
+ if (!fi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
OP2A(opcode, fi->type, fi,currentline);
}
break;
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*RTAprint*/ if (((pOpcodes == 2) || (pOpcodes == 3)) && opt_rt)
/*RTAprint*/ {printf(" method name =");
/*RTAprint*/ utf_display(mi->class->name); printf(".");
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*RTAprint*/ if (((pOpcodes == 2) || (pOpcodes == 3)) && opt_rt)
/*RTAprint*/ {printf(" method name =");
method_display(mi);
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_InterfaceMethodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveinterfacemethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
if (mi->flags & ACC_STATIC)
panic ("Static/Nonstatic mismatch calling static method");
descriptor2types(mi);
Authors: Carolyn Oates
- $Id: parseRT.c 911 2004-02-04 11:42:41Z carolyn $
+ $Id: parseRT.c 1009 2004-03-31 22:44:07Z edwin $
Changes:
opcode put into functions
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*-- RTA --*/
invokestatic(mi);
}
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
RTAPRINT06invoke_spec_virt1
/*--- PRIVATE Method -----------------------------------------------------*/
if (mi->name != INIT) { /* if method called is PRIVATE */
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
invokevirtual(mi);
}
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_InterfaceMethodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
- invokeinterface(mi);
+ mi = class_resolveinterfacemethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
+ invokeinterface(mi);
}
break;
- Calling the class loader
- Running the main method
- $Id: main.c 997 2004-03-30 21:49:28Z twisti $
+ $Id: main.c 1009 2004-03-31 22:44:07Z edwin $
*/
/* heap_addreference((void**) &a); */
- mainmethod = class_findmethod(topclass,
+ mainmethod = class_resolveclassmethod(topclass,
utf_new_char("main"),
- utf_new_char("([Ljava/lang/String;)V")
+ utf_new_char("([Ljava/lang/String;)V"),
+ topclass,
+ true
);
/* there is no main method or it isn't static */
- Calling the class loader
- Running the main method
- $Id: cacao.c 997 2004-03-30 21:49:28Z twisti $
+ $Id: cacao.c 1009 2004-03-31 22:44:07Z edwin $
*/
/* heap_addreference((void**) &a); */
- mainmethod = class_findmethod(topclass,
+ mainmethod = class_resolveclassmethod(topclass,
utf_new_char("main"),
- utf_new_char("([Ljava/lang/String;)V")
+ utf_new_char("([Ljava/lang/String;)V"),
+ topclass,
+ true
);
/* there is no main method or it isn't static */
Authors: Dieter Thuernbeck
- $Id: inline.c 846 2004-01-05 10:40:42Z twisti $
+ $Id: inline.c 1009 2004-03-31 22:44:07Z edwin $
*/
methodinfo *imi;
imr = class_getconstant(m->class, i, CONSTANT_Methodref);
- imi = class_fetchmethod(imr->class, imr->name, imr->descriptor);
+ imi = class_resolveclassmethod (imr->class, imr->name, imr->descriptor, class, true);
+ if (!imi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
if (opcode == JAVA_INVOKEVIRTUAL) {
if (!is_unique_method(imi->class, imi, imr->name, imr->descriptor))
Authors: Carolyn Oates
- $Id: parseRT.c 911 2004-02-04 11:42:41Z carolyn $
+ $Id: parseRT.c 1009 2004-03-31 22:44:07Z edwin $
Changes:
opcode put into functions
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*-- RTA --*/
invokestatic(mi);
}
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
RTAPRINT06invoke_spec_virt1
/*--- PRIVATE Method -----------------------------------------------------*/
if (mi->name != INIT) { /* if method called is PRIVATE */
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
invokevirtual(mi);
}
methodinfo *mi;
mr = class_getconstant (rt_class, i, CONSTANT_InterfaceMethodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
- invokeinterface(mi);
+ mi = class_resolveinterfacemethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
+ invokeinterface(mi);
}
break;
Changes: Carolyn Oates
Edwin Steiner
- $Id: parse.c 991 2004-03-29 11:22:34Z stefan $
+ $Id: parse.c 1009 2004-03-31 22:44:07Z edwin $
*/
constant_FMIref *fr;
fieldinfo *fi;
fr = class_getconstant(class, i, CONSTANT_Fieldref);
- fi = class_findfield(fr->class, fr->name, fr->descriptor);
+ fi = class_resolvefield(fr->class, fr->name, fr->descriptor, class, true);
+ if (!fi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
OP2A(opcode, fi->type, fi,currentline);
if (!fi->class->initialized) {
isleafmethod = false;
constant_FMIref *fr;
fieldinfo *fi;
fr = class_getconstant (class, i, CONSTANT_Fieldref);
- fi = class_findfield (fr->class, fr->name, fr->descriptor);
+ fi = class_resolvefield(fr->class, fr->name, fr->descriptor, class, true);
+ if (!fi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
OP2A(opcode, fi->type, fi,currentline);
}
break;
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*RTAprint*/ if (((pOpcodes == 2) || (pOpcodes == 3)) && opt_rt)
/*RTAprint*/ {printf(" method name =");
/*RTAprint*/ utf_display(mi->class->name); printf(".");
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_Methodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveclassmethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
/*RTAprint*/ if (((pOpcodes == 2) || (pOpcodes == 3)) && opt_rt)
/*RTAprint*/ {printf(" method name =");
method_display(mi);
methodinfo *mi;
mr = class_getconstant (class, i, CONSTANT_InterfaceMethodref);
- mi = class_fetchmethod (mr->class, mr->name, mr->descriptor);
+ mi = class_resolveinterfacemethod (mr->class, mr->name, mr->descriptor, class, true);
+ if (!mi)
+ panic("Exception thrown while parsing bytecode"); /* XXX should be passed on */
if (mi->flags & ACC_STATIC)
panic ("Static/Nonstatic mismatch calling static method");
descriptor2types(mi);