New source tree.
[cacao.git] / src / native / natcalls.h
1 /* native/natcalls.h -
2
3    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4    Institut f. Computersprachen, TU Wien
5    R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
6    S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
7    J. Wenninger
8
9    This file is part of CACAO.
10
11    This program is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public License as
13    published by the Free Software Foundation; either version 2, or (at
14    your option) any later version.
15
16    This program is distributed in the hope that it will be useful, but
17    WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24    02111-1307, USA.
25
26    Contact: cacao@complang.tuwien.ac.at
27
28    Authors: Carolyn Oates
29
30    $Id: natcalls.h 1621 2004-11-30 13:06:55Z twisti $
31
32 */
33
34
35 #ifndef _NATCALLS_H
36 #define _NATCALLS_H
37
38 #include "vm/global.h"
39
40
41 /*---------- Define Constants ---------------------------*/
42 #define MAX 256
43 #define MAXCALLS 30 
44
45 /*---------- global variables ---------------------------*/
46 typedef struct classMeth classMeth;
47 typedef struct nativeCall   nativeCall;
48 typedef struct methodCall   methodCall;
49 typedef struct nativeMethod nativeMethod;
50
51 typedef struct nativeCompCall   nativeCompCall;
52 typedef struct methodCompCall   methodCompCall;
53 typedef struct nativeCompMethod nativeCompMethod;
54
55 int classCnt;
56
57 struct classMeth {
58         int i_class;
59         int j_method;
60         int methCnt;
61 };
62
63 struct  methodCall{
64         char *classname;
65         char *methodname;
66         char *descriptor;
67 };
68
69 struct  nativeMethod  {
70         char *methodname;
71         char *descriptor;
72         struct methodCall methodCalls[MAXCALLS];
73 };
74
75
76 static struct nativeCall {
77         char *classname;
78         struct nativeMethod methods[MAXCALLS];
79         int methCnt;
80         int callCnt[MAXCALLS];
81 } nativeCalls[] =
82 {
83 #include "nativecalls.h"
84 };
85
86 #define NATIVECALLSSIZE  (sizeof(nativeCalls)/sizeof(struct nativeCall))
87
88
89 struct methodCompCall {
90         utf *classname;
91         utf *methodname;
92         utf *descriptor;
93 };
94
95
96 struct nativeCompMethod {
97         utf *methodname;
98         utf *descriptor;
99         struct methodCompCall methodCalls[MAXCALLS];
100 };
101
102
103 struct nativeCompCall {
104         utf *classname;
105         struct nativeCompMethod methods[MAXCALLS];
106         int methCnt;
107         int callCnt[MAXCALLS];
108 } nativeCompCalls[NATIVECALLSSIZE];
109
110
111 bool natcall2utf(bool);
112 void printNativeCall(nativeCall);
113 void markNativeMethodsRT(utf *, utf* , utf* ); 
114
115 #endif /* _NATCALLS_H */
116
117
118 /*
119  * These are local overrides for various environment variables in Emacs.
120  * Please do not remove this and leave it at the end of the file, where
121  * Emacs will automagically detect them.
122  * ---------------------------------------------------------------------
123  * Local variables:
124  * mode: c
125  * indent-tabs-mode: t
126  * c-basic-offset: 4
127  * tab-width: 4
128  * End:
129  */
130