Fixed remaining bugs
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Fri, 8 Nov 2002 09:06:16 +0000 (09:06 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Fri, 8 Nov 2002 09:06:16 +0000 (09:06 +0000)
[r517]

firmjni/Makefile.in
firmjni/testprograms/Empty.java
firmjni/testprograms/Makefile.in
tools/crecoder.jar

index c4d7a9f..0e5f8d9 100644 (file)
@@ -11,6 +11,9 @@ subdir = firmjni
 # static initializer.
 LIBNAME = libfirmjni.so
 
+# The name of the package containing the Firm JNI
+PACKAGENAME = firmjni
+
 # where to put libfirmjni.so
 libdir = @libdir@
 # where to put the directory firmjni containing the generated
@@ -51,7 +54,7 @@ classfiles: $(CLASSFILES)
        javac $<
 
 %.h:   %.class
-       javah $(<:.class=)
+       javah -classpath $(topdir) -o $(<:.class=.h) $(PACKAGENAME).$(<:.class=)
 
 %.o:   %.c %.h
        gcc $(CPPFLAGS) -c $< -o $@
index 927601e..a3a1474 100644 (file)
@@ -59,16 +59,9 @@ class Empty {
         * it is not matured.
         * Generate the return node into this region. The Return node is needed to
         * return at least the memory. */
-       //ir_node *in[0]; /* this is the array containing the return parameters */
        int []in  = new int[0];
        int x = Ircons.newReturn (Ircons.getStore(), in.length, in);
 
-       /* Test enumerators */
-       if (Irnode.getIrnModecode(x) != Irmode.irm_X)
-           System.out.println(" wrong modecode");
-       else
-           System.out.println(" proper modecode Execution.");
-
        /* Now we generated all instructions for this block and all its predecessor
         * blocks so we can mature it.  (There are not too much.) */
        Ircons.matureBlock (Irgraph.getIrgCurrentBlock(irg));
@@ -80,7 +73,7 @@ class Empty {
        Ircons.matureBlock (Irgraph.getIrgEndBlock(irg));
 
        /* Verify the graph.  Finds some very bad errors in the graph. */
-       //irg_vrfy(irg);
+       Irvrfy.irgVrfy(irg);
        Ircons.finalizeCons (irg);
 
        System.out.println("Done building the graph.  Dumping it.");
index be05ec7..9c4d622 100644 (file)
@@ -10,6 +10,7 @@ srcdir = @srcdir@
 topdir = ..
 subdir = testprograms
 
+SOURCEPATH = @top_srcdir@/firmjni/testprograms/
 
 SOURCES := Makefile.in \
        Empty.java
@@ -26,11 +27,11 @@ all:        empty
 
 # bad hack ;-(
 empty:
-       javac -classpath $(MYCLASSPATH) -d . @top_srcdir@/firmjni/testprograms/Empty.java
+       javac -classpath $(MYCLASSPATH) -d . $(SOURCEPATH)Empty.java
 
 
 run:   empty
-       java -cp $(MYCLASSPATH) Empty
+       java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) Empty
 
 clean:
        -rm *.class
index d74d66a..aae8de6 100644 (file)
Binary files a/tools/crecoder.jar and b/tools/crecoder.jar differ