This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: compilation warnings
- To: "Robert D. Skeels" <athene at earthlink dot net>
- Subject: Re: compilation warnings
- From: Per Bothner <per at bothner dot com>
- Date: 23 Apr 2001 23:27:46 -0700
- Cc: Kawa List <kawa at sourceware dot cygnus dot com>
- References: <B709E583.35EF%athene@earthlink.net>
"Robert D. Skeels" <athene@earthlink.net> writes:
> The following errors appear during compilation of numbers.scm:
>
> (compiling numbers.scm)
> numbers.scm:11:32: warning - no method `isExact' in java.lang.Object
> numbers.scm:14:32: warning - no method `isExact' in java.lang.Object
> numbers.scm:95:2: warning - no method `angle' in java.lang.Object
Well, I finally got around to tracking these down. It turned out to
be that "known" procedures (specifically 'as') are now ReferenceExp
rather than QuoteExp. Hence this patch, which I just checked in:
2001-04-23 Per Bothner <per@bothner.com>
* ApplyExp.java (getType): Handle functions that are ReferenceExp
and LambdaExp as well as QuoteExp. Fixes many warnings in kawa/lib.
Index: ApplyExp.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ApplyExp.java,v
retrieving revision 1.36
diff -u -r1.36 ApplyExp.java
--- ApplyExp.java 2001/04/10 03:39:15 1.36
+++ ApplyExp.java 2001/04/24 06:15:32
@@ -433,11 +433,22 @@
public final gnu.bytecode.Type getType()
{
- if (func instanceof QuoteExp)
+ Expression afunc = func;
+ if (afunc instanceof ReferenceExp)
{
- Object proc = ((QuoteExp) func).getValue();
+ Declaration func_decl = ((ReferenceExp) afunc).binding;
+ if (func_decl != null && ! func_decl.getFlag(Declaration.IS_UNKNOWN))
+ afunc = func_decl.getValue();
+ }
+ if (afunc instanceof QuoteExp)
+ {
+ Object proc = ((QuoteExp) afunc).getValue();
if (proc instanceof Inlineable)
return ((Inlineable) proc).getReturnType(args);
+ }
+ if (afunc instanceof LambdaExp)
+ {
+ return ((LambdaExp) afunc).body.getType();
}
return super.getType();
}
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/