This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Internal compiler error


On 18 Jul 2001, Per Bothner wrote:

> Jocelyn Paine <popx@pop3.ifs.org.uk> writes:
> 
> > Just to add a bit of detail to this message I sent last night, I was using
> > java kawa.repl with the -P and -C options to compile a .scm file. Kawa
> > crashed part of the way through with the trace shown. I presume the class
> > cast exception is not referring to a Boolean in the program being
> > compiled, but in the compiler.
> 
> My guess is some Boolean literal that is confusing the compiler.
> The compiler allocates a field for each variable in a module,
> or that otherwise cannot be allocated in a variable.  Perhaps
> this variable has a type declaration?
> 
> > It could be useful if the internal-error-report were
> > to display the term being processed,
> 
> There is no term being processed at this point, since it is setting
> things up at the function level, so this is difficult.  But could
> you see if the patch below helps any?
>
> [patch omitted]
> 
> 	--Per Bothner
>
I wasn't able to apply the patch, unfortunately, because I'm still
having problems installing Kawa 1.6.94 from source onto Windows. I
had to use the binary version. (Though thanks for sending it.) But
with what you've said, I've located what seems to be the offending
line in my code:
  (define-constant tracing :: <boolean> #f)
If I remove this, the file compiles.

Am I using define-constant improperly?

And if I am, would it be possible to modify the compiler so it gives 
a warning about this instead of crashing?

I'm a bit confused about this, because the line
  (define-constant indent :: <int> 2)
doesn't cause a crash. This and the other are both at module level,
though not at the beginning of the module.

<boolean> is a type: why is it incompatible with #f?

Jocelyn Paine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]