bugKawa - Bugs: bug #4289, primitive-array-get has internal...

 
 

bug #4289: primitive-array-get has internal error when compiling

Submitted by:  Chris Dean <ctdean>
Submitted on:  Sun 13 Jul 2003 01:13:01 AM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 13 Jul 2003 04:10:53 PM UTC, comment #3:

I've checked in your patch. Thanks!

Per Bothner <bothner>
Project Administrator
Sun 13 Jul 2003 02:35:10 AM UTC, comment #2:

That fixed it, thanks! See the attached patch.

Chris Dean <ctdean>
Sun 13 Jul 2003 01:31:34 AM UTC, comment #1:

I think the fix here to to have ArrayGet implement
Externalizable. I.e. add:

public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(element_type);
}

public void readExternal(ObjectInput in)
throws IOException, ClassNotFoundException
{
element_type = (Type) in.readObject();
}

Could you try that? Assuming it works, ArrraySet,
ArrayNew, and ArrayLength need the same fix,

Per Bothner <bothner>
Project Administrator
Sun 13 Jul 2003 01:13:01 AM UTC, original submission:

Saving the procedure that primitive-array-get generates, and using
that procedure results in a compile time error.

That is, compiling:

(define (foo a data index)
(let ((getter (primitive-array-get <java.lang.Object>)))
(getter data index)))

java.lang.Error: gnu.kawa.reflect.ArrayGet does not implement Externalizable
at gnu.expr.LitTable.error(LitTable.java:82)
at gnu.expr.LitTable.writeObject(LitTable.java:217)
at gnu.expr.LitTable.emit(LitTable.java:45)
at gnu.expr.Compilation.emitLiterals(Compilation.java:456)
at gnu.expr.Compilation.addClass(Compilation.java:1554)
at gnu.expr.Compilation.compile(Compilation.java:799)
at gnu.expr.Compilation.compileToFiles(Compilation.java:846)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:92)
at kawa.repl.processArgs(repl.java:389)
at kawa.repl.main(repl.java:593)
<unknown>:0: Literals: Internal error:java.lang.Error: gnu.kawa.reflect.ArrayGet does not implement Externalizable

Chris Dean <ctdean>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #532:  pa.patch added by ctdean (7KiB - application/octet-stream - primitive-array.patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 13 Jul 2003 04:10:53 PM UTCbothnerSeverity3 - Normal=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1