Mercurial > projects > ddmd
comparison bridge/bridge.cpp @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | 2cc604139636 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:10317f0c89a5 |
---|---|
1 struct Symbol; | |
2 struct dt_t; | |
3 struct TYPE; | |
4 struct elem; | |
5 struct Blockx; | |
6 struct block; | |
7 | |
8 typedef TYPE type; | |
9 | |
10 int reftoident(int a, unsigned long b, Symbol* c, unsigned long d, int e); | |
11 | |
12 int reftoident(int a, unsigned int b, Symbol* c, unsigned int d, int e) | |
13 { | |
14 return reftoident(a, (unsigned long)b, c, (unsigned long)d, e); | |
15 } | |
16 | |
17 dt_t** dtnzeros(dt_t**, unsigned long); | |
18 | |
19 dt_t** dtnzeros(dt_t** a, unsigned int b) | |
20 { | |
21 return dtnzeros(a, (unsigned long)b); | |
22 } | |
23 | |
24 TYPE* type_fake(unsigned long a); | |
25 | |
26 TYPE* type_fake(unsigned int a) | |
27 { | |
28 return type_fake((unsigned long)a); | |
29 } | |
30 | |
31 elem* el_long(unsigned long a, long long b); | |
32 | |
33 elem* el_long(unsigned int a, long long b) | |
34 { | |
35 return el_long((unsigned long)a, b); | |
36 } | |
37 | |
38 type* type_alloc(unsigned long a); | |
39 | |
40 type* type_alloc(unsigned int a) | |
41 { | |
42 return type_alloc((unsigned long)a); | |
43 } | |
44 | |
45 elem* el_bin(unsigned int a, unsigned long b, elem* c, elem* d); | |
46 | |
47 elem* el_bin(unsigned int a, unsigned int b, elem* c, elem* d) | |
48 { | |
49 return el_bin(a, (unsigned long)b, c, d); | |
50 } | |
51 | |
52 dt_t** dtnbytes(dt_t** a, unsigned long b, const char* c); | |
53 | |
54 dt_t** dtnbytes(dt_t** a, unsigned int b, const char* c) | |
55 { | |
56 return dtnbytes(a, (unsigned long)b, c); | |
57 } | |
58 | |
59 extern unsigned char tytab[]; | |
60 unsigned char* get_tytab() | |
61 { | |
62 return tytab; | |
63 } | |
64 | |
65 extern unsigned char tytab2[]; | |
66 unsigned char* get_tytab2() | |
67 { | |
68 return tytab2; | |
69 } | |
70 | |
71 extern signed char tysize[]; | |
72 signed char* get_tysize() | |
73 { | |
74 return tysize; | |
75 } | |
76 | |
77 type* type_setcv(type** pt, unsigned long cv); | |
78 | |
79 type* type_setcv(type** pt, unsigned int cv) | |
80 { | |
81 return type_setcv(pt, (unsigned long) cv); | |
82 } | |
83 | |
84 elem* el_una(unsigned int op, unsigned long ty, elem* e1); | |
85 | |
86 elem* el_una(unsigned int op, unsigned int ty, elem* e1) | |
87 { | |
88 return el_una(op, (unsigned long) ty, e1); | |
89 } | |
90 | |
91 type* type_allocn(unsigned long a, type* b); | |
92 | |
93 type* type_allocn(unsigned int a, type* b) | |
94 { | |
95 return type_allocn((unsigned long)a, b); | |
96 } | |
97 | |
98 void block_next(Blockx* bctx, enum BC bc, block* bn); | |
99 | |
100 void block_next(Blockx* bctx, int bc, block* bn) | |
101 { | |
102 block_next(bctx, (enum BC)bc, bn); | |
103 } | |
104 | |
105 block* block_goto(Blockx* bctx, enum BC bc, block* bn); | |
106 | |
107 block* block_goto(Blockx* bctx, int bc, block* bn) | |
108 { | |
109 return block_goto(bctx, (enum BC)bc, bn); | |
110 } | |
111 | |
112 dt_t** dtxoff(dt_t** pdtend, Symbol* s, unsigned long offset, unsigned long ty); | |
113 | |
114 dt_t** dtxoff(dt_t** pdtend, Symbol* s, unsigned int offset, unsigned int ty) | |
115 { | |
116 return dtxoff(pdtend, s, (unsigned long)offset, (unsigned long)ty); | |
117 } | |
118 | |
119 dt_t** dtabytes(dt_t** pdtend, unsigned long ty, unsigned long offset, unsigned long size, const char* ptr); | |
120 | |
121 dt_t** dtabytes(dt_t** pdtend, unsigned int ty, unsigned int offset, unsigned int size, const char* ptr) | |
122 { | |
123 return dtabytes(pdtend, (unsigned long)ty, (unsigned long)offset, (unsigned long)size, ptr); | |
124 } | |
125 | |
126 dt_t** dtdword(dt_t** pdtend, long value); | |
127 | |
128 dt_t** dtdword(dt_t** pdtend, int value) | |
129 { | |
130 return dtdword(pdtend, (long)value); | |
131 } | |
132 | |
133 type* type_setty(type** a, long b); | |
134 | |
135 type* type_setty(type** a, int b) | |
136 { | |
137 return type_setty(a, (long)b); | |
138 } | |
139 | |
140 elem* el_pair(unsigned long a, elem* b, elem* c); | |
141 | |
142 elem* el_pair(unsigned int a, elem* b, elem* c) | |
143 { | |
144 return el_pair((unsigned long)a, b, c); | |
145 } | |
146 | |
147 extern unsigned char rel_not[]; | |
148 extern unsigned char rel_swap[]; | |
149 extern unsigned char rel_integral[]; | |
150 extern unsigned char rel_exception[]; | |
151 extern unsigned char rel_unord[]; | |
152 | |
153 unsigned char* get_rel_not() { return rel_not; } | |
154 unsigned char* get_rel_swap() { return rel_swap; } | |
155 unsigned char* get_rel_integral() { return rel_integral; } | |
156 unsigned char* get_rel_exception() { return rel_exception; } | |
157 unsigned char* get_rel_unord() { return rel_unord; } | |
158 | |
159 unsigned long type_paramsize(type* t); | |
160 unsigned int type_paramsize_i(type* t) | |
161 { | |
162 return (unsigned int)type_paramsize(t); | |
163 } | |
164 | |
165 void cod3_thunk(Symbol* sthunk, Symbol* sfunc, unsigned int p, unsigned long thisty, unsigned long d, int i, unsigned long d2); | |
166 void cod3_thunk(Symbol* sthunk, Symbol* sfunc, unsigned int p, unsigned int thisty, unsigned int d, int i, unsigned int d2) | |
167 { | |
168 return cod3_thunk(sthunk, sfunc, p, (unsigned long)thisty, (unsigned long)d, i, (unsigned long)d2); | |
169 } | |
170 | |
171 elem* el_const(unsigned long a, union eve* b); | |
172 elem* el_const(unsigned int a, union eve* b) | |
173 { | |
174 return el_const((unsigned long)a, b); | |
175 } | |
176 | |
177 extern const unsigned long tytouns[]; | |
178 unsigned int* get_tytouns() | |
179 { | |
180 return (unsigned int*)tytouns; | |
181 } |