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