- FlatCall fc=(FlatCall)fn;
- if (fc.getReturnTemp()!=null) {
- addMapping(fc.getMethod().getReturnType(), fc.getReturnTemp().getType());
- }
- MethodDescriptor callmd=fc.getMethod();
- if (fc.getThis()!=null) {
- //complicated...need to deal with virtual dispatch here
- Set methods=cg.getMethods(callmd);
- for(Iterator mdit=methods.iterator();mdit.hasNext();) {
- MethodDescriptor md2=(MethodDescriptor)mdit.next();
- if (fc.getThis()!=null) {
- TypeDescriptor ttype=new TypeDescriptor(md2.getClassDesc());
- if (!typeutil.isSuperorType(fc.getThis().getType(),ttype)&&
- !typeutil.isSuperorType(ttype,fc.getThis().getType()))
- continue;
- addMapping(fc.getThis().getType(), ttype);
- }
- }
- }
- for(int i=0;i<fc.numArgs();i++) {
- TempDescriptor arg=fc.getArg(i);
- TypeDescriptor ptype=callmd.getParamType(i);
- addMapping(arg.getType(), ptype);
- }
- break;
+ FlatCall fc=(FlatCall)fn;
+ if (fc.getReturnTemp()!=null) {
+ addMapping(fc.getMethod().getReturnType(), fc.getReturnTemp().getType());
+ }
+ MethodDescriptor callmd=fc.getMethod();
+ if (fc.getThis()!=null) {
+ //complicated...need to deal with virtual dispatch here
+ Set methods=cg.getMethods(callmd);
+ for(Iterator mdit=methods.iterator(); mdit.hasNext(); ) {
+ MethodDescriptor md2=(MethodDescriptor)mdit.next();
+ if (fc.getThis()!=null) {
+ TypeDescriptor ttype=new TypeDescriptor(md2.getClassDesc());
+ if (!typeutil.isSuperorType(fc.getThis().getType(),ttype)&&
+ !typeutil.isSuperorType(ttype,fc.getThis().getType()))
+ continue;
+ addMapping(fc.getThis().getType(), ttype);
+ }
+ }
+ }
+ for(int i=0; i<fc.numArgs(); i++) {
+ TempDescriptor arg=fc.getArg(i);
+ TypeDescriptor ptype=callmd.getParamType(i);
+ addMapping(arg.getType(), ptype);
+ }
+ break;