asm_switchstackandcall now defined in asmpart.h
[cacao.git] / natcalls.h
1 #include  <stdio.h>
2 #include  <string.h>
3
4 /*---------- Define Constants ---------------------------*/
5 #define MAX 256
6 #define MAXCALLS 30 
7
8 /*---------- global variables ---------------------------*/
9 typedef struct classMeth classMeth;
10 typedef struct nativeCall   nativeCall;
11 typedef struct methodCall   methodCall;
12 typedef struct nativeMethod nativeMethod;
13
14 typedef struct nativeCompCall   nativeCompCall;
15 typedef struct methodCompCall   methodCompCall;
16 typedef struct nativeCompMethod nativeCompMethod;
17
18 int classCnt;
19
20 struct classMeth {
21   int i_class;
22   int j_method;
23   int methCnt;
24 };
25
26 struct  methodCall{
27         char *classname;
28         char *methodname;
29         char *descriptor;
30 } ;
31
32 struct  nativeMethod  {
33         char *methodname;
34         char *descriptor;
35         struct methodCall methodCalls[MAXCALLS];
36 } ;
37
38
39 static struct nativeCall {
40         char *classname;
41         struct nativeMethod methods[MAXCALLS];
42         int methCnt;
43         int callCnt[MAXCALLS];
44 } nativeCalls[] =
45  {
46
47 #include "nativecalls.h"
48 }
49 ;
50
51 #define NATIVECALLSSIZE  (sizeof(nativeCalls)/sizeof(struct nativeCall))
52
53
54 struct  methodCompCall{
55         utf *classname;
56         utf *methodname;
57         utf *descriptor;
58 } ;
59
60 struct  nativeCompMethod  {
61         utf *methodname;
62         utf *descriptor;
63         struct methodCompCall methodCalls[MAXCALLS];
64 } ;
65
66
67 struct nativeCompCall {
68         utf *classname;
69         struct nativeCompMethod methods[MAXCALLS];
70         int methCnt;
71         int callCnt[MAXCALLS];
72 } nativeCompCalls[NATIVECALLSSIZE];
73
74
75 bool natcall2utf(bool);
76 void printNativeCall(nativeCall);
77 void markNativeMethodsRT(utf *, utf* , utf* );