move code from natcalls.h into native.h
authorcarolyn <none@none>
Thu, 2 Dec 2004 16:51:20 +0000 (16:51 +0000)
committercarolyn <none@none>
Thu, 2 Dec 2004 16:51:20 +0000 (16:51 +0000)
src/native/Makefile.am
src/native/natcalls.h [deleted file]
src/native/native.c
src/native/native.h

index 9bba7dc8c431a859a5bc5a561485498435d21e2f..37705cfeaab1aec5f7ed68e124c743afdf5da6a7 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 1647 2004-12-01 16:10:18Z twisti $
+# $Id: Makefile.am 1655 2004-12-02 16:51:20Z carolyn $
 
 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@
 
@@ -15,7 +15,7 @@ libnative_a_SOURCES = \
        jni.c \
        native.c
 
-native.c: nativetable.inc
+native.c: nativetable.inc nativecalls.inc
 
 if USE_GTK_PEER
 AWT_HEADERS_TOUCH_FILE = $(srcdir)/include/awtheaders-generated
diff --git a/src/native/natcalls.h b/src/native/natcalls.h
deleted file mode 100644 (file)
index 834939c..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/* native/natcalls.h -
-
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   Institut f. Computersprachen, TU Wien
-   R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
-   S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
-   J. Wenninger
-
-   This file is part of CACAO.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
-
-   Contact: cacao@complang.tuwien.ac.at
-
-   Authors: Carolyn Oates
-
-   $Id: natcalls.h 1621 2004-11-30 13:06:55Z twisti $
-
-*/
-
-
-#ifndef _NATCALLS_H
-#define _NATCALLS_H
-
-#include "vm/global.h"
-
-
-/*---------- Define Constants ---------------------------*/
-#define MAX 256
-#define MAXCALLS 30 
-
-/*---------- global variables ---------------------------*/
-typedef struct classMeth classMeth;
-typedef struct nativeCall   nativeCall;
-typedef struct methodCall   methodCall;
-typedef struct nativeMethod nativeMethod;
-
-typedef struct nativeCompCall   nativeCompCall;
-typedef struct methodCompCall   methodCompCall;
-typedef struct nativeCompMethod nativeCompMethod;
-
-int classCnt;
-
-struct classMeth {
-       int i_class;
-       int j_method;
-       int methCnt;
-};
-
-struct  methodCall{
-       char *classname;
-       char *methodname;
-       char *descriptor;
-};
-
-struct  nativeMethod  {
-       char *methodname;
-       char *descriptor;
-       struct methodCall methodCalls[MAXCALLS];
-};
-
-
-static struct nativeCall {
-       char *classname;
-       struct nativeMethod methods[MAXCALLS];
-       int methCnt;
-       int callCnt[MAXCALLS];
-} nativeCalls[] =
-{
-#include "nativecalls.h"
-};
-
-#define NATIVECALLSSIZE  (sizeof(nativeCalls)/sizeof(struct nativeCall))
-
-
-struct methodCompCall {
-       utf *classname;
-       utf *methodname;
-       utf *descriptor;
-};
-
-
-struct nativeCompMethod {
-       utf *methodname;
-       utf *descriptor;
-       struct methodCompCall methodCalls[MAXCALLS];
-};
-
-
-struct nativeCompCall {
-       utf *classname;
-       struct nativeCompMethod methods[MAXCALLS];
-       int methCnt;
-       int callCnt[MAXCALLS];
-} nativeCompCalls[NATIVECALLSSIZE];
-
-
-bool natcall2utf(bool);
-void printNativeCall(nativeCall);
-void markNativeMethodsRT(utf *, utf* , utf* ); 
-
-#endif /* _NATCALLS_H */
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
-
index debb2000ab8f84342bbe072db68cdbfdebdd08ce..713aea418f6949b77208dca02ee7edf817919ac7 100644 (file)
@@ -31,7 +31,7 @@
    The .hh files created with the header file generator are all
    included here as are the C functions implementing these methods.
 
-   $Id: native.c 1645 2004-12-01 14:06:44Z twisti $
+   $Id: native.c 1655 2004-12-02 16:51:20Z carolyn $
 
 */
 
@@ -150,7 +150,7 @@ static bool nativecompdone = false;
 
 /******************************************************************************/
 
-#include "natcalls.h"
+/**include "natcalls.h" **/
 
 
 /*********************** function: native_loadclasses **************************
index d2e766987204b2426ee9ac895e6a28641fd25643..4241a5ad78ea9a43b224a30ea982167898b414e2 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: native.h 1621 2004-11-30 13:06:55Z twisti $
+   $Id: native.h 1655 2004-12-02 16:51:20Z carolyn $
 
 */
 
@@ -171,6 +171,79 @@ classinfo *get_returntype(methodinfo *m);
 java_objectarray *builtin_asm_createclasscontextarray(classinfo **end,classinfo **start);
 java_lang_ClassLoader *builtin_asm_getclassloader(classinfo **end,classinfo **start);
 
+/*----- For Static Analysis of Natives by parseRT -----*/
+
+/*---------- global variables ---------------------------*/
+typedef struct classMeth classMeth;
+typedef struct nativeCall   nativeCall;
+typedef struct methodCall   methodCall;
+typedef struct nativeMethod nativeMethod;
+
+typedef struct nativeCompCall   nativeCompCall;
+typedef struct methodCompCall   methodCompCall;
+typedef struct nativeCompMethod nativeCompMethod;
+
+/*---------- Define Constants ---------------------------*/
+#define MAXCALLS 30 
+
+struct classMeth {
+       int i_class;
+       int j_method;
+       int methCnt;
+};
+
+struct  methodCall{
+       char *classname;
+       char *methodname;
+       char *descriptor;
+};
+
+struct  nativeMethod  {
+       char *methodname;
+       char *descriptor;
+       struct methodCall methodCalls[MAXCALLS];
+};
+
+
+static struct nativeCall {
+       char *classname;
+       struct nativeMethod methods[MAXCALLS];
+       int methCnt;
+       int callCnt[MAXCALLS];
+} nativeCalls[] =
+{
+#include "nativecalls.inc"
+};
+
+#define NATIVECALLSSIZE  (sizeof(nativeCalls)/sizeof(struct nativeCall))
+
+
+struct methodCompCall {
+       utf *classname;
+       utf *methodname;
+       utf *descriptor;
+};
+
+
+struct nativeCompMethod {
+       utf *methodname;
+       utf *descriptor;
+       struct methodCompCall methodCalls[MAXCALLS];
+};
+
+
+struct nativeCompCall {
+       utf *classname;
+       struct nativeCompMethod methods[MAXCALLS];
+       int methCnt;
+       int callCnt[MAXCALLS];
+} nativeCompCalls[NATIVECALLSSIZE];
+
+
+bool natcall2utf(bool);
+void printNativeCall(nativeCall);
+void markNativeMethodsRT(utf *, utf* , utf* ); 
+
 #endif /* _NATIVE_H */