annotate dmd/ComplexExp.d @ 168:ceed63f310fb

stringtable, stringbuffer and freelist moved to Global
author korDen
date Thu, 30 Sep 2010 12:57:13 +0400
parents 010eb8f0e18d
children af724d3510d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
1 module dmd.ComplexExp;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 72
diff changeset
3 import dmd.common;
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
4 import dmd.Expression;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
5 import dmd.InterState;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
6 import dmd.Type;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
7 import dmd.OutBuffer;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
8 import dmd.Loc;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
9 import dmd.Scope;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
10 import dmd.IRState;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
11 import dmd.HdrGenState;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 import dmd.Type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 import dmd.TOK;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 import dmd.TY;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 import dmd.Port;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 import dmd.Complex;
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
17 import dmd.expression.Util;
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
18
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
19 import dmd.backend.dt_t;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 import dmd.backend.elem;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 import dmd.backend.Util;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 import dmd.backend.TYM;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 import dmd.backend.mTY;
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
24
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 class ComplexExp : Expression
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 Complex!(real) value;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 this(Loc loc, Complex!(real) value, Type type)
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
30 {
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 super(loc, TOK.TOKcomplex80, ComplexExp.sizeof);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 this.value = value;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 this.type = type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 //printf("ComplexExp.ComplexExp(%s)\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
37 override bool equals(Object o)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
42 override Expression semantic(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
44 if (!type)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45 type = Type.tcomplex80;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 type = type.semantic(loc, sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48 return this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
49 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
51 override Expression interpret(InterState istate)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
56 override string toChars()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
59 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
61 override ulong toInteger()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
62 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63 return cast(ulong) toReal();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
64 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
65
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
66 override ulong toUInteger()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68 return cast(long) toReal();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
69 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
71 override real toReal()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 return value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
75
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
76 override real toImaginary()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78 return value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
79 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
80
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
81 override Complex!(real) toComplex()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
82 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
83 return value;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
84 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
85
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
86 override Expression castTo(Scope sc, Type t)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
87 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
88 Expression e = this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 if (type != t)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
90 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
91 if (type.iscomplex() && t.iscomplex())
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
92 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
93 e = copy();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
94 e.type = t;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
95 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
97 e = Expression.castTo(sc, t);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
98 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
99 return e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
101
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
102 override int isConst()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
103 {
53
a8b50ff7f201 ForeachStatement.syntaxCopy
korDen
parents: 45
diff changeset
104 return 1;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
105 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
106
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
107 override bool isBool(bool result)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
108 {
123
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
109 if (result)
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
110 return value != Complex!(real).zero;
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
111 else
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
112 return value == Complex!(real).zero;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
113 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
114
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
115 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
119
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
120 override void toMangleBuffer(OutBuffer buf)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 {
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
122 buf.writeByte('c');
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
123 real r = toReal();
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
124 realToMangleBuffer(buf, r);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
125 buf.writeByte('c'); // separate the two
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
126 r = toImaginary();
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
127 realToMangleBuffer(buf, r);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128 }
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
129
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
130 version (_DH) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
131 OutBuffer hexp;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
132 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
133
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
134 override elem* toElem(IRState* irs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
135 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
136 eve c;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
137 tym_t ty;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
138
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
139 //printf("ComplexExp.toElem(%p) %s\n", this, toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
140
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
141 ///memset(&c, 0, c.sizeof);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
142
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
143 ty = type.totym();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
144 switch (tybasic(ty))
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
145 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
146 case TYcfloat:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
147 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
148 c.Vcfloat.re = cast(float) value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
149 if (Port.isSignallingNan(value.re)) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
150 (cast(uint*)&c.Vcfloat.re)[0] &= 0xFFBFFFFFL;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
151 std.stdio.writeln("float.re is snan");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
152 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
153 c.Vcfloat.im = cast(float) value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
154 if (Port.isSignallingNan(value.im)) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
155 (cast(uint*)&c.Vcfloat.im)[0] &= 0xFFBFFFFFL;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
156 std.stdio.writeln("float.im is snan");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
157 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
158 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
159 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
160
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
161 case TYcdouble:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
162 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 c.Vcdouble.re = cast(double) value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164 if (Port.isSignallingNan(value.re)) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
165 std.stdio.writeln("double.re is snan");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
166 (cast(uint*)&c.Vcdouble.re)[1] &= 0xFFF7FFFFL;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
167 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 c.Vcdouble.im = cast(double) value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169 if (Port.isSignallingNan(value.im)) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
170 (cast(uint*)&c.Vcdouble.im)[1] &= 0xFFF7FFFFL;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
171 std.stdio.writeln("double.im is snan");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
173 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
174 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
175
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 case TYcldouble:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
177 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
178 static if (true) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
179 c.Vcldouble = value;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
180 } else {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
182 ushort* p = cast(ushort*)&c.Vcldouble;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
183 for (int i = 0; i < (LNGDBLSIZE*2)/2; i++) printf("%04x ", p[i]);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
184 printf("\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186 c.Vcldouble.im = im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
188 ushort* p = cast(ushort*)&c.Vcldouble;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
189 for (int i = 0; i < (LNGDBLSIZE*2)/2; i++) printf("%04x ", p[i]);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190 printf("\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
191 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 c.Vcldouble.re = re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
193 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
194 ushort* p = cast(ushort*)&c.Vcldouble;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
195 for (int i = 0; i < (LNGDBLSIZE*2)/2; i++) printf("%04x ", p[i]);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
196 printf("\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
198 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
199 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
200 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202 default:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
203 assert(0);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
204 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205 return el_const(ty, &c);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
206 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
208 static private char[6] zeropad;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
209
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
210 override dt_t** toDt(dt_t** pdt)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212 //printf("ComplexExp.toDt() '%s'\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
213 float fvalue;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
214 double dvalue;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215 real evalue;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
216
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217 switch (type.toBasetype().ty)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
218 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
219 case Tcomplex32:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
220 fvalue = value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
221 pdt = dtnbytes(pdt,4,cast(char*)&fvalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
222 fvalue = value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
223 pdt = dtnbytes(pdt,4,cast(char*)&fvalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
224 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
225
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
226 case Tcomplex64:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
227 dvalue = value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
228 pdt = dtnbytes(pdt,8,cast(char*)&dvalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
229 dvalue = value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
230 pdt = dtnbytes(pdt,8,cast(char*)&dvalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
231 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
232
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
233 case Tcomplex80:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
234 evalue = value.re;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
235 pdt = dtnbytes(pdt,REALSIZE - REALPAD,cast(char*)&evalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
236 pdt = dtnbytes(pdt,REALPAD,zeropad.ptr);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
237 evalue = value.im;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
238 pdt = dtnbytes(pdt,REALSIZE - REALPAD, cast(char*)&evalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
239 pdt = dtnbytes(pdt,REALPAD,zeropad.ptr);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
240 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
241
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
242 default:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
243 assert(0);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
244 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
245 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
246 return pdt;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
247 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
248 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
249