Unable to create custom heap which calls require-library

"Kjetil S. Matheussen" <[email protected]> Mon, 16 Apr 2007 23:59:48 +0200 (CEST)
Newsgroups gmane.comp.java.sisc.user
Message-ID <Pine.LNX.4.64.0704162351080.8924@ttleush>
I'm trying to build my own heap, and after a bit of fiddling I managed to 
come up with:

"
cd $SISC/src/sisc/boot
java sisc.boot.GenerateHeap -out heap.shp -files init.sce compat.sce \
      psyntax.sce analyzer.sce eval.sce init2.scm repl.scm customcode.scm
"

which works as long as "customcode.scm" is really r5rs-ish. There is an 
error here though, but the heap seems to be working anyway:

"
kjetil@ttleush ~/hurtigmixer/src $ sh makeheap.sh
Generating heap: heap.shp
Expanding and compiling init.sce...
Expanding and compiling compat.sce...
Expanding and compiling psyntax.sce...
Expanding and compiling analyzer.sce...
Expanding and compiling eval.sce...
Expanding and compiling init2.scm...
Error during expand: ((message . "evaluation error at file:init2.scm:952:65") (location . load) (parent (error-continuation . 
#<procedure>) (failure-continuation . #0=#<continuation>) (message . "evaluation error at file:../modules/std-modules.scm:912:51") (location . 
load) (parent (error-continuation . #<procedure>) (failure-continuation . #0#) (message . "<java.lang.NullPointerException>: null") (location . 
deserialize) (java-exception . #<java java.lang.NullPointerException java.lang.NullPointerException>))))
Error in load.
{warning: printing of stack trace not supported}
===========================
Caused by Error in load: evaluation error at 
file:../modules/std-modules.scm:912:51
---------------------------
To enable more detailed stack tracing, set the dynamic parameter 
max-stack-trace-depth to a non-zero value, e.g. 16.
---------------------------
Some stack trace entries may have been suppressed. To see all entries set 
the dynamic parameter suppressed-stack-trace-source-kinds to '().
===========================
Caused by Error in deserialize: <java.lang.NullPointerException>: null
Expanding and compiling repl.scm...
Expanding and compiling /home/kjetil/hurtigmixer/src/frametest.scm...
frametest.scminiting
Partitioning bindings...
Saving heap...
Pass 1: Discovery...
Pass 2: Write data segment
Pass 3: Write index
Pass 4: Append data segment
74 classes
8619 entry points
Heap saved.
"





However, if "customcode.scm" contains the following line:

"
(require-library 'sisc/libs/srfi/srfi-1)
"


I get the following error when trying to make the heap:

"
...
Expanding and compiling repl.scm...
Expanding and compiling /home/kjetil/hurtigmixer/src/frametest.scm...
Exception in thread "main" java.lang.NullPointerException
         at sisc.util.FreeReference.hashCode(Unknown Source)
         at sisc.exprs.FreeReferenceExp.hashCode(Unknown Source)
         at java.util.HashMap.get(HashMap.java:343)
         at sisc.io.SharedValueWriter.visit(Unknown Source)
         at sisc.exprs.AppExp.visit(Unknown Source)
         at sisc.io.SharedValueWriter.displayOrWrite(Unknown Source)
         at sisc.io.PortValueWriter.write(Unknown Source)
         at sisc.data.Value.toString(Unknown Source)
         at sisc.interpreter.SchemeException.getMessage(Unknown Source)
         at sisc.boot.GenerateHeap.main(Unknown Source)
"

Now the heap was not generated.


Any idea whats whats wrong?


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/