From fd092f4ea35fb43182ec901cc551d5a2f3a06a02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Tue, 12 Nov 2002 16:19:01 +0000 Subject: [PATCH] Added output of comments to Java files. [r519] --- firmjni/README | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/firmjni/README b/firmjni/README index 4695431bd..7aa278646 100644 --- a/firmjni/README +++ b/firmjni/README @@ -1,23 +1,44 @@ +This directory contains tools to generate a Java Native Interface +for libfirm. -Call - sh build_firm_jni -to generate a Java native interface for firm. +The tools generate for each libfirm header file a Java class +containing native method calls and static fields. The native methods +are derived from the methods in the corresponding libfirm header. The +method names are generated by replacing all occurences of '_x' by 'X'. +(The libfirm headers may not contain method names that only differ by +capitalizing the letter after an underscore.) +The static fields are derived from the enumerators in libfirm. + +The generator copies the comments from the header files to the Java +files. Sometimes it places the comments slightly wrong, i.e. one +definition too high or too low. As the comments are directly copied +they refer to the C names. Generating the JNI requires various syntactic properties of the -header files that restrict legal C. +header files that restrict legal C. These restrictions will be +relaxed at some point. Do not use methods that generate a non null terminated String from Idents (as idToStr). This will probably cause a segmentation fault. +Do not use methods that accept or return function pointers. -Some methods generated might not work yet. Please report this to -goetz@ipd.info.uni-karlsruhe.de. Do not use methods with function -pointers as arguments. +Some other methods generated might not work yet. Please report this to +goetz@ipd.info.uni-karlsruhe.de. +WARNING: For now _all_ enumerators are generated into _all_ classes. This results from deficiencies in the crecoder and will be removed at some place. Use only the enumerators defined in the corresponding c headers. E.g., irm_X is defined in irmode.h, so use Irmode.irm_X, but not Type.irm_X or any other definition in the java files. + +======================================================================== + +Call + sh build_firm_jni +to generate a Java native interface for firm. + +======================================================================== -- 2.20.1